Index: runtime/vm/intrinsifier_ia32.cc |
=================================================================== |
--- runtime/vm/intrinsifier_ia32.cc (revision 41609) |
+++ runtime/vm/intrinsifier_ia32.cc (working copy) |
@@ -114,7 +114,10 @@ |
// 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); |
+ const bool jump_length = VerifiedMemory::enabled() ? |
+ Assembler::kFarJump : |
+ Assembler::kNearJump; |
+ __ TryAllocate(cls, &fall_through, jump_length, EAX, EBX); |
// Store backing array object in growable array object. |
__ movl(EBX, Address(ESP, kArrayOffset)); // data argument. |
@@ -132,9 +135,7 @@ |
FieldAddress(EAX, GrowableObjectArray::type_arguments_offset()), |
EBX); |
- // Set the length field in the growable array object to 0. |
- __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), |
- Immediate(0)); |
+ __ ZeroSmiField(FieldAddress(EAX, GrowableObjectArray::length_offset())); |
__ ret(); // returns the newly allocated object in EAX. |
__ Bind(&fall_through); |
@@ -199,7 +200,8 @@ |
__ movl(EBX, Address(ESP, + 1 * kWordSize)); // Length value. |
__ testl(EBX, Immediate(kSmiTagMask)); |
__ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi length. |
- __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), EBX); |
+ FieldAddress length_field(EAX, GrowableObjectArray::length_offset()); |
+ __ StoreIntoSmiField(length_field, EBX); |
__ ret(); |
__ Bind(&fall_through); |
} |
@@ -1828,7 +1830,7 @@ |
__ incl(EAX); |
__ Bind(&set_hash_code); |
__ SmiTag(EAX); |
- __ movl(FieldAddress(EBX, String::hash_offset()), EAX); |
+ __ StoreIntoSmiField(FieldAddress(EBX, String::hash_offset()), EAX); |
__ ret(); |
} |
@@ -1901,7 +1903,7 @@ |
FieldAddress(EAX, String::length_offset()), |
EDI); |
// Clear hash. |
- __ movl(FieldAddress(EAX, String::hash_offset()), Immediate(0)); |
+ __ ZeroSmiField(FieldAddress(EAX, String::hash_offset())); |
__ jmp(ok, Assembler::kNearJump); |
__ Bind(&pop_and_fail); |