| Index: runtime/vm/intrinsifier_ia32.cc
|
| ===================================================================
|
| --- runtime/vm/intrinsifier_ia32.cc (revision 42713)
|
| +++ runtime/vm/intrinsifier_ia32.cc (working copy)
|
| @@ -115,12 +115,17 @@
|
| // Try allocating in new space.
|
| const Class& cls = Class::Handle(
|
| Isolate::Current()->object_store()->growable_object_array_class());
|
| - __ TryAllocate(cls, &fall_through, Assembler::kNearJump, EAX, EBX);
|
| +#if defined(DEBUG)
|
| + static const bool kJumpLength = Assembler::kFarJump;
|
| +#else
|
| + static const bool kJumpLength = Assembler::kNearJump;
|
| +#endif // DEBUG
|
| + __ TryAllocate(cls, &fall_through, kJumpLength, EAX, EBX);
|
|
|
| // Store backing array object in growable array object.
|
| __ movl(EBX, Address(ESP, kArrayOffset)); // data argument.
|
| // EAX is new, no barrier needed.
|
| - __ StoreIntoObjectNoBarrier(
|
| + __ InitializeFieldNoBarrier(
|
| EAX,
|
| FieldAddress(EAX, GrowableObjectArray::data_offset()),
|
| EBX);
|
| @@ -128,12 +133,12 @@
|
| // EAX: new growable array object start as a tagged pointer.
|
| // Store the type argument field in the growable array object.
|
| __ movl(EBX, Address(ESP, kTypeArgumentsOffset)); // type argument.
|
| - __ StoreIntoObjectNoBarrier(
|
| + __ InitializeFieldNoBarrier(
|
| EAX,
|
| FieldAddress(EAX, GrowableObjectArray::type_arguments_offset()),
|
| EBX);
|
|
|
| - __ ZeroSmiField(FieldAddress(EAX, GrowableObjectArray::length_offset()));
|
| + __ ZeroInitSmiField(FieldAddress(EAX, GrowableObjectArray::length_offset()));
|
| __ ret(); // returns the newly allocated object in EAX.
|
|
|
| __ Bind(&fall_through);
|
| @@ -328,7 +333,7 @@
|
| /* EAX: new object start as a tagged pointer. */ \
|
| /* EBX: new object end address. */ \
|
| __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */ \
|
| - __ StoreIntoObjectNoBarrier(EAX, \
|
| + __ InitializeFieldNoBarrier(EAX, \
|
| FieldAddress(EAX, type_name::length_offset()), \
|
| EDI); \
|
| /* Initialize all array elements to 0. */ \
|
| @@ -1868,7 +1873,7 @@
|
|
|
| // EDI: allocation size.
|
| __ addl(EBX, EDI);
|
| - __ j(CARRY, &pop_and_fail, Assembler::kNearJump);
|
| + __ j(CARRY, &pop_and_fail);
|
|
|
| // Check if the allocation fits into the remaining space.
|
| // EAX: potential new object start.
|
| @@ -1875,7 +1880,7 @@
|
| // EBX: potential next object start.
|
| // EDI: allocation size.
|
| __ cmpl(EBX, Address::Absolute(heap->EndAddress(space)));
|
| - __ j(ABOVE_EQUAL, &pop_and_fail, Assembler::kNearJump);
|
| + __ j(ABOVE_EQUAL, &pop_and_fail);
|
|
|
| // Successfully allocated the object(s), now update top to point to
|
| // next object start and initialize the object.
|
| @@ -1906,11 +1911,11 @@
|
|
|
| // Set the length field.
|
| __ popl(EDI);
|
| - __ StoreIntoObjectNoBarrier(EAX,
|
| + __ InitializeFieldNoBarrier(EAX,
|
| FieldAddress(EAX, String::length_offset()),
|
| EDI);
|
| // Clear hash.
|
| - __ ZeroSmiField(FieldAddress(EAX, String::hash_offset()));
|
| + __ ZeroInitSmiField(FieldAddress(EAX, String::hash_offset()));
|
| __ jmp(ok, Assembler::kNearJump);
|
|
|
| __ Bind(&pop_and_fail);
|
|
|