Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(671)

Side by Side Diff: src/sksl/SkSLIRGenerator.h

Issue 2494523002: Revert of added constant folding & branch elimination to skslc (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/sksl/SkSLIRGenerator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 std::unique_ptr<Expression> coerce(std::unique_ptr<Expression> expr, const T ype& type); 82 std::unique_ptr<Expression> coerce(std::unique_ptr<Expression> expr, const T ype& type);
83 std::unique_ptr<Block> convertBlock(const ASTBlock& block); 83 std::unique_ptr<Block> convertBlock(const ASTBlock& block);
84 std::unique_ptr<Statement> convertBreak(const ASTBreakStatement& b); 84 std::unique_ptr<Statement> convertBreak(const ASTBreakStatement& b);
85 std::unique_ptr<Expression> convertConstructor(Position position, 85 std::unique_ptr<Expression> convertConstructor(Position position,
86 const Type& type, 86 const Type& type,
87 std::vector<std::unique_ptr<E xpression>> params); 87 std::vector<std::unique_ptr<E xpression>> params);
88 std::unique_ptr<Statement> convertContinue(const ASTContinueStatement& c); 88 std::unique_ptr<Statement> convertContinue(const ASTContinueStatement& c);
89 std::unique_ptr<Statement> convertDiscard(const ASTDiscardStatement& d); 89 std::unique_ptr<Statement> convertDiscard(const ASTDiscardStatement& d);
90 std::unique_ptr<Statement> convertDo(const ASTDoStatement& d); 90 std::unique_ptr<Statement> convertDo(const ASTDoStatement& d);
91 std::unique_ptr<Expression> convertBinaryExpression(const ASTBinaryExpressio n& expression); 91 std::unique_ptr<Expression> convertBinaryExpression(const ASTBinaryExpressio n& expression);
92 // Returns null if it cannot fold the expression. Note that unlike most othe r functions here, a
93 // null return does not represent a compilation error.
94 std::unique_ptr<Expression> constantFold(const Expression& left,
95 Token::Kind op,
96 const Expression& right);
97 std::unique_ptr<Extension> convertExtension(const ASTExtension& e); 92 std::unique_ptr<Extension> convertExtension(const ASTExtension& e);
98 std::unique_ptr<Statement> convertExpressionStatement(const ASTExpressionSta tement& s); 93 std::unique_ptr<Statement> convertExpressionStatement(const ASTExpressionSta tement& s);
99 std::unique_ptr<Statement> convertFor(const ASTForStatement& f); 94 std::unique_ptr<Statement> convertFor(const ASTForStatement& f);
100 std::unique_ptr<Expression> convertIdentifier(const ASTIdentifier& identifie r); 95 std::unique_ptr<Expression> convertIdentifier(const ASTIdentifier& identifie r);
101 std::unique_ptr<Statement> convertIf(const ASTIfStatement& s); 96 std::unique_ptr<Statement> convertIf(const ASTIfStatement& s);
102 std::unique_ptr<Expression> convertIndex(std::unique_ptr<Expression> base, 97 std::unique_ptr<Expression> convertIndex(std::unique_ptr<Expression> base,
103 const ASTExpression& index); 98 const ASTExpression& index);
104 std::unique_ptr<InterfaceBlock> convertInterfaceBlock(const ASTInterfaceBloc k& s); 99 std::unique_ptr<InterfaceBlock> convertInterfaceBlock(const ASTInterfaceBloc k& s);
105 Modifiers convertModifiers(const ASTModifiers& m); 100 Modifiers convertModifiers(const ASTModifiers& m);
106 std::unique_ptr<Expression> convertPrefixExpression(const ASTPrefixExpressio n& expression); 101 std::unique_ptr<Expression> convertPrefixExpression(const ASTPrefixExpressio n& expression);
(...skipping 18 matching lines...) Expand all
125 ErrorReporter& fErrors; 120 ErrorReporter& fErrors;
126 121
127 friend class AutoSymbolTable; 122 friend class AutoSymbolTable;
128 friend class AutoLoopLevel; 123 friend class AutoLoopLevel;
129 friend class Compiler; 124 friend class Compiler;
130 }; 125 };
131 126
132 } 127 }
133 128
134 #endif 129 #endif
OLDNEW
« no previous file with comments | « no previous file | src/sksl/SkSLIRGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698