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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 2035413003: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4405 matching lines...) Expand 10 before | Expand all | Expand 10 after
4416 // Fall back to runtime if the target differs from the new target's 4416 // Fall back to runtime if the target differs from the new target's
4417 // initial map constructor. 4417 // initial map constructor.
4418 __ ldr(r0, FieldMemOperand(r2, Map::kConstructorOrBackPointerOffset)); 4418 __ ldr(r0, FieldMemOperand(r2, Map::kConstructorOrBackPointerOffset));
4419 __ cmp(r0, r1); 4419 __ cmp(r0, r1);
4420 __ b(ne, &new_object); 4420 __ b(ne, &new_object);
4421 4421
4422 // Allocate the JSObject on the heap. 4422 // Allocate the JSObject on the heap.
4423 Label allocate, done_allocate; 4423 Label allocate, done_allocate;
4424 __ ldrb(r4, FieldMemOperand(r2, Map::kInstanceSizeOffset)); 4424 __ ldrb(r4, FieldMemOperand(r2, Map::kInstanceSizeOffset));
4425 __ Allocate(r4, r0, r5, r6, &allocate, SIZE_IN_WORDS); 4425 __ Allocate(r4, r0, r5, r6, &allocate, SIZE_IN_WORDS);
4426 __ sub(r5, r5, Operand(kHeapObjectTag)); // Untag result end.
4427 __ bind(&done_allocate); 4426 __ bind(&done_allocate);
4428 4427
4429 // Initialize the JSObject fields. 4428 // Initialize the JSObject fields.
4430 __ str(r2, FieldMemOperand(r0, JSObject::kMapOffset)); 4429 __ str(r2, FieldMemOperand(r0, JSObject::kMapOffset));
4431 __ LoadRoot(r3, Heap::kEmptyFixedArrayRootIndex); 4430 __ LoadRoot(r3, Heap::kEmptyFixedArrayRootIndex);
4432 __ str(r3, FieldMemOperand(r0, JSObject::kPropertiesOffset)); 4431 __ str(r3, FieldMemOperand(r0, JSObject::kPropertiesOffset));
4433 __ str(r3, FieldMemOperand(r0, JSObject::kElementsOffset)); 4432 __ str(r3, FieldMemOperand(r0, JSObject::kElementsOffset));
4434 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize); 4433 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
4435 __ add(r1, r0, Operand(JSObject::kHeaderSize - kHeapObjectTag)); 4434 __ add(r1, r0, Operand(JSObject::kHeaderSize - kHeapObjectTag));
4436 4435
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
4557 __ bind(&no_rest_parameters); 4556 __ bind(&no_rest_parameters);
4558 { 4557 {
4559 // ----------- S t a t e ------------- 4558 // ----------- S t a t e -------------
4560 // -- cp : context 4559 // -- cp : context
4561 // -- lr : return address 4560 // -- lr : return address
4562 // ----------------------------------- 4561 // -----------------------------------
4563 4562
4564 // Allocate an empty rest parameter array. 4563 // Allocate an empty rest parameter array.
4565 Label allocate, done_allocate; 4564 Label allocate, done_allocate;
4566 __ Allocate(JSArray::kSize, r0, r1, r2, &allocate, NO_ALLOCATION_FLAGS); 4565 __ Allocate(JSArray::kSize, r0, r1, r2, &allocate, NO_ALLOCATION_FLAGS);
4567 __ sub(r1, r1, Operand(kHeapObjectTag)); // Untag result end.
4568 __ bind(&done_allocate); 4566 __ bind(&done_allocate);
4569 4567
4570 // Setup the rest parameter array in r0. 4568 // Setup the rest parameter array in r0.
4571 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, r1); 4569 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, r1);
4572 __ str(r1, FieldMemOperand(r0, JSArray::kMapOffset)); 4570 __ str(r1, FieldMemOperand(r0, JSArray::kMapOffset));
4573 __ LoadRoot(r1, Heap::kEmptyFixedArrayRootIndex); 4571 __ LoadRoot(r1, Heap::kEmptyFixedArrayRootIndex);
4574 __ str(r1, FieldMemOperand(r0, JSArray::kPropertiesOffset)); 4572 __ str(r1, FieldMemOperand(r0, JSArray::kPropertiesOffset));
4575 __ str(r1, FieldMemOperand(r0, JSArray::kElementsOffset)); 4573 __ str(r1, FieldMemOperand(r0, JSArray::kElementsOffset));
4576 __ mov(r1, Operand(0)); 4574 __ mov(r1, Operand(0));
4577 __ str(r1, FieldMemOperand(r0, JSArray::kLengthOffset)); 4575 __ str(r1, FieldMemOperand(r0, JSArray::kLengthOffset));
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
5440 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5438 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5441 kStackUnwindSpace, NULL, return_value_operand, NULL); 5439 kStackUnwindSpace, NULL, return_value_operand, NULL);
5442 } 5440 }
5443 5441
5444 #undef __ 5442 #undef __
5445 5443
5446 } // namespace internal 5444 } // namespace internal
5447 } // namespace v8 5445 } // namespace v8
5448 5446
5449 #endif // V8_TARGET_ARCH_ARM 5447 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698