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

Unified Diff: runtime/vm/assembler_mips.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_mips.cc
===================================================================
--- runtime/vm/assembler_mips.cc (revision 40703)
+++ runtime/vm/assembler_mips.cc (working copy)
@@ -669,31 +669,24 @@
}
-void Assembler::LoadClassById(Register result, Register class_id) {
+void Assembler::LoadClassById(Register result,
+ Register class_id,
+ Isolate* isolate) {
ASSERT(!in_delay_slot_);
ASSERT(result != class_id);
- lw(result, FieldAddress(CTX, Context::isolate_offset()));
- const intptr_t table_offset_in_isolate =
- Isolate::class_table_offset() + ClassTable::table_offset();
- lw(result, Address(result, table_offset_in_isolate));
+ LoadImmediate(result, isolate->ClassTableAddress());
+ lw(result, Address(result, 0));
sll(TMP, class_id, 2);
addu(result, result, TMP);
lw(result, Address(result));
}
-void Assembler::LoadClass(Register result, Register object) {
+void Assembler::LoadClass(Register result, Register object, Isolate* isolate) {
ASSERT(!in_delay_slot_);
ASSERT(TMP != result);
LoadClassId(TMP, object);
-
- lw(result, FieldAddress(CTX, Context::isolate_offset()));
- const intptr_t table_offset_in_isolate =
- Isolate::class_table_offset() + ClassTable::table_offset();
- lw(result, Address(result, table_offset_in_isolate));
- sll(TMP, TMP, 2);
- addu(result, result, TMP);
- lw(result, Address(result));
+ LoadClassById(result, TMP, isolate);
}

Powered by Google App Engine
This is Rietveld 408576698