| Index: runtime/vm/assembler_ia32.cc
|
| diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
|
| index a437c29cf829b1772eaf0c70a2b043b07ba20f12..4f24af84ab91e716f9285aff1fa2fb1512f05ca9 100644
|
| --- a/runtime/vm/assembler_ia32.cc
|
| +++ b/runtime/vm/assembler_ia32.cc
|
| @@ -2631,15 +2631,14 @@ void Assembler::TryAllocate(const Class& cls,
|
| MaybeTraceAllocation(cls.id(), temp_reg, failure, near_jump));
|
| const intptr_t instance_size = cls.instance_size();
|
| Heap::Space space = Heap::kNew;
|
| - movl(temp_reg, Address(THR, Thread::heap_offset()));
|
| - movl(instance_reg, Address(temp_reg, Heap::TopOffset(space)));
|
| + movl(instance_reg, Address(THR, Thread::top_offset()));
|
| addl(instance_reg, Immediate(instance_size));
|
| // instance_reg: potential next object start.
|
| - cmpl(instance_reg, Address(temp_reg, Heap::EndOffset(space)));
|
| + cmpl(instance_reg, Address(THR, Thread::end_offset()));
|
| j(ABOVE_EQUAL, failure, near_jump);
|
| // Successfully allocated the object, now update top to point to
|
| // next object start and store the class in the class field of object.
|
| - movl(Address(temp_reg, Heap::TopOffset(space)), instance_reg);
|
| + movl(Address(THR, Thread::top_offset()), instance_reg);
|
| NOT_IN_PRODUCT(UpdateAllocationStats(cls.id(), temp_reg, space));
|
| ASSERT(instance_size >= kHeapObjectTag);
|
| subl(instance_reg, Immediate(instance_size - kHeapObjectTag));
|
| @@ -2669,8 +2668,7 @@ void Assembler::TryAllocateArray(intptr_t cid,
|
| // allocation call site.
|
| NOT_IN_PRODUCT(MaybeTraceAllocation(cid, temp_reg, failure, near_jump));
|
| Heap::Space space = Heap::kNew;
|
| - movl(temp_reg, Address(THR, Thread::heap_offset()));
|
| - movl(instance, Address(temp_reg, Heap::TopOffset(space)));
|
| + movl(instance, Address(THR, Thread::top_offset()));
|
| movl(end_address, instance);
|
|
|
| addl(end_address, Immediate(instance_size));
|
| @@ -2679,12 +2677,12 @@ void Assembler::TryAllocateArray(intptr_t cid,
|
| // Check if the allocation fits into the remaining space.
|
| // EAX: potential new object start.
|
| // EBX: potential next object start.
|
| - cmpl(end_address, Address(temp_reg, Heap::EndOffset(space)));
|
| + cmpl(end_address, Address(THR, Thread::end_offset()));
|
| j(ABOVE_EQUAL, failure);
|
|
|
| // Successfully allocated the object(s), now update top to point to
|
| // next object start and initialize the object.
|
| - movl(Address(temp_reg, Heap::TopOffset(space)), end_address);
|
| + movl(Address(THR, Thread::top_offset()), end_address);
|
| addl(instance, Immediate(kHeapObjectTag));
|
| NOT_IN_PRODUCT(
|
| UpdateAllocationStatsWithSize(cid, instance_size, temp_reg, space));
|
|
|