| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SKSL_IRGENERATOR | 8 #ifndef SKSL_IRGENERATOR |
| 9 #define SKSL_IRGENERATOR | 9 #define SKSL_IRGENERATOR |
| 10 | 10 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 std::unique_ptr<Expression> getCap(Position position, String name); | 157 std::unique_ptr<Expression> getCap(Position position, String name); |
| 158 std::unique_ptr<Expression> convertSuffixExpression(const ASTSuffixExpressio
n& expression); | 158 std::unique_ptr<Expression> convertSuffixExpression(const ASTSuffixExpressio
n& expression); |
| 159 std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base, | 159 std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base, |
| 160 const String& field); | 160 const String& field); |
| 161 std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base, | 161 std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base, |
| 162 const String& fields); | 162 const String& fields); |
| 163 std::unique_ptr<Expression> convertTernaryExpression(const ASTTernaryExpress
ion& expression); | 163 std::unique_ptr<Expression> convertTernaryExpression(const ASTTernaryExpress
ion& expression); |
| 164 std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTVarDeclar
ationStatement& s); | 164 std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTVarDeclar
ationStatement& s); |
| 165 std::unique_ptr<Statement> convertWhile(const ASTWhileStatement& w); | 165 std::unique_ptr<Statement> convertWhile(const ASTWhileStatement& w); |
| 166 | 166 |
| 167 void fixRectSampling(std::vector<std::unique_ptr<Expression>>& arguments); |
| 167 void checkValid(const Expression& expr); | 168 void checkValid(const Expression& expr); |
| 168 void markWrittenTo(const Expression& expr, bool readWrite); | 169 void markWrittenTo(const Expression& expr, bool readWrite); |
| 169 | 170 |
| 170 const FunctionDeclaration* fCurrentFunction; | 171 const FunctionDeclaration* fCurrentFunction; |
| 171 const Program::Settings* fSettings; | 172 const Program::Settings* fSettings; |
| 172 std::unordered_map<String, CapValue> fCapsMap; | 173 std::unordered_map<String, CapValue> fCapsMap; |
| 173 std::shared_ptr<SymbolTable> fSymbolTable; | 174 std::shared_ptr<SymbolTable> fSymbolTable; |
| 174 int fLoopLevel; | 175 int fLoopLevel; |
| 175 int fSwitchLevel; | 176 int fSwitchLevel; |
| 176 ErrorReporter& fErrors; | 177 ErrorReporter& fErrors; |
| 177 | 178 |
| 178 friend class AutoSymbolTable; | 179 friend class AutoSymbolTable; |
| 179 friend class AutoLoopLevel; | 180 friend class AutoLoopLevel; |
| 180 friend class AutoSwitchLevel; | 181 friend class AutoSwitchLevel; |
| 181 friend class Compiler; | 182 friend class Compiler; |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } | 185 } |
| 185 | 186 |
| 186 #endif | 187 #endif |
| OLD | NEW |