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

Unified Diff: runtime/vm/stub_code_x64.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/stub_code_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 9557)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -1767,9 +1767,8 @@
const intptr_t kInstanceOffsetInBytes = 2 * kWordSize;
const intptr_t kCacheOffsetInBytes = 3 * kWordSize;
__ movq(RAX, Address(RSP, kInstanceOffsetInBytes));
- __ LoadClass(R10, RAX);
- // RAX: instance, R10: instance class.
if (n > 1) {
+ __ LoadClass(R10, RAX);
// Compute instance type arguments into R13.
Label has_no_type_arguments;
__ movq(R13, raw_null);
@@ -1780,17 +1779,20 @@
__ movq(R13, FieldAddress(RAX, RDI, TIMES_1, 0));
__ Bind(&has_no_type_arguments);
}
+ __ LoadClassId(R10, RAX);
+ // RAX: instance, R10: instance class id.
// R13: instance type arguments or null, used only if n > 1.
__ movq(RDX, Address(RSP, kCacheOffsetInBytes));
// RDX: SubtypeTestCache.
__ movq(RDX, FieldAddress(RDX, SubtypeTestCache::cache_offset()));
__ addq(RDX, Immediate(Array::data_offset() - kHeapObjectTag));
// RDX: Entry start.
- // R10: instance class.
- // R13: instance type arguments
+ // R10: instance class id.
+ // R13: instance type arguments.
Label loop, found, not_found, next_iteration;
+ __ SmiTag(R10);
__ Bind(&loop);
- __ movq(RDI, Address(RDX, kWordSize * SubtypeTestCache::kInstanceClass));
+ __ movq(RDI, Address(RDX, kWordSize * SubtypeTestCache::kInstanceClassId));
__ cmpq(RDI, raw_null);
__ j(EQUAL, &not_found, Assembler::kNearJump);
__ cmpq(RDI, R10);
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698