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

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

Issue 2639233002: [Turbofan] Add CallFunctionWithSpread JSOperator. (Closed)
Patch Set: Set CL dependency to bytecode CL 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-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index ad2abcfbbbf1e5987ad818a3888b89743e4f0373..4e7ed5045bc946155ee443c99bab5defa9ce890c 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -159,6 +159,31 @@ std::ostream& operator<<(std::ostream&, CallFunctionParameters const&);
const CallFunctionParameters& CallFunctionParametersOf(const Operator* op);
+// Defines the arity for a JavaScript constructor call with a spread as the last
+// parameters. This is used as a parameter by JSCallConstructWithSpread
+// operators.
+class CallFunctionWithSpreadParameters final {
+ public:
+ explicit CallFunctionWithSpreadParameters(uint32_t arity) : arity_(arity) {}
+
+ uint32_t arity() const { return arity_; }
+
+ private:
+ uint32_t const arity_;
+};
+
+bool operator==(CallFunctionWithSpreadParameters const&,
+ CallFunctionWithSpreadParameters const&);
+bool operator!=(CallFunctionWithSpreadParameters const&,
+ CallFunctionWithSpreadParameters const&);
+
+size_t hash_value(CallFunctionWithSpreadParameters const&);
+
+std::ostream& operator<<(std::ostream&,
+ CallFunctionWithSpreadParameters const&);
+
+CallFunctionWithSpreadParameters const& CallFunctionWithSpreadParametersOf(
+ Operator const*);
// Defines the arity and the ID for a runtime function call. This is used as a
// parameter by JSCallRuntime operators.
@@ -552,6 +577,7 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
VectorSlotPair const& feedback = VectorSlotPair(),
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny,
TailCallMode tail_call_mode = TailCallMode::kDisallow);
+ const Operator* CallFunctionWithSpread(uint32_t arity);
const Operator* CallRuntime(Runtime::FunctionId id);
const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
const Operator* CallRuntime(const Runtime::Function* function, size_t arity);
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698