Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1754)

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 10521004: Eliminate RawObject::class_ field entirely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intrinsifier_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index 2e180900fb31b2e7d1576c3a7f5e29520f9f566e..76e37c1983c68eed3883fbc1256f31d3b3c49d8e 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,
@@ -303,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,
@@ -658,10 +644,8 @@ bool Intrinsifier::Integer_shl(Assembler* assembler) {
// Result in EDI (high) and EBX (low).
const Class& mint_class = Class::ZoneHandle(
Ivan Posva 2012/06/06 13:42:11 Does still need to be a ZoneHandle?
Isolate::Current()->object_store()->mint_class());
- __ LoadObject(ECX, mint_class);
AssemblerMacros::TryAllocate(assembler,
mint_class,
- ECX, // Class register.
&fall_through,
EAX); // Result register.
// EBX and EDI are not objects but integer values.
@@ -918,10 +902,8 @@ static bool DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
}
const Class& double_class = Class::ZoneHandle(
Ivan Posva 2012/06/06 13:42:11 Ditto here and many other places.
Isolate::Current()->object_store()->double_class());
- __ LoadObject(EBX, double_class);
AssemblerMacros::TryAllocate(assembler,
double_class,
- EBX, // Class register.
&fall_through,
EAX); // Result register.
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
@@ -966,10 +948,8 @@ bool Intrinsifier::Double_mulFromInteger(Assembler* assembler) {
__ mulsd(XMM0, XMM1);
const Class& double_class = Class::ZoneHandle(
Isolate::Current()->object_store()->double_class());
- __ LoadObject(EBX, double_class);
AssemblerMacros::TryAllocate(assembler,
double_class,
- EBX, // Class register.
&fall_through,
EAX); // Result register.
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
@@ -989,10 +969,8 @@ bool Intrinsifier::Double_fromInteger(Assembler* assembler) {
__ cvtsi2sd(XMM0, EAX);
const Class& double_class = Class::ZoneHandle(
Isolate::Current()->object_store()->double_class());
- __ LoadObject(EBX, double_class);
AssemblerMacros::TryAllocate(assembler,
double_class,
- EBX, // Class register.
&fall_through,
EAX); // Result register.
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
@@ -1056,10 +1034,8 @@ bool Intrinsifier::Math_sqrt(Assembler* assembler) {
__ sqrtsd(XMM0, XMM1);
const Class& double_class = Class::ZoneHandle(
Isolate::Current()->object_store()->double_class());
- __ LoadObject(EBX, double_class);
AssemblerMacros::TryAllocate(assembler,
double_class,
- EBX, // Class register.
&fall_through,
EAX); // Result register.
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
@@ -1094,11 +1070,9 @@ static void EmitTrigonometric(Assembler* assembler,
}
const Class& double_class = Class::ZoneHandle(
Isolate::Current()->object_store()->double_class());
- __ LoadObject(EBX, double_class);
Label alloc_failed;
AssemblerMacros::TryAllocate(assembler,
double_class,
- EBX, // Class register.
&alloc_failed,
EAX); // Result register.
__ fstpl(FieldAddress(EAX, Double::value_offset()));

Powered by Google App Engine
This is Rietveld 408576698