diff options
author | 2022-04-03 16:34:10 -0700 | |
---|---|---|
committer | 2022-04-03 16:34:10 -0700 | |
commit | a87508008dfa1604baf2d4e39bf44704c00f261c (patch) | |
tree | 0be2ade96772037a02803b30e157c367d931e3d9 /src/deps/skia/include/private/SkSLIRNode.h | |
parent | 4a19a3f07f1887903e5638a3be167f0c7b377ba3 (diff) | |
download | bun-jarred/canvas.tar.gz bun-jarred/canvas.tar.zst bun-jarred/canvas.zip |
skia WIPjarred/canvas
Diffstat (limited to 'src/deps/skia/include/private/SkSLIRNode.h')
-rw-r--r-- | src/deps/skia/include/private/SkSLIRNode.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/deps/skia/include/private/SkSLIRNode.h b/src/deps/skia/include/private/SkSLIRNode.h new file mode 100644 index 000000000..2e545c349 --- /dev/null +++ b/src/deps/skia/include/private/SkSLIRNode.h @@ -0,0 +1,63 @@ +/* + * Copyright 2016 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SKSL_IRNODE +#define SKSL_IRNODE + +#include "include/private/SkSLString.h" +#include "include/private/SkTArray.h" +#include "src/sksl/SkSLLexer.h" +#include "src/sksl/SkSLModifiersPool.h" +#include "src/sksl/SkSLPool.h" + +#include <algorithm> +#include <atomic> +#include <unordered_set> +#include <vector> + +namespace SkSL { + +class Expression; +class FunctionDeclaration; +class FunctionDefinition; +class Statement; +class Symbol; +class SymbolTable; +class Type; +class Variable; +class VariableReference; +enum class VariableRefKind : int8_t; +enum class VariableStorage : int8_t; + +/** + * Represents a node in the intermediate representation (IR) tree. The IR is a fully-resolved + * version of the program (all types determined, everything validated), ready for code generation. + */ +class IRNode : public Poolable { +public: + virtual ~IRNode() {} + + virtual String description() const = 0; + + // No copy construction or assignment + IRNode(const IRNode&) = delete; + IRNode& operator=(const IRNode&) = delete; + + // line of this element within the program being compiled, for error reporting purposes + int fLine; + +protected: + IRNode(int line, int kind) + : fLine(line) + , fKind(kind) {} + + int fKind; +}; + +} // namespace SkSL + +#endif |