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

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

Issue 2028633002: Provide a tagged allocation top pointer. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update 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
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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after
4616 4616
4617 // Fall back to runtime if the target differs from the new target's 4617 // Fall back to runtime if the target differs from the new target's
4618 // initial map constructor. 4618 // initial map constructor.
4619 __ ld(a0, FieldMemOperand(a2, Map::kConstructorOrBackPointerOffset)); 4619 __ ld(a0, FieldMemOperand(a2, Map::kConstructorOrBackPointerOffset));
4620 __ Branch(&new_object, ne, a0, Operand(a1)); 4620 __ Branch(&new_object, ne, a0, Operand(a1));
4621 4621
4622 // Allocate the JSObject on the heap. 4622 // Allocate the JSObject on the heap.
4623 Label allocate, done_allocate; 4623 Label allocate, done_allocate;
4624 __ lbu(a4, FieldMemOperand(a2, Map::kInstanceSizeOffset)); 4624 __ lbu(a4, FieldMemOperand(a2, Map::kInstanceSizeOffset));
4625 __ Allocate(a4, v0, a5, a0, &allocate, SIZE_IN_WORDS); 4625 __ Allocate(a4, v0, a5, a0, &allocate, SIZE_IN_WORDS);
4626 __ Dsubu(a5, a5, Operand(kHeapObjectTag)); // Untag result end
4626 __ bind(&done_allocate); 4627 __ bind(&done_allocate);
4627 4628
4628 // Initialize the JSObject fields. 4629 // Initialize the JSObject fields.
4629 __ sd(a2, FieldMemOperand(v0, JSObject::kMapOffset)); 4630 __ sd(a2, FieldMemOperand(v0, JSObject::kMapOffset));
4630 __ LoadRoot(a3, Heap::kEmptyFixedArrayRootIndex); 4631 __ LoadRoot(a3, Heap::kEmptyFixedArrayRootIndex);
4631 __ sd(a3, FieldMemOperand(v0, JSObject::kPropertiesOffset)); 4632 __ sd(a3, FieldMemOperand(v0, JSObject::kPropertiesOffset));
4632 __ sd(a3, FieldMemOperand(v0, JSObject::kElementsOffset)); 4633 __ sd(a3, FieldMemOperand(v0, JSObject::kElementsOffset));
4633 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize); 4634 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
4634 __ Daddu(a1, v0, Operand(JSObject::kHeaderSize - kHeapObjectTag)); 4635 __ Daddu(a1, v0, Operand(JSObject::kHeaderSize - kHeapObjectTag));
4635 4636
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
4761 __ bind(&no_rest_parameters); 4762 __ bind(&no_rest_parameters);
4762 { 4763 {
4763 // ----------- S t a t e ------------- 4764 // ----------- S t a t e -------------
4764 // -- cp : context 4765 // -- cp : context
4765 // -- ra : return address 4766 // -- ra : return address
4766 // ----------------------------------- 4767 // -----------------------------------
4767 4768
4768 // Allocate an empty rest parameter array. 4769 // Allocate an empty rest parameter array.
4769 Label allocate, done_allocate; 4770 Label allocate, done_allocate;
4770 __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, NO_ALLOCATION_FLAGS); 4771 __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, NO_ALLOCATION_FLAGS);
4772 __ Dsubu(a0, a0, Operand(kHeapObjectTag)); // Untag result end.
4771 __ bind(&done_allocate); 4773 __ bind(&done_allocate);
4772 4774
4773 // Setup the rest parameter array in v0. 4775 // Setup the rest parameter array in v0.
4774 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, a1); 4776 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, a1);
4775 __ sd(a1, FieldMemOperand(v0, JSArray::kMapOffset)); 4777 __ sd(a1, FieldMemOperand(v0, JSArray::kMapOffset));
4776 __ LoadRoot(a1, Heap::kEmptyFixedArrayRootIndex); 4778 __ LoadRoot(a1, Heap::kEmptyFixedArrayRootIndex);
4777 __ sd(a1, FieldMemOperand(v0, JSArray::kPropertiesOffset)); 4779 __ sd(a1, FieldMemOperand(v0, JSArray::kPropertiesOffset));
4778 __ sd(a1, FieldMemOperand(v0, JSArray::kElementsOffset)); 4780 __ sd(a1, FieldMemOperand(v0, JSArray::kElementsOffset));
4779 __ Move(a1, Smi::FromInt(0)); 4781 __ Move(a1, Smi::FromInt(0));
4780 __ Ret(USE_DELAY_SLOT); 4782 __ Ret(USE_DELAY_SLOT);
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5659 kStackUnwindSpace, kInvalidStackOffset, 5661 kStackUnwindSpace, kInvalidStackOffset,
5660 return_value_operand, NULL); 5662 return_value_operand, NULL);
5661 } 5663 }
5662 5664
5663 #undef __ 5665 #undef __
5664 5666
5665 } // namespace internal 5667 } // namespace internal
5666 } // namespace v8 5668 } // namespace v8
5667 5669
5668 #endif // V8_TARGET_ARCH_MIPS64 5670 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698