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

Unified Diff: src/interpreter/interpreter.cc

Issue 2645743002: [builtins] Port parameter and argument-related code stubs to CSA (Closed)
Patch Set: Review feedback Created 3 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.cc ('k') | src/mips/code-stubs-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 decc0724300cbaf3ae8a54c4aad3df34c27b51c5..25377a74b572f300dffa3ec6f62ed00996a10a3f 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -8,6 +8,7 @@
#include <memory>
#include "src/ast/prettyprinter.h"
+#include "src/builtins/builtins-arguments.h"
#include "src/builtins/builtins-constructor.h"
#include "src/code-factory.h"
#include "src/compilation-info.h"
@@ -2918,10 +2919,9 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) {
__ Bind(&if_not_duplicate_parameters);
{
- // TODO(rmcilroy): Inline FastNewSloppyArguments when it is a TurboFan stub.
- Callable callable = CodeFactory::FastNewSloppyArguments(isolate_, true);
- Node* target = __ HeapConstant(callable.code());
- Node* result = __ CallStub(callable.descriptor(), target, context, closure);
+ ArgumentsBuiltinsAssembler constructor_assembler(assembler->state());
+ Node* result =
+ constructor_assembler.EmitFastNewSloppyArguments(context, closure);
__ SetAccumulator(result);
__ Dispatch();
}
@@ -2939,12 +2939,11 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) {
//
// Creates a new unmapped arguments object.
void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
- // TODO(rmcilroy): Inline FastNewStrictArguments when it is a TurboFan stub.
- Callable callable = CodeFactory::FastNewStrictArguments(isolate_, true);
- Node* target = __ HeapConstant(callable.code());
Node* context = __ GetContext();
Node* closure = __ LoadRegister(Register::function_closure());
- Node* result = __ CallStub(callable.descriptor(), target, context, closure);
+ ArgumentsBuiltinsAssembler builtins_assembler(assembler->state());
+ Node* result =
+ builtins_assembler.EmitFastNewStrictArguments(context, closure);
__ SetAccumulator(result);
__ Dispatch();
}
@@ -2953,12 +2952,10 @@ void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
//
// Creates a new rest parameter array.
void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) {
- // TODO(rmcilroy): Inline FastNewRestArguments when it is a TurboFan stub.
- Callable callable = CodeFactory::FastNewRestParameter(isolate_, true);
- Node* target = __ HeapConstant(callable.code());
Node* closure = __ LoadRegister(Register::function_closure());
Node* context = __ GetContext();
- Node* result = __ CallStub(callable.descriptor(), target, context, closure);
+ ArgumentsBuiltinsAssembler builtins_assembler(assembler->state());
+ Node* result = builtins_assembler.EmitFastNewRestParameter(context, closure);
__ SetAccumulator(result);
__ Dispatch();
}
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698