24c1772ea4
It turned out that everywhere we were using or testing DSL code either directly or indirectly imported big chunks of the SkSL library. These imports turned out to be necessary; code written using just DSL.h would fail with various template instantiation errors. Change-Id: Iae72d15b0d6ef14614ac1a4ff08c36bc1876cd4d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381638 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
/*
|
|
* 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/SkSLASTNode.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;
|
|
|
|
// character offset of this element within the program being compiled, for error reporting
|
|
// purposes
|
|
int fOffset;
|
|
|
|
protected:
|
|
IRNode(int offset, int kind)
|
|
: fOffset(offset)
|
|
, fKind(kind) {}
|
|
|
|
int fKind;
|
|
};
|
|
|
|
} // namespace SkSL
|
|
|
|
#endif
|