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

Unified Diff: runtime/lib/object.cc

Issue 18807007: Fix wrong type test optimization when testing against a signature class: we must always consider th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/object.cc
===================================================================
--- runtime/lib/object.cc (revision 24952)
+++ runtime/lib/object.cc (working copy)
@@ -14,6 +14,7 @@
namespace dart {
DECLARE_FLAG(bool, enable_type_checks);
+DECLARE_FLAG(bool, trace_type_checks);
DEFINE_NATIVE_ENTRY(Object_cid, 1) {
@@ -127,6 +128,17 @@
Symbols::Empty(), malformed_error_message);
UNREACHABLE();
}
+
+ if (FLAG_trace_type_checks) {
+ const char* result_str = is_instance_of ? "true" : "false";
+ OS::Print("Object.instanceOf: result %s\n", result_str);
+ const Class& instance_class = Class::Handle(instance.clazz());
+ OS::Print(" instance [class: %s]\n",
+ String::Handle(instance_class.Name()).ToCString());
+ OS::Print(" test-type [class: %s]\n",
+ String::Handle(Class::Handle(type.type_class()).Name()).ToCString());
+ OS::Print(" type-args %s\n", instantiator_type_arguments.ToCString());
+ }
return Bool::Get(negate.value() ? !is_instance_of : is_instance_of);
}
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698