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

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

Issue 2946893004: [WIP] Start adding JSCallWithVarargs
Patch Set: REBASE 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 f48373f08520e1412b6805d2fa8109c950e96752..bebc1cfe3a0903f90867729e60e2e8277f9dece3 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -157,6 +157,17 @@ const CallParameters& CallParametersOf(const Operator* op) {
}
std::ostream& operator<<(std::ostream& os,
+ CallVarargsParameters const& p) {
+ return os << p.arity();
+}
+
+CallVarargsParameters const& CallVarargsParametersOf(
+ Operator const* op) {
+ DCHECK_EQ(IrOpcode::kJSCallVarargs, op->opcode());
+ return OpParameter<CallVarargsParameters>(op);
+}
+
+std::ostream& operator<<(std::ostream& os,
CallForwardVarargsParameters const& p) {
return os << p.arity() << ", " << p.start_index() << ", "
<< p.tail_call_mode();
@@ -804,16 +815,6 @@ const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) {
hints); // parameter
}
-const Operator* JSOperatorBuilder::CallForwardVarargs(
- size_t arity, uint32_t start_index, TailCallMode tail_call_mode) {
- CallForwardVarargsParameters parameters(arity, start_index, tail_call_mode);
- return new (zone()) Operator1<CallForwardVarargsParameters>( // --
- IrOpcode::kJSCallForwardVarargs, Operator::kNoProperties, // opcode
- "JSCallForwardVarargs", // name
- parameters.arity(), 1, 1, 1, 1, 2, // counts
- parameters); // parameter
-}
-
const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency,
VectorSlotPair const& feedback,
ConvertReceiverMode convert_mode,
@@ -827,6 +828,26 @@ const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency,
parameters); // parameter
}
+const Operator* JSOperatorBuilder::CallForwardVarargs(
+ size_t arity, uint32_t start_index, TailCallMode tail_call_mode) {
+ CallForwardVarargsParameters parameters(arity, start_index, tail_call_mode);
+ return new (zone()) Operator1<CallForwardVarargsParameters>( // --
+ IrOpcode::kJSCallForwardVarargs, Operator::kNoProperties, // opcode
+ "JSCallForwardVarargs", // name
+ parameters.arity(), 1, 1, 1, 1, 2, // counts
+ parameters); // parameter
+}
+
+const Operator* JSOperatorBuilder::CallVarargs(
+ size_t arity) {
+ CallVarargsParameters parameters(arity);
+ return new (zone()) Operator1<CallVarargsParameters>( // --
+ IrOpcode::kJSCallVarargs, Operator::kNoProperties, // opcode
+ "JSCallVarargs", // name
+ parameters.arity() + 2, 1, 1, 1, 1, 2, // counts
+ parameters); // parameter
+}
+
const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) {
return new (zone()) Operator1<CallFrequency>( // --
IrOpcode::kJSCallWithArrayLike, Operator::kNoProperties, // opcode
« 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