Index: src/compiler/js-operator.h |
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h |
index fc5c75da36612709635aff7238fdf7d7f33d097e..cd96563890156dfe23dc44df280a753fd75911e0 100644 |
--- a/src/compiler/js-operator.h |
+++ b/src/compiler/js-operator.h |
@@ -218,6 +218,34 @@ std::ostream& operator<<(std::ostream&, CallForwardVarargsParameters const&); |
CallForwardVarargsParameters const& CallForwardVarargsParametersOf( |
Operator const*) WARN_UNUSED_RESULT; |
+// Defines the flags for a JavaScript call forwarding parameters. This |
+// is used as parameter by JSCallVarargs operators. |
+class CallVarargsParameters final { |
+ public: |
+ explicit CallVarargsParameters(size_t arity) : arity_(arity) {} |
+ |
+ size_t arity() const { return arity_; } |
+ |
+ bool operator==(CallVarargsParameters const& that) const { |
+ return this->arity_ == that.arity_; |
+ } |
+ bool operator!=(CallVarargsParameters const& that) const { |
+ return !(*this == that); |
+ } |
+ |
+ private: |
+ friend size_t hash_value(CallVarargsParameters const& p) { |
+ return p.arity_; |
+ } |
+ |
+ const size_t arity_; |
+}; |
+ |
+std::ostream& operator<<(std::ostream&, CallVarargsParameters const&); |
+ |
+CallVarargsParameters const& CallVarargsParametersOf(Operator const*) |
+ WARN_UNUSED_RESULT; |
+ |
// Defines the arity and the call flags for a JavaScript function call. This is |
// used as a parameter by JSCall operators. |
class CallParameters final { |
@@ -726,13 +754,14 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final |
const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, |
int literal_flags, int literal_index); |
- const Operator* CallForwardVarargs(size_t arity, uint32_t start_index, |
- TailCallMode tail_call_mode); |
const Operator* Call( |
size_t arity, CallFrequency frequency = CallFrequency(), |
VectorSlotPair const& feedback = VectorSlotPair(), |
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, |
TailCallMode tail_call_mode = TailCallMode::kDisallow); |
+ const Operator* CallForwardVarargs(size_t arity, uint32_t start_index, |
+ TailCallMode tail_call_mode); |
+ const Operator* CallVarargs(size_t arity); |
const Operator* CallWithArrayLike(CallFrequency frequency); |
const Operator* CallWithSpread(uint32_t arity); |
const Operator* CallRuntime(Runtime::FunctionId id); |