OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/builtins/builtins-constructor-gen.h" | 5 #include "src/builtins/builtins-constructor-gen.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/builtins/builtins-call-gen.h" |
8 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
9 #include "src/builtins/builtins-utils-gen.h" | 10 #include "src/builtins/builtins-utils-gen.h" |
10 #include "src/builtins/builtins.h" | 11 #include "src/builtins/builtins.h" |
11 #include "src/code-factory.h" | 12 #include "src/code-factory.h" |
12 #include "src/code-stub-assembler.h" | 13 #include "src/code-stub-assembler.h" |
13 #include "src/counters.h" | 14 #include "src/counters.h" |
14 #include "src/interface-descriptors.h" | 15 #include "src/interface-descriptors.h" |
15 #include "src/objects-inl.h" | 16 #include "src/objects-inl.h" |
16 | 17 |
17 namespace v8 { | 18 namespace v8 { |
18 namespace internal { | 19 namespace internal { |
19 | 20 |
| 21 void Builtins::Generate_ConstructVarargs(MacroAssembler* masm) { |
| 22 Generate_CallOrConstructVarargs(masm, |
| 23 masm->isolate()->builtins()->Construct()); |
| 24 } |
| 25 |
20 void Builtins::Generate_ConstructForwardVarargs(MacroAssembler* masm) { | 26 void Builtins::Generate_ConstructForwardVarargs(MacroAssembler* masm) { |
21 Generate_ForwardVarargs(masm, masm->isolate()->builtins()->Construct()); | 27 Generate_CallOrConstructForwardVarargs( |
| 28 masm, masm->isolate()->builtins()->Construct()); |
22 } | 29 } |
23 | 30 |
24 void Builtins::Generate_ConstructFunctionForwardVarargs(MacroAssembler* masm) { | 31 void Builtins::Generate_ConstructFunctionForwardVarargs(MacroAssembler* masm) { |
25 Generate_ForwardVarargs(masm, | 32 Generate_CallOrConstructForwardVarargs( |
26 masm->isolate()->builtins()->ConstructFunction()); | 33 masm, masm->isolate()->builtins()->ConstructFunction()); |
| 34 } |
| 35 |
| 36 TF_BUILTIN(ConstructWithArrayLike, CallOrConstructBuiltinsAssembler) { |
| 37 Node* target = Parameter(ConstructWithArrayLikeDescriptor::kTarget); |
| 38 Node* new_target = Parameter(ConstructWithArrayLikeDescriptor::kNewTarget); |
| 39 Node* arguments_list = |
| 40 Parameter(ConstructWithArrayLikeDescriptor::kArgumentsList); |
| 41 Node* context = Parameter(ConstructWithArrayLikeDescriptor::kContext); |
| 42 CallOrConstructWithArrayLike(target, new_target, arguments_list, context); |
27 } | 43 } |
28 | 44 |
29 typedef compiler::Node Node; | 45 typedef compiler::Node Node; |
30 | 46 |
31 Node* ConstructorBuiltinsAssembler::CopyFixedArrayBase(Node* fixed_array) { | 47 Node* ConstructorBuiltinsAssembler::CopyFixedArrayBase(Node* fixed_array) { |
32 Label if_fixed_array(this), if_fixed_double_array(this), done(this); | 48 Label if_fixed_array(this), if_fixed_double_array(this), done(this); |
33 VARIABLE(result, MachineRepresentation::kTagged); | 49 VARIABLE(result, MachineRepresentation::kTagged); |
34 Node* capacity = LoadAndUntagFixedArrayBaseLength(fixed_array); | 50 Node* capacity = LoadAndUntagFixedArrayBaseLength(fixed_array); |
35 Branch(IsFixedDoubleArrayMap(LoadMap(fixed_array)), &if_fixed_double_array, | 51 Branch(IsFixedDoubleArrayMap(LoadMap(fixed_array)), &if_fixed_double_array, |
36 &if_fixed_array); | 52 &if_fixed_array); |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 Node* boilerplate_description = | 796 Node* boilerplate_description = |
781 Parameter(Descriptor::kBoilerplateDescription); | 797 Parameter(Descriptor::kBoilerplateDescription); |
782 Node* flags = Parameter(Descriptor::kFlags); | 798 Node* flags = Parameter(Descriptor::kFlags); |
783 Node* context = Parameter(Descriptor::kContext); | 799 Node* context = Parameter(Descriptor::kContext); |
784 TailCallRuntime(Runtime::kCreateObjectLiteral, context, closure, | 800 TailCallRuntime(Runtime::kCreateObjectLiteral, context, closure, |
785 literals_index, boilerplate_description, flags); | 801 literals_index, boilerplate_description, flags); |
786 } | 802 } |
787 | 803 |
788 } // namespace internal | 804 } // namespace internal |
789 } // namespace v8 | 805 } // namespace v8 |
OLD | NEW |