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.h" | 5 #include "src/builtins/builtins.h" |
6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
7 #include "src/interface-descriptors.h" | 7 #include "src/interface-descriptors.h" |
8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 Node* target = assembler->AllocateFixedArray(kind, length, mode); | 85 Node* target = assembler->AllocateFixedArray(kind, length, mode); |
86 assembler->CopyFixedArrayElements(kind, source, target, length, | 86 assembler->CopyFixedArrayElements(kind, source, target, length, |
87 SKIP_WRITE_BARRIER, mode); | 87 SKIP_WRITE_BARRIER, mode); |
88 assembler->StoreObjectField(object, JSObject::kElementsOffset, target); | 88 assembler->StoreObjectField(object, JSObject::kElementsOffset, target); |
89 assembler->Return(target); | 89 assembler->Return(target); |
90 } | 90 } |
91 | 91 |
92 assembler->Bind(&if_oldspace); | 92 assembler->Bind(&if_oldspace); |
93 { | 93 { |
94 Node* target = assembler->AllocateFixedArray( | 94 Node* target = assembler->AllocateFixedArray( |
95 kind, length, mode, compiler::CodeAssembler::kPretenured); | 95 kind, length, mode, CodeStubAssembler::kPretenured); |
96 assembler->CopyFixedArrayElements(kind, source, target, length, | 96 assembler->CopyFixedArrayElements(kind, source, target, length, |
97 UPDATE_WRITE_BARRIER, mode); | 97 UPDATE_WRITE_BARRIER, mode); |
98 assembler->StoreObjectField(object, JSObject::kElementsOffset, target); | 98 assembler->StoreObjectField(object, JSObject::kElementsOffset, target); |
99 assembler->Return(target); | 99 assembler->Return(target); |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 void Builtins::Generate_GrowFastDoubleElements(CodeStubAssembler* assembler) { | 103 void Builtins::Generate_GrowFastDoubleElements(CodeStubAssembler* assembler) { |
104 typedef CodeStubAssembler::Label Label; | 104 typedef CodeStubAssembler::Label Label; |
105 typedef compiler::Node Node; | 105 typedef compiler::Node Node; |
(...skipping 30 matching lines...) Expand all Loading... |
136 context, elements, FAST_ELEMENTS, key, &runtime); | 136 context, elements, FAST_ELEMENTS, key, &runtime); |
137 assembler->StoreObjectField(object, JSObject::kElementsOffset, elements); | 137 assembler->StoreObjectField(object, JSObject::kElementsOffset, elements); |
138 assembler->Return(elements); | 138 assembler->Return(elements); |
139 | 139 |
140 assembler->Bind(&runtime); | 140 assembler->Bind(&runtime); |
141 assembler->TailCallRuntime(Runtime::kGrowArrayElements, context, object, key); | 141 assembler->TailCallRuntime(Runtime::kGrowArrayElements, context, object, key); |
142 } | 142 } |
143 | 143 |
144 } // namespace internal | 144 } // namespace internal |
145 } // namespace v8 | 145 } // namespace v8 |
OLD | NEW |