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

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

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.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 46282a1addd0a7a95f89fa13d7d08b8fa31a9060..64a791d496576a53a227f2ff47bc176e4eeed170 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -350,32 +350,9 @@ const StoreGlobalParameters& StoreGlobalParametersOf(const Operator* op) {
}
-bool operator==(CreateArgumentsParameters const& lhs,
- CreateArgumentsParameters const& rhs) {
- return lhs.type() == rhs.type() && lhs.start_index() == rhs.start_index();
-}
-
-
-bool operator!=(CreateArgumentsParameters const& lhs,
- CreateArgumentsParameters const& rhs) {
- return !(lhs == rhs);
-}
-
-
-size_t hash_value(CreateArgumentsParameters const& p) {
- return base::hash_combine(p.type(), p.start_index());
-}
-
-
-std::ostream& operator<<(std::ostream& os, CreateArgumentsParameters const& p) {
- return os << p.type() << ", " << p.start_index();
-}
-
-
-const CreateArgumentsParameters& CreateArgumentsParametersOf(
- const Operator* op) {
+CreateArgumentsType const& CreateArgumentsTypeOf(const Operator* op) {
DCHECK_EQ(IrOpcode::kJSCreateArguments, op->opcode());
- return OpParameter<CreateArgumentsParameters>(op);
+ return OpParameter<CreateArgumentsType>(op);
}
@@ -888,15 +865,12 @@ const Operator* JSOperatorBuilder::LoadDynamic(const Handle<String>& name,
}
-const Operator* JSOperatorBuilder::CreateArguments(
- CreateArgumentsParameters::Type type, int start_index) {
- DCHECK_IMPLIES(start_index, type == CreateArgumentsParameters::kRestArray);
- CreateArgumentsParameters parameters(type, start_index);
- return new (zone()) Operator1<CreateArgumentsParameters>( // --
- IrOpcode::kJSCreateArguments, Operator::kNoThrow, // opcode
- "JSCreateArguments", // name
- 1, 1, 1, 1, 1, 0, // counts
- parameters); // parameter
+const Operator* JSOperatorBuilder::CreateArguments(CreateArgumentsType type) {
+ return new (zone()) Operator1<CreateArgumentsType>( // --
+ IrOpcode::kJSCreateArguments, Operator::kNoThrow, // opcode
+ "JSCreateArguments", // name
+ 1, 1, 1, 1, 1, 0, // counts
+ type); // parameter
}

Powered by Google App Engine
This is Rietveld 408576698