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

Unified Diff: runtime/vm/code_generator.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 | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 9557)
+++ runtime/vm/code_generator.cc (working copy)
@@ -351,11 +351,13 @@
const Type& instance_type = Type::Handle(instance.GetType());
ASSERT(instance_type.IsInstantiated());
if (type.IsInstantiated()) {
- OS::Print("%s: '%s' %s '%s' (pc: 0x%x).\n",
+ OS::Print("%s: '%s' %d %s '%s' %d (pc: 0x%x).\n",
message,
String::Handle(instance_type.Name()).ToCString(),
+ Class::Handle(instance_type.type_class()).id(),
(result.raw() == Bool::True()) ? "is" : "is !",
String::Handle(type.Name()).ToCString(),
+ Class::Handle(type.type_class()).id(),
caller_frame->pc());
} else {
// Instantiate type before printing.
@@ -475,7 +477,7 @@
instantiator_type_arguments = instantiator.GetTypeArguments();
}
- Class& last_instance_class = Class::Handle();
+ intptr_t last_instance_class_id = -1;
AbstractTypeArguments& last_instance_type_arguments =
AbstractTypeArguments::Handle();
AbstractTypeArguments& last_instantiator_type_arguments =
@@ -485,11 +487,11 @@
for (intptr_t i = 0; i < len; ++i) {
new_cache.GetCheck(
i,
- &last_instance_class,
+ &last_instance_class_id,
&last_instance_type_arguments,
&last_instantiator_type_arguments,
&last_result);
- if ((last_instance_class.raw() == instance_class.raw()) &&
+ if ((last_instance_class_id == instance_class.id()) &&
(last_instance_type_arguments.raw() == instance_type_arguments.raw()) &&
(last_instantiator_type_arguments.raw() ==
instantiator_type_arguments.raw())) {
@@ -509,7 +511,7 @@
return;
}
}
- new_cache.AddCheck(instance_class,
+ new_cache.AddCheck(instance_class.id(),
instance_type_arguments,
instantiator_type_arguments,
result);
@@ -519,16 +521,18 @@
test_type = type.InstantiateFrom(instantiator_type_arguments);
}
OS::Print(" Updated test cache 0x%x ix:%d:\n"
- " [0x%x %s, 0x%x %s]\n"
- " [0x%x %s, 0x%x %s] %s\n",
+ " [0x%x %s %d, 0x%x %s]\n"
+ " [0x%x %s %d, 0x%x %s] %s\n",
new_cache.raw(),
len,
instance_class.raw(),
instance_class.ToCString(),
+ instance_class.id(),
instance_type_arguments.raw(),
instance_type_arguments.ToCString(),
test_type.type_class(),
Class::Handle(test_type.type_class()).ToCString(),
+ Class::Handle(test_type.type_class()).id(),
instantiator_type_arguments.raw(),
instantiator_type_arguments.ToCString(),
result.ToCString());
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698