Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 33ff9aba644d954e88037688183a8327add75287..271c6d8cd5d7ef94f227ac8ba876402ac1ed83be 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3002,13 +3002,12 @@ void MacroAssembler::Allocate(int object_size, |
} |
-void MacroAssembler::AllocateInNewSpace(Register object_size, |
- Register result, |
- Register scratch1, |
- Register scratch2, |
- Label* gc_required, |
- AllocationFlags flags) { |
- ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0); |
+void MacroAssembler::Allocate(Register object_size, |
+ Register result, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* gc_required, |
+ AllocationFlags flags) { |
if (!FLAG_inline_new) { |
if (emit_debug_code()) { |
// Trash the registers to simulate an allocation failure. |
@@ -3029,19 +3028,19 @@ void MacroAssembler::AllocateInNewSpace(Register object_size, |
// Check relative positions of allocation top and limit addresses. |
// ARM adds additional checks to make sure the ldm instruction can be |
// used. On MIPS we don't have ldm so we don't need additional checks either. |
- ExternalReference new_space_allocation_top = |
- ExternalReference::new_space_allocation_top_address(isolate()); |
- ExternalReference new_space_allocation_limit = |
- ExternalReference::new_space_allocation_limit_address(isolate()); |
+ ExternalReference allocation_top = |
+ AllocationUtils::GetAllocationTopReference(isolate(), flags); |
+ ExternalReference allocation_limit = |
+ AllocationUtils::GetAllocationLimitReference(isolate(), flags); |
intptr_t top = |
- reinterpret_cast<intptr_t>(new_space_allocation_top.address()); |
+ reinterpret_cast<intptr_t>(allocation_top.address()); |
intptr_t limit = |
- reinterpret_cast<intptr_t>(new_space_allocation_limit.address()); |
+ reinterpret_cast<intptr_t>(allocation_limit.address()); |
ASSERT((limit - top) == kPointerSize); |
// Set up allocation top address and object size registers. |
Register topaddr = scratch1; |
- li(topaddr, Operand(new_space_allocation_top)); |
+ li(topaddr, Operand(allocation_top)); |
// This code stores a temporary value in t9. |
if ((flags & RESULT_CONTAINS_TOP) == 0) { |
@@ -3120,12 +3119,12 @@ void MacroAssembler::AllocateTwoByteString(Register result, |
And(scratch1, scratch1, Operand(~kObjectAlignmentMask)); |
// Allocate two-byte string in new space. |
- AllocateInNewSpace(scratch1, |
- result, |
- scratch2, |
- scratch3, |
- gc_required, |
- TAG_OBJECT); |
+ Allocate(scratch1, |
+ result, |
+ scratch2, |
+ scratch3, |
+ gc_required, |
+ TAG_OBJECT); |
// Set the map, length and hash field. |
InitializeNewString(result, |
@@ -3150,12 +3149,12 @@ void MacroAssembler::AllocateAsciiString(Register result, |
And(scratch1, scratch1, Operand(~kObjectAlignmentMask)); |
// Allocate ASCII string in new space. |
- AllocateInNewSpace(scratch1, |
- result, |
- scratch2, |
- scratch3, |
- gc_required, |
- TAG_OBJECT); |
+ Allocate(scratch1, |
+ result, |
+ scratch2, |
+ scratch3, |
+ gc_required, |
+ TAG_OBJECT); |
// Set the map, length and hash field. |
InitializeNewString(result, |