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

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

Issue 2949813002: [turbofan] Introduce new JSConstructWithArrayLike operator. (Closed)
Patch Set: Address feedback. Created 3 years, 6 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/opcodes.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 1e9d32dc0f9f2aa599f2c85e52279a5b386ded82..f48373f08520e1412b6805d2fa8109c950e96752 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -23,7 +23,8 @@ std::ostream& operator<<(std::ostream& os, CallFrequency f) {
}
CallFrequency CallFrequencyOf(Operator const* op) {
- DCHECK_EQ(IrOpcode::kJSCallWithArrayLike, op->opcode());
+ DCHECK(op->opcode() == IrOpcode::kJSCallWithArrayLike ||
+ op->opcode() == IrOpcode::kJSConstructWithArrayLike);
return OpParameter<CallFrequency>(op);
}
@@ -888,6 +889,16 @@ const Operator* JSOperatorBuilder::Construct(uint32_t arity,
parameters); // parameter
}
+const Operator* JSOperatorBuilder::ConstructWithArrayLike(
+ CallFrequency frequency) {
+ return new (zone()) Operator1<CallFrequency>( // --
+ IrOpcode::kJSConstructWithArrayLike, // opcode
+ Operator::kNoProperties, // properties
+ "JSConstructWithArrayLike", // name
+ 3, 1, 1, 1, 1, 2, // counts
+ frequency); // parameter
+}
+
const Operator* JSOperatorBuilder::ConstructWithSpread(uint32_t arity) {
SpreadWithArityParameter parameters(arity);
return new (zone()) Operator1<SpreadWithArityParameter>( // --
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698