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

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

Issue 1676883002: [runtime] Optimize and unify rest parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index 8999a641485b65b15badc8f7e13c601c85a67a8a..0defbbc12c5c00d6b1954fb4ceca7d541711436e 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -348,33 +348,8 @@ std::ostream& operator<<(std::ostream&, PropertyAccess const&);
PropertyAccess const& PropertyAccessOf(const Operator* op);
-// Defines specifics about arguments object or rest parameter creation. This is
-// used as a parameter by JSCreateArguments operators.
-class CreateArgumentsParameters final {
- public:
- enum Type { kMappedArguments, kUnmappedArguments, kRestArray };
- CreateArgumentsParameters(Type type, int start_index)
- : type_(type), start_index_(start_index) {}
-
- Type type() const { return type_; }
- int start_index() const { return start_index_; }
-
- private:
- const Type type_;
- const int start_index_;
-};
-
-bool operator==(CreateArgumentsParameters const&,
- CreateArgumentsParameters const&);
-bool operator!=(CreateArgumentsParameters const&,
- CreateArgumentsParameters const&);
-
-size_t hash_value(CreateArgumentsParameters const&);
-
-std::ostream& operator<<(std::ostream&, CreateArgumentsParameters const&);
-
-const CreateArgumentsParameters& CreateArgumentsParametersOf(
- const Operator* op);
+// CreateArgumentsType is used as parameter to JSCreateArguments nodes.
+CreateArgumentsType const& CreateArgumentsTypeOf(const Operator* op);
// Defines shared information for the array that should be created. This is
@@ -501,8 +476,7 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* Yield();
const Operator* Create();
- const Operator* CreateArguments(CreateArgumentsParameters::Type type,
- int start_index);
+ const Operator* CreateArguments(CreateArgumentsType type);
const Operator* CreateArray(size_t arity, Handle<AllocationSite> site);
const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info,
PretenureFlag pretenure);

Powered by Google App Engine
This is Rietveld 408576698