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

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

Issue 2729143002: [compiler] Simplify paramerters for spread call. (Closed)
Patch Set: Address nits. Created 3 years, 10 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 730b4b9551528179536300a53d8e262e382fcb7d..9f44b0c2e12dceea82a94153e694697dde8dc5c6 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -87,12 +87,12 @@ std::ostream& operator<<(std::ostream&, ConstructParameters const&);
ConstructParameters const& ConstructParametersOf(Operator const*);
-// Defines the arity for a JavaScript constructor call with a spread as the last
-// parameters. This is used as a parameter by JSConstructWithSpread
-// operators.
-class ConstructWithSpreadParameters final {
+// Defines the arity for JavaScript calls with a spread as the last
+// parameter. This is used as a parameter by JSConstructWithSpread and
+// JSCallWithSpread operators.
+class SpreadWithArityParameters final {
public:
- explicit ConstructWithSpreadParameters(uint32_t arity) : arity_(arity) {}
+ explicit SpreadWithArityParameters(uint32_t arity) : arity_(arity) {}
uint32_t arity() const { return arity_; }
@@ -100,17 +100,16 @@ class ConstructWithSpreadParameters final {
uint32_t const arity_;
};
-bool operator==(ConstructWithSpreadParameters const&,
- ConstructWithSpreadParameters const&);
-bool operator!=(ConstructWithSpreadParameters const&,
- ConstructWithSpreadParameters const&);
+bool operator==(SpreadWithArityParameters const&,
+ SpreadWithArityParameters const&);
+bool operator!=(SpreadWithArityParameters const&,
+ SpreadWithArityParameters const&);
-size_t hash_value(ConstructWithSpreadParameters const&);
+size_t hash_value(SpreadWithArityParameters const&);
-std::ostream& operator<<(std::ostream&, ConstructWithSpreadParameters const&);
+std::ostream& operator<<(std::ostream&, SpreadWithArityParameters const&);
-ConstructWithSpreadParameters const& ConstructWithSpreadParametersOf(
- Operator const*);
+SpreadWithArityParameters const& SpreadWithArityParametersOf(Operator const*);
// Defines the flags for a JavaScript call forwarding parameters. This
// is used as parameter by JSCallForwardVarargs operators.
@@ -198,29 +197,6 @@ std::ostream& operator<<(std::ostream&, CallParameters const&);
const CallParameters& CallParametersOf(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 JSConstructWithSpread
-// operators.
-class CallWithSpreadParameters final {
- public:
- explicit CallWithSpreadParameters(uint32_t arity) : arity_(arity) {}
-
- uint32_t arity() const { return arity_; }
-
- private:
- uint32_t const arity_;
-};
-
-bool operator==(CallWithSpreadParameters const&,
- CallWithSpreadParameters const&);
-bool operator!=(CallWithSpreadParameters const&,
- CallWithSpreadParameters const&);
-
-size_t hash_value(CallWithSpreadParameters const&);
-
-std::ostream& operator<<(std::ostream&, CallWithSpreadParameters const&);
-
-CallWithSpreadParameters const& CallWithSpreadParametersOf(Operator const*);
// Defines the arity and the ID for a runtime function call. This is used as a
// parameter by JSCallRuntime operators.
« 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