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

Unified Diff: src/sksl/SkSLIRGenerator.h

Issue 2131223002: SkSL performance improvements (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: minor fixes Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: src/sksl/SkSLIRGenerator.h
diff --git a/src/sksl/SkSLIRGenerator.h b/src/sksl/SkSLIRGenerator.h
index d23e5a1bdb3a31eb1e901febbce4d70f0290413e..73847f1cb651afc14291858886489a3422880db6 100644
--- a/src/sksl/SkSLIRGenerator.h
+++ b/src/sksl/SkSLIRGenerator.h
@@ -62,24 +62,23 @@ public:
std::unique_ptr<Expression> convertExpression(const ASTExpression& expression);
private:
- void pushSymbolTable();
+ void pushSymbolTable(bool owner = false);
void popSymbolTable();
- std::shared_ptr<Type> convertType(const ASTType& type);
+ const Type* convertType(const ASTType& type);
std::unique_ptr<Expression> call(Position position,
- std::shared_ptr<FunctionDeclaration> function,
+ const FunctionDeclaration& function,
std::vector<std::unique_ptr<Expression>> arguments);
- bool determineCallCost(std::shared_ptr<FunctionDeclaration> function,
+ bool determineCallCost(const FunctionDeclaration& function,
const std::vector<std::unique_ptr<Expression>>& arguments,
int* outCost);
std::unique_ptr<Expression> call(Position position, std::unique_ptr<Expression> function,
std::vector<std::unique_ptr<Expression>> arguments);
- std::unique_ptr<Expression> coerce(std::unique_ptr<Expression> expr,
- std::shared_ptr<Type> type);
+ std::unique_ptr<Expression> coerce(std::unique_ptr<Expression> expr, const Type& type);
std::unique_ptr<Block> convertBlock(const ASTBlock& block);
std::unique_ptr<Statement> convertBreak(const ASTBreakStatement& b);
std::unique_ptr<Expression> convertConstructor(Position position,
- std::shared_ptr<Type> type,
+ const Type& type,
std::vector<std::unique_ptr<Expression>> params);
std::unique_ptr<Statement> convertContinue(const ASTContinueStatement& c);
std::unique_ptr<Statement> convertDiscard(const ASTDiscardStatement& d);
@@ -106,10 +105,10 @@ private:
std::unique_ptr<Statement> convertWhile(const ASTWhileStatement& w);
void checkValid(const Expression& expr);
- void markReadFrom(std::shared_ptr<Variable> var);
+ void markReadFrom(const Variable& var);
void markWrittenTo(const Expression& expr);
- std::shared_ptr<FunctionDeclaration> fCurrentFunction;
+ const FunctionDeclaration* fCurrentFunction;
std::shared_ptr<SymbolTable> fSymbolTable;
ErrorReporter& fErrors;

Powered by Google App Engine
This is Rietveld 408576698