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

Unified Diff: src/interpreter/interpreter.cc

Issue 1664593003: [Interpreter] Adds support for rest parameters to interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes comments. Created 4 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/interpreter/bytecodes.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 1d467e300fe3894a9590bac62d03a7ddca173d33..774aeea8abc47cde70a8c1dadc2e06f6ce9e7e6f 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1770,6 +1770,19 @@ void Interpreter::DoCreateUnmappedArguments(
__ Dispatch();
}
+// CreateRestArguments
+//
+// Creates a new rest arguments object starting at |rest_index|.
+void Interpreter::DoCreateRestArguments(
+ compiler::InterpreterAssembler* assembler) {
+ 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);
+ __ SetAccumulator(result);
+ __ Dispatch();
+}
// Throw
//
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698