| 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);
|
| }
|
|
|
|
|