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

Side by Side Diff: src/builtins/builtins-typedarray-gen.cc

Issue 2784253002: MIPS: Fix `[builtins] Reland of Port TypedArrayInitialize to CodeStubAssembler.` (Closed)
Patch Set: Fix failure on CSA bot Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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-utils-gen.h" 5 #include "src/builtins/builtins-utils-gen.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-stub-assembler.h" 7 #include "src/code-stub-assembler.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 Node* header_size = IntPtrConstant(FixedTypedArrayBase::kHeaderSize); 220 Node* header_size = IntPtrConstant(FixedTypedArrayBase::kHeaderSize);
221 total_size.Bind(IntPtrAdd(SmiToWord(byte_length), header_size)); 221 total_size.Bind(IntPtrAdd(SmiToWord(byte_length), header_size));
222 Goto(&allocate_elements); 222 Goto(&allocate_elements);
223 } 223 }
224 224
225 Bind(&allocate_elements); 225 Bind(&allocate_elements);
226 { 226 {
227 // Allocate a FixedTypedArray and set the length, base pointer and external 227 // Allocate a FixedTypedArray and set the length, base pointer and external
228 // pointer. 228 // pointer.
229 CSA_ASSERT(this, IsRegularHeapObjectSize(total_size.value())); 229 CSA_ASSERT(this, IsRegularHeapObjectSize(total_size.value()));
230 Node* elements = Allocate(total_size.value()); 230 Node* elements = AllocateInNewSpace(total_size.value(), kDoubleAlignment);
231 231
232 StoreMapNoWriteBarrier(elements, fixed_typed_map.value()); 232 StoreMapNoWriteBarrier(elements, fixed_typed_map.value());
233 StoreObjectFieldNoWriteBarrier(elements, FixedArray::kLengthOffset, length); 233 StoreObjectFieldNoWriteBarrier(elements, FixedArray::kLengthOffset, length);
234 StoreObjectFieldNoWriteBarrier( 234 StoreObjectFieldNoWriteBarrier(
235 elements, FixedTypedArrayBase::kBasePointerOffset, elements); 235 elements, FixedTypedArrayBase::kBasePointerOffset, elements);
236 StoreObjectFieldNoWriteBarrier(elements, 236 StoreObjectFieldNoWriteBarrier(elements,
237 FixedTypedArrayBase::kExternalPointerOffset, 237 FixedTypedArrayBase::kExternalPointerOffset,
238 IntPtrConstant(fta_base_data_offset), 238 IntPtrConstant(fta_base_data_offset),
239 MachineType::PointerRepresentation()); 239 MachineType::PointerRepresentation());
240 240
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 // ES6 #sec-%typedarray%.prototype.keys 654 // ES6 #sec-%typedarray%.prototype.keys
655 TF_BUILTIN(TypedArrayPrototypeKeys, TypedArrayBuiltinsAssembler) { 655 TF_BUILTIN(TypedArrayPrototypeKeys, TypedArrayBuiltinsAssembler) {
656 Node* context = Parameter(Descriptor::kContext); 656 Node* context = Parameter(Descriptor::kContext);
657 Node* receiver = Parameter(Descriptor::kReceiver); 657 Node* receiver = Parameter(Descriptor::kReceiver);
658 GenerateTypedArrayPrototypeIterationMethod( 658 GenerateTypedArrayPrototypeIterationMethod(
659 context, receiver, "%TypedArray%.prototype.keys()", IterationKind::kKeys); 659 context, receiver, "%TypedArray%.prototype.keys()", IterationKind::kKeys);
660 } 660 }
661 661
662 } // namespace internal 662 } // namespace internal
663 } // namespace v8 663 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698