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

Unified Diff: src/builtins/builtins-constructor-gen.cc

Issue 2930623002: [builtins] Start refactoring the Apply builtin. (Closed)
Patch Set: Address feedback. Created 3 years, 6 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/builtins/builtins-call-gen.cc ('k') | src/builtins/builtins-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-constructor-gen.cc
diff --git a/src/builtins/builtins-constructor-gen.cc b/src/builtins/builtins-constructor-gen.cc
index 95346910058e9da9d95ff7e205df6fb927b09dc4..e28982ec2a6d2ea8d475d2ea72a24d5601868737 100644
--- a/src/builtins/builtins-constructor-gen.cc
+++ b/src/builtins/builtins-constructor-gen.cc
@@ -5,6 +5,7 @@
#include "src/builtins/builtins-constructor-gen.h"
#include "src/ast/ast.h"
+#include "src/builtins/builtins-call-gen.h"
#include "src/builtins/builtins-constructor.h"
#include "src/builtins/builtins-utils-gen.h"
#include "src/builtins/builtins.h"
@@ -17,13 +18,28 @@
namespace v8 {
namespace internal {
+void Builtins::Generate_ConstructVarargs(MacroAssembler* masm) {
+ Generate_CallOrConstructVarargs(masm,
+ masm->isolate()->builtins()->Construct());
+}
+
void Builtins::Generate_ConstructForwardVarargs(MacroAssembler* masm) {
- Generate_ForwardVarargs(masm, masm->isolate()->builtins()->Construct());
+ Generate_CallOrConstructForwardVarargs(
+ masm, masm->isolate()->builtins()->Construct());
}
void Builtins::Generate_ConstructFunctionForwardVarargs(MacroAssembler* masm) {
- Generate_ForwardVarargs(masm,
- masm->isolate()->builtins()->ConstructFunction());
+ Generate_CallOrConstructForwardVarargs(
+ masm, masm->isolate()->builtins()->ConstructFunction());
+}
+
+TF_BUILTIN(ConstructWithArrayLike, CallOrConstructBuiltinsAssembler) {
+ Node* target = Parameter(ConstructWithArrayLikeDescriptor::kTarget);
+ Node* new_target = Parameter(ConstructWithArrayLikeDescriptor::kNewTarget);
+ Node* arguments_list =
+ Parameter(ConstructWithArrayLikeDescriptor::kArgumentsList);
+ Node* context = Parameter(ConstructWithArrayLikeDescriptor::kContext);
+ CallOrConstructWithArrayLike(target, new_target, arguments_list, context);
}
typedef compiler::Node Node;
« no previous file with comments | « src/builtins/builtins-call-gen.cc ('k') | src/builtins/builtins-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698