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

Side by Side Diff: src/mips/code-stubs-mips.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/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 4592 matching lines...) Expand 10 before | Expand all | Expand 10 after
4603 4603
4604 // Fall back to runtime if the target differs from the new target's 4604 // Fall back to runtime if the target differs from the new target's
4605 // initial map constructor. 4605 // initial map constructor.
4606 __ lw(a0, FieldMemOperand(a2, Map::kConstructorOrBackPointerOffset)); 4606 __ lw(a0, FieldMemOperand(a2, Map::kConstructorOrBackPointerOffset));
4607 __ Branch(&new_object, ne, a0, Operand(a1)); 4607 __ Branch(&new_object, ne, a0, Operand(a1));
4608 4608
4609 // Allocate the JSObject on the heap. 4609 // Allocate the JSObject on the heap.
4610 Label allocate, done_allocate; 4610 Label allocate, done_allocate;
4611 __ lbu(t0, FieldMemOperand(a2, Map::kInstanceSizeOffset)); 4611 __ lbu(t0, FieldMemOperand(a2, Map::kInstanceSizeOffset));
4612 __ Allocate(t0, v0, t1, a0, &allocate, SIZE_IN_WORDS); 4612 __ Allocate(t0, v0, t1, a0, &allocate, SIZE_IN_WORDS);
4613 __ Subu(t1, t1, Operand(kHeapObjectTag)); // Untag result end.
4614 __ bind(&done_allocate); 4613 __ bind(&done_allocate);
4615 4614
4616 // Initialize the JSObject fields. 4615 // Initialize the JSObject fields.
4617 __ sw(a2, FieldMemOperand(v0, JSObject::kMapOffset)); 4616 __ sw(a2, FieldMemOperand(v0, JSObject::kMapOffset));
4618 __ LoadRoot(a3, Heap::kEmptyFixedArrayRootIndex); 4617 __ LoadRoot(a3, Heap::kEmptyFixedArrayRootIndex);
4619 __ sw(a3, FieldMemOperand(v0, JSObject::kPropertiesOffset)); 4618 __ sw(a3, FieldMemOperand(v0, JSObject::kPropertiesOffset));
4620 __ sw(a3, FieldMemOperand(v0, JSObject::kElementsOffset)); 4619 __ sw(a3, FieldMemOperand(v0, JSObject::kElementsOffset));
4621 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize); 4620 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
4622 __ Addu(a1, v0, Operand(JSObject::kHeaderSize - kHeapObjectTag)); 4621 __ Addu(a1, v0, Operand(JSObject::kHeaderSize - kHeapObjectTag));
4623 4622
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
4747 __ bind(&no_rest_parameters); 4746 __ bind(&no_rest_parameters);
4748 { 4747 {
4749 // ----------- S t a t e ------------- 4748 // ----------- S t a t e -------------
4750 // -- cp : context 4749 // -- cp : context
4751 // -- ra : return address 4750 // -- ra : return address
4752 // ----------------------------------- 4751 // -----------------------------------
4753 4752
4754 // Allocate an empty rest parameter array. 4753 // Allocate an empty rest parameter array.
4755 Label allocate, done_allocate; 4754 Label allocate, done_allocate;
4756 __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, NO_ALLOCATION_FLAGS); 4755 __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, NO_ALLOCATION_FLAGS);
4757 __ Subu(a0, a0, Operand(kHeapObjectTag)); // Untag result end.
4758 __ bind(&done_allocate); 4756 __ bind(&done_allocate);
4759 4757
4760 // Setup the rest parameter array in v0. 4758 // Setup the rest parameter array in v0.
4761 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, a1); 4759 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, a1);
4762 __ sw(a1, FieldMemOperand(v0, JSArray::kMapOffset)); 4760 __ sw(a1, FieldMemOperand(v0, JSArray::kMapOffset));
4763 __ LoadRoot(a1, Heap::kEmptyFixedArrayRootIndex); 4761 __ LoadRoot(a1, Heap::kEmptyFixedArrayRootIndex);
4764 __ sw(a1, FieldMemOperand(v0, JSArray::kPropertiesOffset)); 4762 __ sw(a1, FieldMemOperand(v0, JSArray::kPropertiesOffset));
4765 __ sw(a1, FieldMemOperand(v0, JSArray::kElementsOffset)); 4763 __ sw(a1, FieldMemOperand(v0, JSArray::kElementsOffset));
4766 __ Move(a1, Smi::FromInt(0)); 4764 __ Move(a1, Smi::FromInt(0));
4767 __ Ret(USE_DELAY_SLOT); 4765 __ Ret(USE_DELAY_SLOT);
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
5626 kStackUnwindSpace, kInvalidStackOffset, 5624 kStackUnwindSpace, kInvalidStackOffset,
5627 return_value_operand, NULL); 5625 return_value_operand, NULL);
5628 } 5626 }
5629 5627
5630 #undef __ 5628 #undef __
5631 5629
5632 } // namespace internal 5630 } // namespace internal
5633 } // namespace v8 5631 } // namespace v8
5634 5632
5635 #endif // V8_TARGET_ARCH_MIPS 5633 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698