Index: runtime/vm/intrinsifier_ia32.cc |
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc |
index 24cb10f438064e9a9063a5d9686f5eab02cf50d2..78c1e66b42febb3f00ab6aaa0d3d65efc4ffd719 100644 |
--- a/runtime/vm/intrinsifier_ia32.cc |
+++ b/runtime/vm/intrinsifier_ia32.cc |
@@ -208,9 +208,8 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) { |
sizeof(Raw##type_name) + kObjectAlignment - 1; \ |
__ leal(EDI, Address(EDI, scale_factor, fixed_size_plus_alignment_padding)); \ |
__ andl(EDI, Immediate(-kObjectAlignment)); \ |
- Heap::Space space = Heap::kNew; \ |
- __ movl(ECX, Address(THR, Thread::heap_offset())); \ |
- __ movl(EAX, Address(ECX, Heap::TopOffset(space))); \ |
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); \ |
+ __ movl(EAX, Address(THR, Thread::top_offset())); \ |
__ movl(EBX, EAX); \ |
\ |
/* EDI: allocation size. */ \ |
@@ -221,13 +220,12 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) { |
/* EAX: potential new object start. */ \ |
/* EBX: potential next object start. */ \ |
/* EDI: allocation size. */ \ |
- /* ECX: heap. */ \ |
- __ cmpl(EBX, Address(ECX, Heap::EndOffset(space))); \ |
+ __ cmpl(EBX, 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. */ \ |
- __ movl(Address(ECX, Heap::TopOffset(space)), EBX); \ |
+ __ movl(Address(THR, Thread::top_offset()), EBX); \ |
__ addl(EAX, Immediate(kHeapObjectTag)); \ |
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, EDI, ECX, space)); \ |
\ |
@@ -1959,9 +1957,8 @@ static void TryAllocateOnebyteString(Assembler* assembler, |
__ andl(EDI, Immediate(-kObjectAlignment)); |
const intptr_t cid = kOneByteStringCid; |
- Heap::Space space = Heap::kNew; |
- __ movl(ECX, Address(THR, Thread::heap_offset())); |
- __ movl(EAX, Address(ECX, Heap::TopOffset(space))); |
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); |
+ __ movl(EAX, Address(THR, Thread::top_offset())); |
__ movl(EBX, EAX); |
// EDI: allocation size. |
@@ -1972,13 +1969,12 @@ static void TryAllocateOnebyteString(Assembler* assembler, |
// EAX: potential new object start. |
// EBX: potential next object start. |
// EDI: allocation size. |
- // ECX: heap. |
- __ cmpl(EBX, Address(ECX, Heap::EndOffset(space))); |
+ __ cmpl(EBX, 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. |
- __ movl(Address(ECX, Heap::TopOffset(space)), EBX); |
+ __ movl(Address(THR, Thread::top_offset()), EBX); |
__ addl(EAX, Immediate(kHeapObjectTag)); |
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, EDI, ECX, space)); |