Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index 7914cef2a37c497196035736f71c1a999aaac25e..c845ffe39ec9229f5fa58dd66435d86d84a8093b 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -11886,6 +11886,7 @@ void ICData::PrintToJSONArray(JSONArray* jsarray, |
| intptr_t column) const { |
| Isolate* isolate = Isolate::Current(); |
| Class& cls = Class::Handle(); |
| + Function& func = Function::Handle(); |
| JSONObject jsobj(jsarray); |
| jsobj.AddProperty("name", String::Handle(target_name()).ToCString()); |
| @@ -11896,11 +11897,20 @@ void ICData::PrintToJSONArray(JSONArray* jsarray, |
| JSONArray cache_entries(&jsobj, "cacheEntries"); |
| for (intptr_t i = 0; i < NumberOfChecks(); i++) { |
| - intptr_t cid = GetReceiverClassIdAt(i); |
| - cls ^= isolate->class_table()->At(cid); |
| + func = GetTargetAt(i); |
| + if (func.is_static() || (func.kind() == RawFunction::kConstructor)) { |
| + cls ^= func.Owner(); |
| + } else { |
| + intptr_t cid = GetReceiverClassIdAt(i); |
| + cls ^= isolate->class_table()->At(cid); |
| + } |
| intptr_t count = GetCountAt(i); |
| JSONObject cache_entry(&cache_entries); |
| - cache_entry.AddProperty("receiverClass", cls); |
| + if (cls.IsTopLevel()) { |
| + cache_entry.AddProperty("receiverClass", Library::Handle(cls.library())); |
|
rmacnak
2015/03/05 02:11:28
Weird.
Cutch
2015/03/09 18:22:42
rename to 'receiver'?
rmacnak
2015/03/09 23:16:02
It's not the receiver (i.e. an instance). The sour
|
| + } else { |
| + cache_entry.AddProperty("receiverClass", cls); |
| + } |
| cache_entry.AddProperty("count", count); |
| } |
| } |