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 | 4c412bc | 2020-10-13 11:19:41 -0400 | [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 | |
John Stiles | 2d4f959 | 2020-10-30 10:29:12 -0400 | [diff] [blame] | 36 | class ExternalValue; |
Ethan Nicholas | 1e9f7f3 | 2020-10-08 05:28:32 -0400 | [diff] [blame] | 37 | class FunctionCall; |
Brian Osman | 3d87e9f | 2020-10-08 11:50:22 -0400 | [diff] [blame] | 38 | struct ParsedModule; |
Ethan Nicholas | cb0f409 | 2019-04-19 11:26:50 -0400 | [diff] [blame] | 39 | struct Swizzle; |
| 40 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 41 | /** |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 42 | * Intrinsics are passed between the Compiler and the IRGenerator using IRIntrinsicMaps. |
| 43 | */ |
Brian Osman | 2b469eb | 2020-09-21 11:32:10 -0400 | [diff] [blame] | 44 | class IRIntrinsicMap { |
| 45 | public: |
| 46 | IRIntrinsicMap(IRIntrinsicMap* parent) : fParent(parent) {} |
| 47 | |
| 48 | void insertOrDie(String key, std::unique_ptr<ProgramElement> element) { |
| 49 | SkASSERT(fIntrinsics.find(key) == fIntrinsics.end()); |
| 50 | fIntrinsics[key] = Intrinsic{std::move(element), false}; |
| 51 | } |
| 52 | |
Brian Osman | afa18ee | 2020-10-07 17:47:45 -0400 | [diff] [blame] | 53 | const ProgramElement* find(const String& key) { |
| 54 | auto iter = fIntrinsics.find(key); |
| 55 | if (iter == fIntrinsics.end()) { |
| 56 | return fParent ? fParent->find(key) : nullptr; |
| 57 | } |
| 58 | return iter->second.fIntrinsic.get(); |
| 59 | } |
| 60 | |
Brian Osman | 2b469eb | 2020-09-21 11:32:10 -0400 | [diff] [blame] | 61 | // 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] | 62 | const ProgramElement* findAndInclude(const String& key) { |
Brian Osman | 2b469eb | 2020-09-21 11:32:10 -0400 | [diff] [blame] | 63 | auto iter = fIntrinsics.find(key); |
| 64 | if (iter == fIntrinsics.end()) { |
| 65 | return fParent ? fParent->findAndInclude(key) : nullptr; |
| 66 | } |
| 67 | if (iter->second.fAlreadyIncluded) { |
| 68 | return nullptr; |
| 69 | } |
| 70 | iter->second.fAlreadyIncluded = true; |
| 71 | return iter->second.fIntrinsic.get(); |
| 72 | } |
| 73 | |
| 74 | void resetAlreadyIncluded() { |
| 75 | for (auto& pair : fIntrinsics) { |
| 76 | pair.second.fAlreadyIncluded = false; |
| 77 | } |
| 78 | if (fParent) { |
| 79 | fParent->resetAlreadyIncluded(); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | private: |
| 84 | struct Intrinsic { |
| 85 | std::unique_ptr<ProgramElement> fIntrinsic; |
| 86 | bool fAlreadyIncluded = false; |
| 87 | }; |
| 88 | |
| 89 | std::unordered_map<String, Intrinsic> fIntrinsics; |
| 90 | IRIntrinsicMap* fParent = nullptr; |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 91 | }; |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 92 | |
| 93 | /** |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 94 | * Performs semantic analysis on an abstract syntax tree (AST) and produces the corresponding |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 95 | * (unoptimized) intermediate representation (IR). |
| 96 | */ |
| 97 | class IRGenerator { |
| 98 | public: |
John Stiles | 4c412bc | 2020-10-13 11:19:41 -0400 | [diff] [blame] | 99 | IRGenerator(const Context* context, Inliner* inliner, ErrorReporter& errorReporter); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 100 | |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 101 | struct IRBundle { |
| 102 | std::vector<std::unique_ptr<ProgramElement>> fElements; |
| 103 | std::unique_ptr<ModifiersPool> fModifiers; |
| 104 | std::shared_ptr<SymbolTable> fSymbolTable; |
| 105 | Program::Inputs fInputs; |
| 106 | }; |
| 107 | |
| 108 | /** |
| 109 | * If externalValues is supplied, those values are registered in the symbol table of the |
| 110 | * Program, but ownership is *not* transferred. It is up to the caller to keep them alive. |
| 111 | */ |
| 112 | IRBundle convertProgram(Program::Kind kind, |
| 113 | const Program::Settings* settings, |
Brian Osman | d7e7659 | 2020-11-02 12:26:22 -0500 | [diff] [blame^] | 114 | const ShaderCapsClass* caps, |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 115 | const ParsedModule& base, |
| 116 | bool isBuiltinCode, |
| 117 | const char* text, |
| 118 | size_t length, |
| 119 | const std::vector<std::unique_ptr<ExternalValue>>* externalValues); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 120 | |
Ethan Nicholas | 86a4340 | 2017-01-19 13:32:00 -0500 | [diff] [blame] | 121 | /** |
| 122 | * If both operands are compile-time constants and can be folded, returns an expression |
| 123 | * representing the folded value. Otherwise, returns null. Note that unlike most other functions |
| 124 | * here, null does not represent a compilation error. |
| 125 | */ |
| 126 | std::unique_ptr<Expression> constantFold(const Expression& left, |
| 127 | Token::Kind op, |
| 128 | const Expression& right) const; |
Ethan Nicholas | 0054311 | 2018-07-31 09:44:36 -0400 | [diff] [blame] | 129 | |
Ethan Nicholas | 01ec7e8 | 2020-10-08 12:10:12 -0400 | [diff] [blame] | 130 | // both of these functions return null and report an error if the setting does not exist |
| 131 | const Type* typeForSetting(int offset, String name) const; |
| 132 | std::unique_ptr<Expression> valueForSetting(int offset, String name) const; |
| 133 | |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 134 | const Program::Settings* settings() const { return fSettings; } |
| 135 | |
Ethan Nicholas | 86a4340 | 2017-01-19 13:32:00 -0500 | [diff] [blame] | 136 | const Context& fContext; |
Ethan Nicholas | 941e7e2 | 2016-12-12 15:33:30 -0500 | [diff] [blame] | 137 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 138 | private: |
Ethan Nicholas | 3605ace | 2016-11-21 15:59:48 -0500 | [diff] [blame] | 139 | /** |
Ethan Nicholas | 041fd0a | 2020-10-07 16:42:04 -0400 | [diff] [blame] | 140 | * Relinquishes ownership of the Modifiers that have been collected so far and returns them. |
| 141 | */ |
| 142 | std::unique_ptr<ModifiersPool> releaseModifiers(); |
| 143 | |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 144 | void pushSymbolTable(); |
| 145 | void popSymbolTable(); |
| 146 | |
Ethan Nicholas | 63d7ee3 | 2020-08-17 10:57:12 -0400 | [diff] [blame] | 147 | void checkModifiers(int offset, const Modifiers& modifiers, int permitted); |
John Stiles | 8f2a0cf | 2020-10-13 12:48:21 -0400 | [diff] [blame] | 148 | StatementArray convertVarDeclarations(const ASTNode& decl, Variable::Storage storage); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 149 | void convertFunction(const ASTNode& f); |
Ethan Nicholas | 70728ef | 2020-05-28 07:09:00 -0400 | [diff] [blame] | 150 | std::unique_ptr<Statement> convertSingleStatement(const ASTNode& statement); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 151 | std::unique_ptr<Statement> convertStatement(const ASTNode& statement); |
| 152 | std::unique_ptr<Expression> convertExpression(const ASTNode& expression); |
| 153 | std::unique_ptr<ModifiersDeclaration> convertModifiersDeclaration(const ASTNode& m); |
Ethan Nicholas | 7da6dfa | 2017-06-21 11:25:18 -0400 | [diff] [blame] | 154 | |
Brian Osman | d807039 | 2020-09-09 15:50:02 -0400 | [diff] [blame] | 155 | const Type* convertType(const ASTNode& type, bool allowVoid = false); |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 156 | std::unique_ptr<Expression> call(int offset, |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 157 | const FunctionDeclaration& function, |
John Stiles | 8e3b6be | 2020-10-13 11:14:08 -0400 | [diff] [blame] | 158 | ExpressionArray arguments); |
Brian Osman | 0acb5b5 | 2020-09-02 13:45:47 -0400 | [diff] [blame] | 159 | CoercionCost callCost(const FunctionDeclaration& function, |
John Stiles | 8e3b6be | 2020-10-13 11:14:08 -0400 | [diff] [blame] | 160 | const ExpressionArray& arguments); |
| 161 | std::unique_ptr<Expression> call(int offset, |
| 162 | std::unique_ptr<Expression> function, |
| 163 | ExpressionArray arguments); |
Brian Osman | 0acb5b5 | 2020-09-02 13:45:47 -0400 | [diff] [blame] | 164 | CoercionCost coercionCost(const Expression& expr, const Type& type); |
ethannicholas | d598f79 | 2016-07-25 10:08:54 -0700 | [diff] [blame] | 165 | 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] | 166 | std::unique_ptr<Block> convertBlock(const ASTNode& block); |
| 167 | std::unique_ptr<Statement> convertBreak(const ASTNode& b); |
John Stiles | 8e3b6be | 2020-10-13 11:14:08 -0400 | [diff] [blame] | 168 | std::unique_ptr<Expression> convertNumberConstructor(int offset, |
| 169 | const Type& type, |
| 170 | ExpressionArray params); |
| 171 | std::unique_ptr<Expression> convertCompoundConstructor(int offset, |
| 172 | const Type& type, |
| 173 | ExpressionArray params); |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 174 | std::unique_ptr<Expression> convertConstructor(int offset, |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 175 | const Type& type, |
John Stiles | 8e3b6be | 2020-10-13 11:14:08 -0400 | [diff] [blame] | 176 | ExpressionArray params); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 177 | std::unique_ptr<Statement> convertContinue(const ASTNode& c); |
| 178 | std::unique_ptr<Statement> convertDiscard(const ASTNode& d); |
| 179 | std::unique_ptr<Statement> convertDo(const ASTNode& d); |
| 180 | std::unique_ptr<Statement> convertSwitch(const ASTNode& s); |
| 181 | std::unique_ptr<Expression> convertBinaryExpression(const ASTNode& expression); |
| 182 | std::unique_ptr<Extension> convertExtension(int offset, StringFragment name); |
| 183 | std::unique_ptr<Statement> convertExpressionStatement(const ASTNode& s); |
| 184 | std::unique_ptr<Statement> convertFor(const ASTNode& f); |
| 185 | std::unique_ptr<Expression> convertIdentifier(const ASTNode& identifier); |
| 186 | std::unique_ptr<Statement> convertIf(const ASTNode& s); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 187 | std::unique_ptr<Expression> convertIndex(std::unique_ptr<Expression> base, |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 188 | const ASTNode& index); |
| 189 | std::unique_ptr<InterfaceBlock> convertInterfaceBlock(const ASTNode& s); |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 190 | Modifiers convertModifiers(const Modifiers& m); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 191 | std::unique_ptr<Expression> convertPrefixExpression(const ASTNode& expression); |
| 192 | std::unique_ptr<Statement> convertReturn(const ASTNode& r); |
| 193 | std::unique_ptr<Section> convertSection(const ASTNode& e); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 194 | std::unique_ptr<Expression> convertCallExpression(const ASTNode& expression); |
| 195 | std::unique_ptr<Expression> convertFieldExpression(const ASTNode& expression); |
| 196 | std::unique_ptr<Expression> convertIndexExpression(const ASTNode& expression); |
| 197 | std::unique_ptr<Expression> convertPostfixExpression(const ASTNode& expression); |
Brian Osman | 6518d77 | 2020-09-10 16:50:06 -0400 | [diff] [blame] | 198 | std::unique_ptr<Expression> convertScopeExpression(const ASTNode& expression); |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 199 | std::unique_ptr<Expression> convertTypeField(int offset, const Type& type, |
| 200 | StringFragment field); |
Ethan Nicholas | 11d5397 | 2016-11-28 11:23:23 -0500 | [diff] [blame] | 201 | std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base, |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 202 | StringFragment field); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 203 | std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base, |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 204 | StringFragment fields); |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 205 | std::unique_ptr<Expression> convertTernaryExpression(const ASTNode& expression); |
| 206 | std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTNode& s); |
| 207 | std::unique_ptr<Statement> convertWhile(const ASTNode& w); |
| 208 | void convertEnum(const ASTNode& e); |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 209 | std::unique_ptr<Block> applyInvocationIDWorkaround(std::unique_ptr<Block> main); |
Robert Phillips | fe8da17 | 2018-01-24 14:52:02 +0000 | [diff] [blame] | 210 | // returns a statement which converts sk_Position from device to normalized coordinates |
| 211 | std::unique_ptr<Statement> getNormalizeSkPositionCode(); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 212 | |
| 213 | void checkValid(const Expression& expr); |
John Stiles | 403a363 | 2020-08-20 12:11:48 -0400 | [diff] [blame] | 214 | bool setRefKind(Expression& expr, VariableReference::RefKind kind); |
Brian Osman | 3e3db6c | 2020-08-14 09:42:12 -0400 | [diff] [blame] | 215 | bool getConstantInt(const Expression& value, int64_t* out); |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 216 | void copyIntrinsicIfNeeded(const FunctionDeclaration& function); |
Brian Osman | 8e2ef02 | 2020-09-30 13:26:43 -0400 | [diff] [blame] | 217 | void cloneBuiltinVariables(); |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 218 | |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 219 | Program::Inputs fInputs; |
| 220 | const Program::Settings* fSettings = nullptr; |
Brian Osman | d7e7659 | 2020-11-02 12:26:22 -0500 | [diff] [blame^] | 221 | const ShaderCapsClass* fCaps = nullptr; |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 222 | Program::Kind fKind; |
| 223 | |
John Stiles | 4c412bc | 2020-10-13 11:19:41 -0400 | [diff] [blame] | 224 | Inliner* fInliner = nullptr; |
Ethan Nicholas | fc99416 | 2019-06-06 10:04:27 -0400 | [diff] [blame] | 225 | std::unique_ptr<ASTFile> fFile; |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 226 | const FunctionDeclaration* fCurrentFunction = nullptr; |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 227 | std::unordered_map<String, Program::Settings::Value> fCapsMap; |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 228 | std::shared_ptr<SymbolTable> fSymbolTable = nullptr; |
Ethan Nicholas | 70728ef | 2020-05-28 07:09:00 -0400 | [diff] [blame] | 229 | // additional statements that need to be inserted before the one that convertStatement is |
| 230 | // currently working on |
John Stiles | 8f2a0cf | 2020-10-13 12:48:21 -0400 | [diff] [blame] | 231 | StatementArray fExtraStatements; |
John Stiles | 810c8cf | 2020-08-26 19:46:27 -0400 | [diff] [blame] | 232 | // Symbols which have definitions in the include files. |
| 233 | IRIntrinsicMap* fIntrinsics = nullptr; |
John Stiles | b8e010c | 2020-08-11 18:05:39 -0400 | [diff] [blame] | 234 | std::unordered_set<const FunctionDeclaration*> fReferencedIntrinsics; |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 235 | int fLoopLevel = 0; |
| 236 | int fSwitchLevel = 0; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 237 | ErrorReporter& fErrors; |
Ethan Nicholas | 7da6dfa | 2017-06-21 11:25:18 -0400 | [diff] [blame] | 238 | int fInvocations; |
Brian Osman | 88cda17 | 2020-10-09 12:05:16 -0400 | [diff] [blame] | 239 | std::vector<std::unique_ptr<ProgramElement>>* fProgramElements = nullptr; |
| 240 | const Variable* fRTAdjust = nullptr; |
| 241 | const Variable* fRTAdjustInterfaceBlock = nullptr; |
Robert Phillips | fe8da17 | 2018-01-24 14:52:02 +0000 | [diff] [blame] | 242 | int fRTAdjustFieldIndex; |
John Stiles | 881a10c | 2020-09-19 10:13:24 -0400 | [diff] [blame] | 243 | bool fCanInline = true; |
Ethan Nicholas | c18bb51 | 2020-07-28 14:46:53 -0400 | [diff] [blame] | 244 | // true if we are currently processing one of the built-in SkSL include files |
| 245 | bool fIsBuiltinCode; |
Ethan Nicholas | 041fd0a | 2020-10-07 16:42:04 -0400 | [diff] [blame] | 246 | std::unique_ptr<ModifiersPool> fModifiers; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 247 | |
| 248 | friend class AutoSymbolTable; |
ethannicholas | 22f939e | 2016-10-13 13:25:34 -0700 | [diff] [blame] | 249 | friend class AutoLoopLevel; |
Ethan Nicholas | af19769 | 2017-02-27 13:26:45 -0500 | [diff] [blame] | 250 | friend class AutoSwitchLevel; |
John Stiles | d1c4dac | 2020-08-11 18:50:50 -0400 | [diff] [blame] | 251 | friend class AutoDisableInline; |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 252 | friend class Compiler; |
| 253 | }; |
| 254 | |
John Stiles | a6841be | 2020-08-06 14:11:56 -0400 | [diff] [blame] | 255 | } // namespace SkSL |
ethannicholas | b3058bd | 2016-07-01 08:22:01 -0700 | [diff] [blame] | 256 | |
| 257 | #endif |