Migrate FunctionCall conversion out of IRGenerator.
We don't currently do FunctionCall optimization, but implementing
something along the lines of skia:10835 would probably involve doing
rewrites for optimization in FunctionCall::Make. This CL is the first
step down that road.
Change-Id: I249b02412e7ebac21bb98d6c5d61af3dcd6f1e69
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387156
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/sksl/SkSLInliner.cpp b/src/sksl/SkSLInliner.cpp
index 459f17d..b5f9c5e 100644
--- a/src/sksl/SkSLInliner.cpp
+++ b/src/sksl/SkSLInliner.cpp
@@ -325,10 +325,11 @@
}
case Expression::Kind::kFunctionCall: {
const FunctionCall& funcCall = expression.as<FunctionCall>();
- return std::make_unique<FunctionCall>(offset,
- funcCall.type().clone(symbolTableForExpression),
- &funcCall.function(),
- argList(funcCall.arguments()));
+ return FunctionCall::Make(*fContext,
+ offset,
+ funcCall.type().clone(symbolTableForExpression),
+ funcCall.function(),
+ argList(funcCall.arguments()));
}
case Expression::Kind::kFunctionReference:
return expression.clone();