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

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

Issue 2655233002: [turbofan] Introduce JSCallForwardVarargs operator. (Closed)
Patch Set: Fix formatting. 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 4e7ed5045bc946155ee443c99bab5defa9ce890c..0f3e11eff452007cb5b16fa4182da0e6128a16df 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -106,6 +106,43 @@ std::ostream& operator<<(std::ostream&,
CallConstructWithSpreadParameters const& CallConstructWithSpreadParametersOf(
Operator const*);
+// Defines the flags for a JavaScript call forwarding parameters. This
+// is used as parameter by JSCallForwardVarargs operators.
+class CallForwardVarargsParameters final {
+ public:
+ CallForwardVarargsParameters(uint32_t start_index,
+ TailCallMode tail_call_mode)
+ : bit_field_(StartIndexField::encode(start_index) |
+ TailCallModeField::encode(tail_call_mode)) {}
+
+ uint32_t start_index() const { return StartIndexField::decode(bit_field_); }
+ TailCallMode tail_call_mode() const {
+ return TailCallModeField::decode(bit_field_);
+ }
+
+ bool operator==(CallForwardVarargsParameters const& that) const {
+ return this->bit_field_ == that.bit_field_;
+ }
+ bool operator!=(CallForwardVarargsParameters const& that) const {
+ return !(*this == that);
+ }
+
+ private:
+ friend size_t hash_value(CallForwardVarargsParameters const& p) {
+ return p.bit_field_;
+ }
+
+ typedef BitField<uint32_t, 0, 30> StartIndexField;
+ typedef BitField<TailCallMode, 31, 1> TailCallModeField;
+
+ uint32_t const bit_field_;
+};
+
+std::ostream& operator<<(std::ostream&, CallForwardVarargsParameters const&);
+
+CallForwardVarargsParameters const& CallForwardVarargsParametersOf(
+ Operator const*) WARN_UNUSED_RESULT;
+
// Defines the arity and the call flags for a JavaScript function call. This is
// used as a parameter by JSCallFunction operators.
class CallFunctionParameters final {
@@ -572,6 +609,8 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
const Operator* CreateLiteralRegExp(Handle<String> constant_pattern,
int literal_flags, int literal_index);
+ const Operator* CallForwardVarargs(uint32_t start_index,
+ TailCallMode tail_call_mode);
const Operator* CallFunction(
size_t arity, float frequency = 0.0f,
VectorSlotPair const& feedback = VectorSlotPair(),
« 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