Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 11868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11879 void ICData::PrintJSONImpl(JSONStream* stream, bool ref) const { | 11879 void ICData::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 11880 Object::PrintJSONImpl(stream, ref); | 11880 Object::PrintJSONImpl(stream, ref); |
| 11881 } | 11881 } |
| 11882 | 11882 |
| 11883 | 11883 |
| 11884 void ICData::PrintToJSONArray(JSONArray* jsarray, | 11884 void ICData::PrintToJSONArray(JSONArray* jsarray, |
| 11885 intptr_t line, | 11885 intptr_t line, |
| 11886 intptr_t column) const { | 11886 intptr_t column) const { |
| 11887 Isolate* isolate = Isolate::Current(); | 11887 Isolate* isolate = Isolate::Current(); |
| 11888 Class& cls = Class::Handle(); | 11888 Class& cls = Class::Handle(); |
| 11889 Function& func = Function::Handle(); | |
| 11889 | 11890 |
| 11890 JSONObject jsobj(jsarray); | 11891 JSONObject jsobj(jsarray); |
| 11891 jsobj.AddProperty("name", String::Handle(target_name()).ToCString()); | 11892 jsobj.AddProperty("name", String::Handle(target_name()).ToCString()); |
| 11892 jsobj.AddProperty("line", line); | 11893 jsobj.AddProperty("line", line); |
| 11893 jsobj.AddProperty("column", column); | 11894 jsobj.AddProperty("column", column); |
| 11894 // TODO(rmacnak): Figure out how to stringify DeoptReasons(). | 11895 // TODO(rmacnak): Figure out how to stringify DeoptReasons(). |
| 11895 // jsobj.AddProperty("deoptReasons", ...); | 11896 // jsobj.AddProperty("deoptReasons", ...); |
| 11896 | 11897 |
| 11897 JSONArray cache_entries(&jsobj, "cacheEntries"); | 11898 JSONArray cache_entries(&jsobj, "cacheEntries"); |
| 11898 for (intptr_t i = 0; i < NumberOfChecks(); i++) { | 11899 for (intptr_t i = 0; i < NumberOfChecks(); i++) { |
| 11899 intptr_t cid = GetReceiverClassIdAt(i); | 11900 func = GetTargetAt(i); |
| 11900 cls ^= isolate->class_table()->At(cid); | 11901 if (func.is_static() || (func.kind() == RawFunction::kConstructor)) { |
| 11902 cls ^= func.Owner(); | |
| 11903 } else { | |
| 11904 intptr_t cid = GetReceiverClassIdAt(i); | |
| 11905 cls ^= isolate->class_table()->At(cid); | |
| 11906 } | |
| 11901 intptr_t count = GetCountAt(i); | 11907 intptr_t count = GetCountAt(i); |
| 11902 JSONObject cache_entry(&cache_entries); | 11908 JSONObject cache_entry(&cache_entries); |
| 11903 cache_entry.AddProperty("receiverClass", cls); | 11909 if (cls.IsTopLevel()) { |
| 11910 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
| |
| 11911 } else { | |
| 11912 cache_entry.AddProperty("receiverClass", cls); | |
| 11913 } | |
| 11904 cache_entry.AddProperty("count", count); | 11914 cache_entry.AddProperty("count", count); |
| 11905 } | 11915 } |
| 11906 } | 11916 } |
| 11907 | 11917 |
| 11908 | 11918 |
| 11909 static Token::Kind RecognizeArithmeticOp(const String& name) { | 11919 static Token::Kind RecognizeArithmeticOp(const String& name) { |
| 11910 ASSERT(name.IsSymbol()); | 11920 ASSERT(name.IsSymbol()); |
| 11911 if (name.raw() == Symbols::Plus().raw()) { | 11921 if (name.raw() == Symbols::Plus().raw()) { |
| 11912 return Token::kADD; | 11922 return Token::kADD; |
| 11913 } else if (name.raw() == Symbols::Minus().raw()) { | 11923 } else if (name.raw() == Symbols::Minus().raw()) { |
| (...skipping 8779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 20693 return tag_label.ToCString(); | 20703 return tag_label.ToCString(); |
| 20694 } | 20704 } |
| 20695 | 20705 |
| 20696 | 20706 |
| 20697 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20707 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20698 Instance::PrintJSONImpl(stream, ref); | 20708 Instance::PrintJSONImpl(stream, ref); |
| 20699 } | 20709 } |
| 20700 | 20710 |
| 20701 | 20711 |
| 20702 } // namespace dart | 20712 } // namespace dart |
| OLD | NEW |