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

Unified Diff: src/interpreter/interpreter.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/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 09fac9430e35ffcd946e92d809955dce222283b9..6f64d63eb7e7cd6e344418c4cb5e5b76ce082c1c 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1772,16 +1772,14 @@ void Interpreter::DoCreateUnmappedArguments(
__ Dispatch();
}
-// CreateRestArguments
+// CreateRestParameter
//
-// Creates a new rest arguments object starting at |rest_index|.
-void Interpreter::DoCreateRestArguments(
+// Creates a new rest parameter array.
+void Interpreter::DoCreateRestParameter(
compiler::InterpreterAssembler* assembler) {
+ // TODO(ignition): Use FastNewRestParameterStub here.
Node* closure = __ LoadRegister(Register::function_closure());
- Node* constant_pool_index = __ BytecodeOperandIdx(0);
- Node* rest_index = __ LoadConstantPoolEntry(constant_pool_index);
- Node* result =
- __ CallRuntime(Runtime::kNewRestArguments_Generic, closure, rest_index);
+ Node* result = __ CallRuntime(Runtime::kNewRestParameter, closure);
__ SetAccumulator(result);
__ Dispatch();
}

Powered by Google App Engine
This is Rietveld 408576698