| Index: runtime/vm/intrinsifier_ia32.cc
|
| diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
|
| index 496ec8852e4492c7ebd1182f01caca1ca835ebf9..1b91edd6b7a5cac817db2f5c621ca82734cd39e4 100644
|
| --- a/runtime/vm/intrinsifier_ia32.cc
|
| +++ b/runtime/vm/intrinsifier_ia32.cc
|
| @@ -89,14 +89,8 @@ bool Intrinsifier::ObjectArray_Allocate(Assembler* assembler) {
|
| __ movl(FieldAddress(EAX, Array::tags_offset()), EDI); // Tags.
|
| }
|
|
|
| - // Store class value for array.
|
| // EAX: new object start as a tagged pointer.
|
| // EBX: new object end address.
|
| - __ movl(EDI, FieldAddress(CTX, Context::isolate_offset()));
|
| - __ movl(EDI, Address(EDI, Isolate::object_store_offset()));
|
| - __ movl(EDI, Address(EDI, ObjectStore::array_class_offset()));
|
| - __ StoreIntoObject(EAX, FieldAddress(EAX, Array::class_offset()), EDI);
|
| -
|
| // Store the type argument field.
|
| __ movl(EDI, Address(ESP, kTypeArgumentsOffset)); // type argument.
|
| __ StoreIntoObject(EAX,
|
| @@ -204,8 +198,7 @@ bool Intrinsifier::Array_setIndexed(Assembler* assembler) {
|
| __ j(EQUAL, &checked_ok, Assembler::kNearJump);
|
| // Check if it's Dynamic.
|
| // For now handle only TypeArguments and bail out if InstantiatedTypeArgs.
|
| - __ movl(EAX, FieldAddress(EBX, Object::class_offset()));
|
| - __ CompareObject(EAX, Object::ZoneHandle(Object::type_arguments_class()));
|
| + __ CompareClassOf(EBX, Class::Handle(Object::type_arguments_class()), EAX);
|
| __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
|
| // Get type at index 0.
|
| __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0)));
|
| @@ -304,15 +297,7 @@ bool Intrinsifier::GArray_Allocate(Assembler* assembler) {
|
| FieldAddress(EAX, GrowableObjectArray::data_offset()),
|
| EBX);
|
|
|
| - // Store class value for the growable array object.
|
| // EAX: new growable array object start as a tagged pointer.
|
| - __ movl(EBX, FieldAddress(CTX, Context::isolate_offset()));
|
| - __ movl(EBX, Address(EBX, Isolate::object_store_offset()));
|
| - __ movl(EBX, Address(EBX, ObjectStore::growable_object_array_class_offset()));
|
| - __ StoreIntoObject(EAX,
|
| - FieldAddress(EAX, GrowableObjectArray::class_offset()),
|
| - EBX);
|
| -
|
| // Store the type argument field in the growable array object.
|
| __ movl(EBX, Address(ESP, kTypeArgumentsOffset)); // type argument.
|
| __ StoreIntoObject(EAX,
|
| @@ -750,16 +735,14 @@ bool Intrinsifier::Integer_equalToInteger(Assembler* assembler) {
|
| // represented by Smi.
|
| // Left is Smi, return false if right is Mint, otherwise fall through.
|
| __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument.
|
| - __ movl(EAX, FieldAddress(EAX, Object::class_offset()));
|
| - __ CompareObject(EAX, Class::ZoneHandle(object_store->mint_class()));
|
| + __ CompareClassOf(EAX, Class::Handle(object_store->mint_class()), EAX);
|
| __ j(NOT_EQUAL, &fall_through);
|
| __ LoadObject(EAX, bool_false); // Smi == Mint -> false.
|
| __ ret();
|
|
|
| __ Bind(&receiver_not_smi);
|
| // EAX:: receiver.
|
| - __ movl(EAX, FieldAddress(EAX, Object::class_offset()));
|
| - __ CompareObject(EAX, Class::ZoneHandle(object_store->mint_class()));
|
| + __ CompareClassOf(EAX, Class::Handle(object_store->mint_class()), EAX);
|
| __ j(NOT_EQUAL, &fall_through);
|
| // Receiver is Mint, return false if right is Smi.
|
| __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument.
|
| @@ -828,9 +811,8 @@ static void TestLastArgumentIsDouble(Assembler* assembler,
|
| __ movl(EAX, Address(ESP, + 1 * kWordSize));
|
| __ testl(EAX, Immediate(kSmiTagMask));
|
| __ j(ZERO, is_smi, Assembler::kNearJump); // Jump if Smi.
|
| - __ LoadObject(EBX, Class::ZoneHandle(
|
| - Isolate::Current()->object_store()->double_class()));
|
| - __ cmpl(EBX, FieldAddress(EAX, Object::class_offset()));
|
| + __ CompareClassOf(EAX, Class::Handle(
|
| + Isolate::Current()->object_store()->double_class()), EBX);
|
| __ j(NOT_EQUAL, not_double_smi, Assembler::kNearJump);
|
| // Fall through if double.
|
| }
|
| @@ -1253,9 +1235,9 @@ bool Intrinsifier::String_charCodeAt(Assembler* assembler) {
|
| __ cmpl(EBX, FieldAddress(EAX, String::length_offset()));
|
| // Runtime throws exception.
|
| __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump);
|
| - __ movl(EDI, FieldAddress(EAX, Instance::class_offset()));
|
| - __ CompareObject(EDI,
|
| - Class::ZoneHandle(object_store->one_byte_string_class()));
|
| + __ CompareClassOf(EAX,
|
| + Class::Handle(object_store->one_byte_string_class()),
|
| + EDI);
|
| __ j(NOT_EQUAL, &fall_through);
|
| __ SmiUntag(EBX);
|
| __ movzxb(EAX, FieldAddress(EAX, EBX, TIMES_1, OneByteString::data_offset()));
|
|
|