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

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

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-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 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);
« 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