ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 7 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 8 | #ifndef SKSL_IRGENERATOR |
| 9 | #define SKSL_IRGENERATOR |
| 10 | |
John Stiles | ddefaee | 2020-08-11 15:13:26 -0400 | [diff] [blame] | 11 | #include <unordered_map> |
John Stiles | b8e010c | 2020-08-11 18:05:39 -0400 | [diff] [blame] | 12 | #include <unordered_set> |
Ethan Nicholas | db80f69 | 2019-11-22 14:06:12 -0500 | [diff] [blame] | 13 | |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 14 | #include "src/sksl/SkSLASTFile.h" |
| 15 | #include "src/sksl/SkSLASTNode.h" |
Mike Klein | 4b432fa | 2019-06-06 11:44:05 -0500 | [diff] [blame] | 16 | #include "src/sksl/SkSLErrorReporter.h" |
John Stiles | 941fc71 | 2020-09-19 12:47:10 +0000 | [diff] [blame] | 17 | #include "src/sksl/SkSLInliner.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 18 | #include "src/sksl/ir/SkSLBlock.h" |
| 19 | #include "src/sksl/ir/SkSLExpression.h" |
| 20 | #include "src/sksl/ir/SkSLExtension.h" |
| 21 | #include "src/sksl/ir/SkSLFunctionDefinition.h" |
| 22 | #include "src/sksl/ir/SkSLInterfaceBlock.h" |
| 23 | #include "src/sksl/ir/SkSLModifiers.h" |
| 24 | #include "src/sksl/ir/SkSLModifiersDeclaration.h" |
| 25 | #include "src/sksl/ir/SkSLProgram.h" |
| 26 | #include "src/sksl/ir/SkSLSection.h" |
| 27 | #include "src/sksl/ir/SkSLStatement.h" |
| 28 | #include "src/sksl/ir/SkSLSymbolTable.h" |
| 29 | #include "src/sksl/ir/SkSLType.h" |
| 30 | #include "src/sksl/ir/SkSLTypeReference.h" |
| 31 | #include "src/sksl/ir/SkSLVarDeclarations.h" |
| 32 | #include "src/sksl/ir/SkSLVariableReference.h" |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 33 | |
| 34 | namespace SkSL { |
| 35 | |
Ethan Nicholas | cb0f409 | 2019-04-19 11:26:50 -0400 | [diff] [blame] | 36 | struct Swizzle; |
John Stiles | ea9ab82 | 2020-08-31 09:55:04 -0400 | [diff] [blame] | 37 | struct FunctionCall; |
Ethan Nicholas | cb0f409 | 2019-04-19 11:26:50 -0400 | [diff] [blame] | 38 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 39 | /** |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 40 | * Intrinsics are passed between the Compiler and the IRGenerator using IRIntrinsicMaps. |
| 41 | */ |
Brian Osman | 2b469eb | 2020-09-21 11:32:10 -0400 | [diff] [blame] | 42 | class IRIntrinsicMap { |
| 43 | public: |
| 44 | IRIntrinsicMap(IRIntrinsicMap* parent) : fParent(parent) {} |
| 45 | |
| 46 | void insertOrDie(String key, std::unique_ptr<ProgramElement> element) { |
| 47 | SkASSERT(fIntrinsics.find(key) == fIntrinsics.end()); |
| 48 | fIntrinsics[key] = Intrinsic{std::move(element), false}; |
| 49 | } |
| 50 | |
| 51 | // Only returns an intrinsic that isn't already marked as included, and then marks it. |
Brian Osman | 00a8b5b | 2020-10-02 09:06:04 -0400 | [diff] [blame^] | 52 | const ProgramElement* findAndInclude(const String& key) { |
Brian Osman | 2b469eb | 2020-09-21 11:32:10 -0400 | [diff] [blame] | 53 | auto iter = fIntrinsics.find(key); |
| 54 | if (iter == fIntrinsics.end()) { |
| 55 | return fParent ? fParent->findAndInclude(key) : nullptr; |
| 56 | } |
| 57 | if (iter->second.fAlreadyIncluded) { |
| 58 | return nullptr; |
| 59 | } |
| 60 | iter->second.fAlreadyIncluded = true; |
| 61 | return iter->second.fIntrinsic.get(); |
| 62 | } |
| 63 | |
| 64 | void resetAlreadyIncluded() { |
| 65 | for (auto& pair : fIntrinsics) { |
| 66 | pair.second.fAlreadyIncluded = false; |
| 67 | } |
| 68 | if (fParent) { |
| 69 | fParent->resetAlreadyIncluded(); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | private: |
| 74 | struct Intrinsic { |
| 75 | std::unique_ptr<ProgramElement> fIntrinsic; |
| 76 | bool fAlreadyIncluded = false; |
| 77 | }; |
| 78 | |
| 79 | std::unordered_map<String, Intrinsic> fIntrinsics; |
| 80 | IRIntrinsicMap* fParent = nullptr; |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 81 | }; |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 82 | |
| 83 | /** |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 84 | * Performs semantic analysis on an abstract syntax tree (AST) and produces the corresponding |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 85 | * (unoptimized) intermediate representation (IR). |
| 86 | */ |
| 87 | class IRGenerator { |
| 88 | public: |
John Stiles | 941fc71 | 2020-09-19 12:47:10 +0000 | [diff] [blame] | 89 | IRGenerator(const Context* context, Inliner* inliner, std::shared_ptr<SymbolTable> root, |
ethannicholas | d598f79 | 2016-07-25 10:08:54 -0700 | [diff] [blame] | 90 | ErrorReporter& errorReporter); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 91 | |
Robert Phillips | fe8da17 | 2018-01-24 14:52:02 +0000 | [diff] [blame] | 92 | void convertProgram(Program::Kind kind, |
| 93 | const char* text, |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 94 | size_t length, |
Ethan Nicholas | 7da6dfa | 2017-06-21 11:25:18 -0400 | [diff] [blame] | 95 | std::vector<std::unique_ptr<ProgramElement>>* result); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 96 | |
Ethan Nicholas | 86a4340 | 2017-01-19 13:32:00 -0500 | [diff] [blame] | 97 | /** |
| 98 | * If both operands are compile-time constants and can be folded, returns an expression |
| 99 | * representing the folded value. Otherwise, returns null. Note that unlike most other functions |
| 100 | * here, null does not represent a compilation error. |
| 101 | */ |
| 102 | std::unique_ptr<Expression> constantFold(const Expression& left, |
| 103 | Token::Kind op, |
| 104 | const Expression& right) const; |
Ethan Nicholas | 0054311 | 2018-07-31 09:44:36 -0400 | [diff] [blame] | 105 | |
Ethan Nicholas | 941e7e2 | 2016-12-12 15:33:30 -0500 | [diff] [blame] | 106 | Program::Inputs fInputs; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 107 | const Program::Settings* fSettings; |
Ethan Nicholas | 86a4340 | 2017-01-19 13:32:00 -0500 | [diff] [blame] | 108 | const Context& fContext; |
Ethan Nicholas | 0054311 | 2018-07-31 09:44:36 -0400 | [diff] [blame] | 109 | Program::Kind fKind; |
Ethan Nicholas | 941e7e2 | 2016-12-12 15:33:30 -0500 | [diff] [blame] | 110 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 111 | private: |
Ethan Nicholas | 3605ace | 2016-11-21 15:59:48 -0500 | [diff] [blame] | 112 | /** |
Ethan Nicholas | 941e7e2 | 2016-12-12 15:33:30 -0500 | [diff] [blame] | 113 | * Prepare to compile a program. Resets state, pushes a new symbol table, and installs the |
| 114 | * settings. |
Ethan Nicholas | 3605ace | 2016-11-21 15:59:48 -0500 | [diff] [blame] | 115 | */ |
Ethan Nicholas | 3c6ae62 | 2018-04-24 13:06:09 -0400 | [diff] [blame] | 116 | void start(const Program::Settings* settings, |
Brian Osman | e498b3c | 2020-09-23 14:42:11 -0400 | [diff] [blame] | 117 | std::shared_ptr<SymbolTable> baseSymbolTable, |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 118 | std::vector<std::unique_ptr<ProgramElement>>* inherited, |
| 119 | bool isBuiltinCode = false); |
Ethan Nicholas | 3605ace | 2016-11-21 15:59:48 -0500 | [diff] [blame] | 120 | |
| 121 | /** |
| 122 | * Performs cleanup after compilation is complete. |
| 123 | */ |
| 124 | void finish(); |
| 125 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 126 | void pushSymbolTable(); |
| 127 | void popSymbolTable(); |
| 128 | |
Ethan Nicholas | 63d7ee3 | 2020-08-17 10:57:12 -0400 | [diff] [blame] | 129 | void checkModifiers(int offset, const Modifiers& modifiers, int permitted); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 130 | std::unique_ptr<VarDeclarations> convertVarDeclarations(const ASTNode& decl, |
Ethan Nicholas | 7da6dfa | 2017-06-21 11:25:18 -0400 | [diff] [blame] | 131 | Variable::Storage storage); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 132 | void convertFunction(const ASTNode& f); |
Ethan Nicholas | 70728ef | 2020-05-28 07:09:00 -0400 | [diff] [blame] | 133 | std::unique_ptr<Statement> convertSingleStatement(const ASTNode& statement); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 134 | std::unique_ptr<Statement> convertStatement(const ASTNode& statement); |
| 135 | std::unique_ptr<Expression> convertExpression(const ASTNode& expression); |
| 136 | std::unique_ptr<ModifiersDeclaration> convertModifiersDeclaration(const ASTNode& m); |
Ethan Nicholas | 7da6dfa | 2017-06-21 11:25:18 -0400 | [diff] [blame] | 137 | |
Brian Osman | d807039 | 2020-09-09 15:50:02 -0400 | [diff] [blame] | 138 | const Type* convertType(const ASTNode& type, bool allowVoid = false); |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 139 | std::unique_ptr<Expression> call(int offset, |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 140 | const FunctionDeclaration& function, |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 141 | std::vector<std::unique_ptr<Expression>> arguments); |
Brian Osman | 0acb5b5 | 2020-09-02 13:45:47 -0400 | [diff] [blame] | 142 | CoercionCost callCost(const FunctionDeclaration& function, |
| 143 | const std::vector<std::unique_ptr<Expression>>& arguments); |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 144 | std::unique_ptr<Expression> call(int offset, std::unique_ptr<Expression> function, |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 145 | std::vector<std::unique_ptr<Expression>> arguments); |
Brian Osman | 0acb5b5 | 2020-09-02 13:45:47 -0400 | [diff] [blame] | 146 | CoercionCost coercionCost(const Expression& expr, const Type& type); |
ethannicholas | d598f79 | 2016-07-25 10:08:54 -0700 | [diff] [blame] | 147 | std::unique_ptr<Expression> coerce(std::unique_ptr<Expression> expr, const Type& type); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 148 | std::unique_ptr<Block> convertBlock(const ASTNode& block); |
| 149 | std::unique_ptr<Statement> convertBreak(const ASTNode& b); |
Ethan Nicholas | 84645e3 | 2017-02-09 13:57:14 -0500 | [diff] [blame] | 150 | std::unique_ptr<Expression> convertNumberConstructor( |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 151 | int offset, |
Ethan Nicholas | 84645e3 | 2017-02-09 13:57:14 -0500 | [diff] [blame] | 152 | const Type& type, |
| 153 | std::vector<std::unique_ptr<Expression>> params); |
| 154 | std::unique_ptr<Expression> convertCompoundConstructor( |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 155 | int offset, |
Ethan Nicholas | 84645e3 | 2017-02-09 13:57:14 -0500 | [diff] [blame] | 156 | const Type& type, |
| 157 | std::vector<std::unique_ptr<Expression>> params); |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 158 | std::unique_ptr<Expression> convertConstructor(int offset, |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 159 | const Type& type, |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 160 | std::vector<std::unique_ptr<Expression>> params); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 161 | std::unique_ptr<Statement> convertContinue(const ASTNode& c); |
| 162 | std::unique_ptr<Statement> convertDiscard(const ASTNode& d); |
| 163 | std::unique_ptr<Statement> convertDo(const ASTNode& d); |
| 164 | std::unique_ptr<Statement> convertSwitch(const ASTNode& s); |
| 165 | std::unique_ptr<Expression> convertBinaryExpression(const ASTNode& expression); |
| 166 | std::unique_ptr<Extension> convertExtension(int offset, StringFragment name); |
| 167 | std::unique_ptr<Statement> convertExpressionStatement(const ASTNode& s); |
| 168 | std::unique_ptr<Statement> convertFor(const ASTNode& f); |
| 169 | std::unique_ptr<Expression> convertIdentifier(const ASTNode& identifier); |
| 170 | std::unique_ptr<Statement> convertIf(const ASTNode& s); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 171 | std::unique_ptr<Expression> convertIndex(std::unique_ptr<Expression> base, |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 172 | const ASTNode& index); |
| 173 | std::unique_ptr<InterfaceBlock> convertInterfaceBlock(const ASTNode& s); |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 174 | Modifiers convertModifiers(const Modifiers& m); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 175 | std::unique_ptr<Expression> convertPrefixExpression(const ASTNode& expression); |
| 176 | std::unique_ptr<Statement> convertReturn(const ASTNode& r); |
| 177 | std::unique_ptr<Section> convertSection(const ASTNode& e); |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 178 | std::unique_ptr<Expression> getCap(int offset, String name); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 179 | std::unique_ptr<Expression> convertCallExpression(const ASTNode& expression); |
| 180 | std::unique_ptr<Expression> convertFieldExpression(const ASTNode& expression); |
| 181 | std::unique_ptr<Expression> convertIndexExpression(const ASTNode& expression); |
| 182 | std::unique_ptr<Expression> convertPostfixExpression(const ASTNode& expression); |
Brian Osman | 6518d77 | 2020-09-10 16:50:06 -0400 | [diff] [blame] | 183 | std::unique_ptr<Expression> convertScopeExpression(const ASTNode& expression); |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 184 | std::unique_ptr<Expression> convertTypeField(int offset, const Type& type, |
| 185 | StringFragment field); |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 186 | std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base, |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 187 | StringFragment field); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 188 | std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base, |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 189 | StringFragment fields); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 190 | std::unique_ptr<Expression> convertTernaryExpression(const ASTNode& expression); |
| 191 | std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTNode& s); |
| 192 | std::unique_ptr<Statement> convertWhile(const ASTNode& w); |
| 193 | void convertEnum(const ASTNode& e); |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 194 | std::unique_ptr<Block> applyInvocationIDWorkaround(std::unique_ptr<Block> main); |
Robert Phillips | fe8da17 | 2018-01-24 14:52:02 +0000 | [diff] [blame] | 195 | // returns a statement which converts sk_Position from device to normalized coordinates |
| 196 | std::unique_ptr<Statement> getNormalizeSkPositionCode(); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 197 | |
| 198 | void checkValid(const Expression& expr); |
John Stiles | 403a363 | 2020-08-20 12:11:48 -0400 | [diff] [blame] | 199 | bool setRefKind(Expression& expr, VariableReference::RefKind kind); |
Brian Osman | 3e3db6c | 2020-08-14 09:42:12 -0400 | [diff] [blame] | 200 | bool getConstantInt(const Expression& value, int64_t* out); |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 201 | void copyIntrinsicIfNeeded(const FunctionDeclaration& function); |
Brian Osman | 8e2ef02 | 2020-09-30 13:26:43 -0400 | [diff] [blame] | 202 | void cloneBuiltinVariables(); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 203 | |
John Stiles | 941fc71 | 2020-09-19 12:47:10 +0000 | [diff] [blame] | 204 | Inliner* fInliner = nullptr; |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 205 | std::unique_ptr<ASTFile> fFile; |
ethannicholas | d598f79 | 2016-07-25 10:08:54 -0700 | [diff] [blame] | 206 | const FunctionDeclaration* fCurrentFunction; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 207 | std::unordered_map<String, Program::Settings::Value> fCapsMap; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 208 | std::shared_ptr<SymbolTable> fSymbolTable; |
Ethan Nicholas | 70728ef | 2020-05-28 07:09:00 -0400 | [diff] [blame] | 209 | // additional statements that need to be inserted before the one that convertStatement is |
| 210 | // currently working on |
| 211 | std::vector<std::unique_ptr<Statement>> fExtraStatements; |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 212 | // Symbols which have definitions in the include files. |
| 213 | IRIntrinsicMap* fIntrinsics = nullptr; |
John Stiles | b8e010c | 2020-08-11 18:05:39 -0400 | [diff] [blame] | 214 | std::unordered_set<const FunctionDeclaration*> fReferencedIntrinsics; |
ethannicholas | 22f939e | 2016-10-13 13:25:34 -0700 | [diff] [blame] | 215 | int fLoopLevel; |
Ethan Nicholas | af19769 | 2017-02-27 13:26:45 -0500 | [diff] [blame] | 216 | int fSwitchLevel; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 217 | ErrorReporter& fErrors; |
Ethan Nicholas | 7da6dfa | 2017-06-21 11:25:18 -0400 | [diff] [blame] | 218 | int fInvocations; |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 219 | std::vector<std::unique_ptr<ProgramElement>>* fProgramElements; |
Ethan Nicholas | 3c6ae62 | 2018-04-24 13:06:09 -0400 | [diff] [blame] | 220 | const Variable* fSkPerVertex = nullptr; |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 221 | const Variable* fRTAdjust; |
| 222 | const Variable* fRTAdjustInterfaceBlock; |
Robert Phillips | fe8da17 | 2018-01-24 14:52:02 +0000 | [diff] [blame] | 223 | int fRTAdjustFieldIndex; |
John Stiles | 881a10c | 2020-09-19 10:13:24 -0400 | [diff] [blame] | 224 | bool fCanInline = true; |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 225 | // true if we are currently processing one of the built-in SkSL include files |
| 226 | bool fIsBuiltinCode; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 227 | |
| 228 | friend class AutoSymbolTable; |
ethannicholas | 22f939e | 2016-10-13 13:25:34 -0700 | [diff] [blame] | 229 | friend class AutoLoopLevel; |
Ethan Nicholas | af19769 | 2017-02-27 13:26:45 -0500 | [diff] [blame] | 230 | friend class AutoSwitchLevel; |
John Stiles | d1c4dac | 2020-08-11 18:50:50 -0400 | [diff] [blame] | 231 | friend class AutoDisableInline; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 232 | friend class Compiler; |
| 233 | }; |
| 234 | |
John Stiles | a6841be | 2020-08-06 14:11:56 -0400 | [diff] [blame] | 235 | } // namespace SkSL |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 236 | |
| 237 | #endif |