| Index: runtime/vm/intrinsifier_x64.cc
|
| ===================================================================
|
| --- runtime/vm/intrinsifier_x64.cc (revision 40250)
|
| +++ runtime/vm/intrinsifier_x64.cc (working copy)
|
| @@ -237,8 +237,8 @@
|
| __ leaq(RDI, Address(RDI, scale_factor, fixed_size)); \
|
| __ andq(RDI, Immediate(-kObjectAlignment)); \
|
| Heap* heap = Isolate::Current()->heap(); \
|
| - \
|
| - __ movq(RAX, Immediate(heap->TopAddress())); \
|
| + Heap::Space space = heap->SpaceForAllocation(cid); \
|
| + __ movq(RAX, Immediate(heap->TopAddress(space))); \
|
| __ movq(RAX, Address(RAX, 0)); \
|
| __ movq(RCX, RAX); \
|
| \
|
| @@ -251,16 +251,16 @@
|
| /* RCX: potential next object start. */ \
|
| /* RDI: allocation size. */ \
|
| /* R13: scratch register. */ \
|
| - __ movq(R13, Immediate(heap->EndAddress())); \
|
| + __ movq(R13, Immediate(heap->EndAddress(space))); \
|
| __ cmpq(RCX, Address(R13, 0)); \
|
| __ j(ABOVE_EQUAL, &fall_through); \
|
| \
|
| /* Successfully allocated the object(s), now update top to point to */ \
|
| /* next object start and initialize the object. */ \
|
| - __ movq(R13, Immediate(heap->TopAddress())); \
|
| + __ movq(R13, Immediate(heap->TopAddress(space))); \
|
| __ movq(Address(R13, 0), RCX); \
|
| __ addq(RAX, Immediate(kHeapObjectTag)); \
|
| - __ UpdateAllocationStatsWithSize(cid, RDI); \
|
| + __ UpdateAllocationStatsWithSize(cid, RDI, space); \
|
| /* Initialize the tags. */ \
|
| /* RAX: new object start as a tagged pointer. */ \
|
| /* RCX: new object end address. */ \
|
| @@ -1306,8 +1306,8 @@
|
|
|
| Isolate* isolate = Isolate::Current();
|
| Heap* heap = isolate->heap();
|
| -
|
| - __ movq(RAX, Immediate(heap->TopAddress()));
|
| + Heap::Space space = heap->SpaceForAllocation(kOneByteStringCid);
|
| + __ movq(RAX, Immediate(heap->TopAddress(space)));
|
| __ movq(RAX, Address(RAX, 0));
|
|
|
| // RDI: allocation size.
|
| @@ -1319,16 +1319,16 @@
|
| // RAX: potential new object start.
|
| // RCX: potential next object start.
|
| // RDI: allocation size.
|
| - __ movq(R13, Immediate(heap->EndAddress()));
|
| + __ movq(R13, Immediate(heap->EndAddress(space)));
|
| __ cmpq(RCX, Address(R13, 0));
|
| __ j(ABOVE_EQUAL, &pop_and_fail);
|
|
|
| // Successfully allocated the object(s), now update top to point to
|
| // next object start and initialize the object.
|
| - __ movq(R13, Immediate(heap->TopAddress()));
|
| + __ movq(R13, Immediate(heap->TopAddress(space)));
|
| __ movq(Address(R13, 0), RCX);
|
| __ addq(RAX, Immediate(kHeapObjectTag));
|
| - __ UpdateAllocationStatsWithSize(kOneByteStringCid, RDI);
|
| + __ UpdateAllocationStatsWithSize(kOneByteStringCid, RDI, space);
|
|
|
| // Initialize the tags.
|
| // RAX: new object start as a tagged pointer.
|
|
|