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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 10695136: Use class id instead of class in subtype test cache. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 9557)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -1809,10 +1809,9 @@
const Immediate raw_null =
Immediate(reinterpret_cast<intptr_t>(Object::null()));
__ movl(EAX, Address(ESP, kInstanceOffsetInBytes));
- __ LoadClass(ECX, EAX, EBX);
- // EAX: instance, ECX: instance-class.
- // Get instance type arguments
if (n > 1) {
+ // Get instance type arguments.
+ __ LoadClass(ECX, EAX, EBX);
// Compute instance type arguments into EBX.
Label has_no_type_arguments;
__ movl(EBX, raw_null);
@@ -1823,6 +1822,8 @@
__ movl(EBX, FieldAddress(EAX, EDI, TIMES_1, 0));
__ Bind(&has_no_type_arguments);
}
+ __ LoadClassId(ECX, EAX);
+ // EAX: instance, ECX: instance class id.
// EBX: instance type arguments (null if none), used only if n > 1.
__ movl(EDX, Address(ESP, kCacheOffsetInBytes));
// EDX: SubtypeTestCache.
@@ -1831,10 +1832,11 @@
Label loop, found, not_found, next_iteration;
// EDX: Entry start.
- // ECX: instance class.
- // EBX: instance type arguments
+ // ECX: instance class id.
+ // EBX: instance type arguments.
+ __ SmiTag(ECX);
__ Bind(&loop);
- __ movl(EDI, Address(EDX, kWordSize * SubtypeTestCache::kInstanceClass));
+ __ movl(EDI, Address(EDX, kWordSize * SubtypeTestCache::kInstanceClassId));
__ cmpl(EDI, raw_null);
__ j(EQUAL, &not_found, Assembler::kNearJump);
__ cmpl(EDI, ECX);
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698