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

Unified Diff: runtime/vm/assembler_ia32.cc

Issue 605533003: Make subtype test stubs isolate-specific. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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/assembler_ia32.cc
===================================================================
--- runtime/vm/assembler_ia32.cc (revision 40703)
+++ runtime/vm/assembler_ia32.cc (working copy)
@@ -2736,27 +2736,22 @@
}
-void Assembler::LoadClassById(Register result, Register class_id) {
+void Assembler::LoadClassById(Register result,
+ Register class_id,
+ Isolate* isolate) {
ASSERT(result != class_id);
- movl(result, FieldAddress(CTX, Context::isolate_offset()));
- const intptr_t table_offset_in_isolate =
- Isolate::class_table_offset() + ClassTable::table_offset();
- movl(result, Address(result, table_offset_in_isolate));
+ movl(result, Address::Absolute(isolate->ClassTableAddress()));
movl(result, Address(result, class_id, TIMES_4, 0));
}
void Assembler::LoadClass(Register result,
Register object,
- Register scratch) {
+ Register scratch,
+ Isolate* isolate) {
ASSERT(scratch != result);
LoadClassId(scratch, object);
-
- movl(result, FieldAddress(CTX, Context::isolate_offset()));
- const intptr_t table_offset_in_isolate =
- Isolate::class_table_offset() + ClassTable::table_offset();
- movl(result, Address(result, table_offset_in_isolate));
- movl(result, Address(result, scratch, TIMES_4, 0));
+ LoadClassById(result, scratch, isolate);
}

Powered by Google App Engine
This is Rietveld 408576698