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

Side by Side Diff: src/arm64/code-stubs-arm64.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 | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4677 matching lines...) Expand 10 before | Expand all | Expand 10 after
4688 4688
4689 // Fall back to runtime if the target differs from the new target's 4689 // Fall back to runtime if the target differs from the new target's
4690 // initial map constructor. 4690 // initial map constructor.
4691 __ Ldr(x0, FieldMemOperand(x2, Map::kConstructorOrBackPointerOffset)); 4691 __ Ldr(x0, FieldMemOperand(x2, Map::kConstructorOrBackPointerOffset));
4692 __ CompareAndBranch(x0, x1, ne, &new_object); 4692 __ CompareAndBranch(x0, x1, ne, &new_object);
4693 4693
4694 // Allocate the JSObject on the heap. 4694 // Allocate the JSObject on the heap.
4695 Label allocate, done_allocate; 4695 Label allocate, done_allocate;
4696 __ Ldrb(x4, FieldMemOperand(x2, Map::kInstanceSizeOffset)); 4696 __ Ldrb(x4, FieldMemOperand(x2, Map::kInstanceSizeOffset));
4697 __ Allocate(x4, x0, x5, x6, &allocate, SIZE_IN_WORDS); 4697 __ Allocate(x4, x0, x5, x6, &allocate, SIZE_IN_WORDS);
4698 __ Sub(x5, x5, Operand(kHeapObjectTag)); // Untag result end.
4699 __ Bind(&done_allocate); 4698 __ Bind(&done_allocate);
4700 4699
4701 // Initialize the JSObject fields. 4700 // Initialize the JSObject fields.
4702 STATIC_ASSERT(JSObject::kMapOffset == 0 * kPointerSize); 4701 STATIC_ASSERT(JSObject::kMapOffset == 0 * kPointerSize);
4703 __ Str(x2, FieldMemOperand(x0, JSObject::kMapOffset)); 4702 __ Str(x2, FieldMemOperand(x0, JSObject::kMapOffset));
4704 __ LoadRoot(x3, Heap::kEmptyFixedArrayRootIndex); 4703 __ LoadRoot(x3, Heap::kEmptyFixedArrayRootIndex);
4705 STATIC_ASSERT(JSObject::kPropertiesOffset == 1 * kPointerSize); 4704 STATIC_ASSERT(JSObject::kPropertiesOffset == 1 * kPointerSize);
4706 STATIC_ASSERT(JSObject::kElementsOffset == 2 * kPointerSize); 4705 STATIC_ASSERT(JSObject::kElementsOffset == 2 * kPointerSize);
4707 __ Str(x3, FieldMemOperand(x0, JSObject::kPropertiesOffset)); 4706 __ Str(x3, FieldMemOperand(x0, JSObject::kPropertiesOffset));
4708 __ Str(x3, FieldMemOperand(x0, JSObject::kElementsOffset)); 4707 __ Str(x3, FieldMemOperand(x0, JSObject::kElementsOffset));
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 __ Bind(&no_rest_parameters); 4835 __ Bind(&no_rest_parameters);
4837 { 4836 {
4838 // ----------- S t a t e ------------- 4837 // ----------- S t a t e -------------
4839 // -- cp : context 4838 // -- cp : context
4840 // -- lr : return address 4839 // -- lr : return address
4841 // ----------------------------------- 4840 // -----------------------------------
4842 4841
4843 // Allocate an empty rest parameter array. 4842 // Allocate an empty rest parameter array.
4844 Label allocate, done_allocate; 4843 Label allocate, done_allocate;
4845 __ Allocate(JSArray::kSize, x0, x1, x2, &allocate, NO_ALLOCATION_FLAGS); 4844 __ Allocate(JSArray::kSize, x0, x1, x2, &allocate, NO_ALLOCATION_FLAGS);
4846 __ Sub(x1, x1, Operand(kHeapObjectTag)); // Untag result end.
4847 __ Bind(&done_allocate); 4845 __ Bind(&done_allocate);
4848 4846
4849 // Setup the rest parameter array in x0. 4847 // Setup the rest parameter array in x0.
4850 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, x1); 4848 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, x1);
4851 __ Str(x1, FieldMemOperand(x0, JSArray::kMapOffset)); 4849 __ Str(x1, FieldMemOperand(x0, JSArray::kMapOffset));
4852 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex); 4850 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex);
4853 __ Str(x1, FieldMemOperand(x0, JSArray::kPropertiesOffset)); 4851 __ Str(x1, FieldMemOperand(x0, JSArray::kPropertiesOffset));
4854 __ Str(x1, FieldMemOperand(x0, JSArray::kElementsOffset)); 4852 __ Str(x1, FieldMemOperand(x0, JSArray::kElementsOffset));
4855 __ Mov(x1, Smi::FromInt(0)); 4853 __ Mov(x1, Smi::FromInt(0));
4856 __ Str(x1, FieldMemOperand(x0, JSArray::kLengthOffset)); 4854 __ Str(x1, FieldMemOperand(x0, JSArray::kLengthOffset));
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 kStackUnwindSpace, NULL, spill_offset, 5834 kStackUnwindSpace, NULL, spill_offset,
5837 return_value_operand, NULL); 5835 return_value_operand, NULL);
5838 } 5836 }
5839 5837
5840 #undef __ 5838 #undef __
5841 5839
5842 } // namespace internal 5840 } // namespace internal
5843 } // namespace v8 5841 } // namespace v8
5844 5842
5845 #endif // V8_TARGET_ARCH_ARM64 5843 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698