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

Unified Diff: src/interpreter/interpreter.cc

Issue 1693513002: [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips and mips64. 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
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/builtins-mips.cc » ('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 2408797053f6973ac04459c55a7dd404403e3bfd..418ba97b59b69c05c812199ac71bce33fcd146e5 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1718,10 +1718,11 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) {
//
// Creates a new unmapped arguments object.
void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
- Node* closure = __ LoadRegister(Register::function_closure());
+ Callable callable = CodeFactory::FastNewStrictArguments(isolate_);
+ Node* target = __ HeapConstant(callable.code());
Node* context = __ GetContext();
- Node* result =
- __ CallRuntime(Runtime::kNewStrictArguments_Generic, context, closure);
+ Node* closure = __ LoadRegister(Register::function_closure());
+ Node* result = __ CallStub(callable.descriptor(), target, context, closure);
__ SetAccumulator(result);
__ Dispatch();
}
@@ -1730,10 +1731,11 @@ void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
//
// Creates a new rest parameter array.
void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) {
- // TODO(ignition): Use FastNewRestParameterStub here.
+ Callable callable = CodeFactory::FastNewRestParameter(isolate_);
+ Node* target = __ HeapConstant(callable.code());
Node* closure = __ LoadRegister(Register::function_closure());
Node* context = __ GetContext();
- Node* result = __ CallRuntime(Runtime::kNewRestParameter, context, closure);
+ Node* result = __ CallStub(callable.descriptor(), target, context, closure);
__ SetAccumulator(result);
__ Dispatch();
}
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698