Index: runtime/vm/stub_code_arm.cc |
=================================================================== |
--- runtime/vm/stub_code_arm.cc (revision 40250) |
+++ runtime/vm/stub_code_arm.cc (working copy) |
@@ -637,8 +637,8 @@ |
Isolate* isolate = Isolate::Current(); |
Heap* heap = isolate->heap(); |
- |
- __ LoadImmediate(R6, heap->TopAddress()); |
+ Heap::Space space = heap->SpaceForAllocation(kArrayCid); |
+ __ LoadImmediate(R6, heap->TopAddress(space)); |
__ ldr(R0, Address(R6, 0)); // Potential new object start. |
__ adds(R7, R0, Operand(R8)); // Potential next object start. |
__ b(&slow_case, VS); |
@@ -647,7 +647,7 @@ |
// R0: potential new object start. |
// R7: potential next object start. |
// R8: allocation size. |
- __ LoadImmediate(R3, heap->EndAddress()); |
+ __ LoadImmediate(R3, heap->EndAddress(space)); |
__ ldr(R3, Address(R3, 0)); |
__ cmp(R7, Operand(R3)); |
__ b(&slow_case, CS); |
@@ -656,7 +656,7 @@ |
// next object start and initialize the object. |
__ str(R7, Address(R6, 0)); |
__ add(R0, R0, Operand(kHeapObjectTag)); |
- __ UpdateAllocationStatsWithSize(kArrayCid, R8, R4); |
+ __ UpdateAllocationStatsWithSize(kArrayCid, R8, R4, space); |
// Initialize the tags. |
// R0: new object start as a tagged pointer. |
@@ -884,7 +884,9 @@ |
// Now allocate the object. |
// R1: number of context variables. |
// R2: object size. |
- __ LoadImmediate(R5, heap->TopAddress()); |
+ intptr_t cid = context_class.id(); |
+ Heap::Space space = heap->SpaceForAllocation(cid); |
+ __ LoadImmediate(R5, heap->TopAddress(space)); |
__ ldr(R0, Address(R5, 0)); |
__ add(R3, R2, Operand(R0)); |
// Check if the allocation fits into the remaining space. |
@@ -892,7 +894,7 @@ |
// R1: number of context variables. |
// R2: object size. |
// R3: potential next object start. |
- __ LoadImmediate(IP, heap->EndAddress()); |
+ __ LoadImmediate(IP, heap->EndAddress(space)); |
__ ldr(IP, Address(IP, 0)); |
__ cmp(R3, Operand(IP)); |
if (FLAG_use_slow_path) { |
@@ -909,7 +911,7 @@ |
// R3: next object start. |
__ str(R3, Address(R5, 0)); |
__ add(R0, R0, Operand(kHeapObjectTag)); |
- __ UpdateAllocationStatsWithSize(context_class.id(), R2, R5); |
+ __ UpdateAllocationStatsWithSize(cid, R2, R5, space); |
// Calculate the size tag. |
// R0: new object. |
@@ -923,7 +925,7 @@ |
// Get the class index and insert it into the tags. |
// R2: size and bit tags. |
- __ LoadImmediate(IP, RawObject::ClassIdTag::encode(context_class.id())); |
+ __ LoadImmediate(IP, RawObject::ClassIdTag::encode(cid)); |
__ orr(R2, R2, Operand(IP)); |
__ str(R2, FieldAddress(R0, Context::tags_offset())); |
@@ -1070,13 +1072,14 @@ |
// next object start and initialize the allocated object. |
// R1: instantiated type arguments (if is_cls_parameterized). |
Heap* heap = Isolate::Current()->heap(); |
- __ LoadImmediate(R5, heap->TopAddress()); |
+ Heap::Space space = heap->SpaceForAllocation(cls.id()); |
+ __ LoadImmediate(R5, heap->TopAddress(space)); |
__ ldr(R2, Address(R5, 0)); |
__ AddImmediate(R3, R2, instance_size); |
// Check if the allocation fits into the remaining space. |
// R2: potential new object start. |
// R3: potential next object start. |
- __ LoadImmediate(IP, heap->EndAddress()); |
+ __ LoadImmediate(IP, heap->EndAddress(space)); |
__ ldr(IP, Address(IP, 0)); |
__ cmp(R3, Operand(IP)); |
if (FLAG_use_slow_path) { |
@@ -1085,7 +1088,7 @@ |
__ b(&slow_case, CS); // Unsigned higher or equal. |
} |
__ str(R3, Address(R5, 0)); |
- __ UpdateAllocationStats(cls.id(), R5); |
+ __ UpdateAllocationStats(cls.id(), R5, space); |
// R2: new object start. |
// R3: next object start. |