| Index: runtime/vm/intrinsifier_x64.cc
|
| diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
|
| index 1fb4a004edf39e48d9fb1d271c879d300d364822..0eb7d64db820bac0bb14a78b0758f1c56a86746b 100644
|
| --- a/runtime/vm/intrinsifier_x64.cc
|
| +++ b/runtime/vm/intrinsifier_x64.cc
|
| @@ -166,9 +166,8 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
|
| sizeof(Raw##type_name) + kObjectAlignment - 1; \
|
| __ leaq(RDI, Address(RDI, scale_factor, fixed_size_plus_alignment_padding)); \
|
| __ andq(RDI, Immediate(-kObjectAlignment)); \
|
| - Heap::Space space = Heap::kNew; \
|
| - __ movq(R13, Address(THR, Thread::heap_offset())); \
|
| - __ movq(RAX, Address(R13, Heap::TopOffset(space))); \
|
| + NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); \
|
| + __ movq(RAX, Address(THR, Thread::top_offset())); \
|
| __ movq(RCX, RAX); \
|
| \
|
| /* RDI: allocation size. */ \
|
| @@ -179,13 +178,12 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
|
| /* RAX: potential new object start. */ \
|
| /* RCX: potential next object start. */ \
|
| /* RDI: allocation size. */ \
|
| - /* R13: heap. */ \
|
| - __ cmpq(RCX, Address(R13, Heap::EndOffset(space))); \
|
| + __ cmpq(RCX, Address(THR, Thread::end_offset())); \
|
| __ j(ABOVE_EQUAL, &fall_through); \
|
| \
|
| /* Successfully allocated the object(s), now update top to point to */ \
|
| /* next object start and initialize the object. */ \
|
| - __ movq(Address(R13, Heap::TopOffset(space)), RCX); \
|
| + __ movq(Address(THR, Thread::top_offset()), RCX); \
|
| __ addq(RAX, Immediate(kHeapObjectTag)); \
|
| NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, RDI, space)); \
|
| /* Initialize the tags. */ \
|
| @@ -1941,9 +1939,8 @@ static void TryAllocateOnebyteString(Assembler* assembler,
|
| __ andq(RDI, Immediate(-kObjectAlignment));
|
|
|
| const intptr_t cid = kOneByteStringCid;
|
| - Heap::Space space = Heap::kNew;
|
| - __ movq(R13, Address(THR, Thread::heap_offset()));
|
| - __ movq(RAX, Address(R13, Heap::TopOffset(space)));
|
| + NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
|
| + __ movq(RAX, Address(THR, Thread::top_offset()));
|
|
|
| // RDI: allocation size.
|
| __ movq(RCX, RAX);
|
| @@ -1954,13 +1951,12 @@ static void TryAllocateOnebyteString(Assembler* assembler,
|
| // RAX: potential new object start.
|
| // RCX: potential next object start.
|
| // RDI: allocation size.
|
| - // R13: heap.
|
| - __ cmpq(RCX, Address(R13, Heap::EndOffset(space)));
|
| + __ cmpq(RCX, Address(THR, Thread::end_offset()));
|
| __ 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(Address(R13, Heap::TopOffset(space)), RCX);
|
| + __ movq(Address(THR, Thread::top_offset()), RCX);
|
| __ addq(RAX, Immediate(kHeapObjectTag));
|
| NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, RDI, space));
|
|
|
|
|