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

Unified Diff: src/compiler/js-operator.cc

Issue 2655233002: [turbofan] Introduce JSCallForwardVarargs operator. (Closed)
Patch Set: Fix formatting. Created 3 years, 11 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
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 01e66a4c74d4d9a9d52dd195be89a6484adecfff..60fab9d17547874f3dae38e0be1ba6060c0ec6c3 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -118,6 +118,17 @@ const CallFunctionParameters& CallFunctionParametersOf(const Operator* op) {
return OpParameter<CallFunctionParameters>(op);
}
+std::ostream& operator<<(std::ostream& os,
+ CallForwardVarargsParameters const& p) {
+ return os << p.start_index() << ", " << p.tail_call_mode();
+}
+
+CallForwardVarargsParameters const& CallForwardVarargsParametersOf(
+ Operator const* op) {
+ DCHECK_EQ(IrOpcode::kJSCallForwardVarargs, op->opcode());
+ return OpParameter<CallForwardVarargsParameters>(op);
+}
+
bool operator==(CallFunctionWithSpreadParameters const& lhs,
CallFunctionWithSpreadParameters const& rhs) {
return lhs.arity() == rhs.arity();
@@ -724,6 +735,16 @@ const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) {
hints); // parameter
}
+const Operator* JSOperatorBuilder::CallForwardVarargs(
+ uint32_t start_index, TailCallMode tail_call_mode) {
+ CallForwardVarargsParameters parameters(start_index, tail_call_mode);
+ return new (zone()) Operator1<CallForwardVarargsParameters>( // --
+ IrOpcode::kJSCallForwardVarargs, Operator::kNoProperties, // opcode
+ "JSCallForwardVarargs", // name
+ 2, 1, 1, 1, 1, 2, // counts
+ parameters); // parameter
+}
+
const Operator* JSOperatorBuilder::CallFunction(
size_t arity, float frequency, VectorSlotPair const& feedback,
ConvertReceiverMode convert_mode, TailCallMode tail_call_mode) {
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698