| 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 4045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4056 } | 4056 } |
| 4057 } | 4057 } |
| 4058 } | 4058 } |
| 4059 { | 4059 { |
| 4060 JSONObject typesRef(&jsobj, "canonicalTypes"); | 4060 JSONObject typesRef(&jsobj, "canonicalTypes"); |
| 4061 typesRef.AddProperty("type", "@TypeList"); | 4061 typesRef.AddProperty("type", "@TypeList"); |
| 4062 typesRef.AddPropertyF("id", "classes/%" Pd "/types", id()); | 4062 typesRef.AddPropertyF("id", "classes/%" Pd "/types", id()); |
| 4063 jsobj.AddPropertyF("name", "canonical types of %s", internal_class_name); | 4063 jsobj.AddPropertyF("name", "canonical types of %s", internal_class_name); |
| 4064 jsobj.AddPropertyF("user_name", "canonical types of %s", pretty_class_name); | 4064 jsobj.AddPropertyF("user_name", "canonical types of %s", pretty_class_name); |
| 4065 } | 4065 } |
| 4066 { |
| 4067 ClassTable* class_table = Isolate::Current()->class_table(); |
| 4068 const ClassHeapStats* stats = class_table->StatsWithUpdatedSize(id()); |
| 4069 if (stats != NULL) { |
| 4070 JSONObject allocation_stats(&jsobj, "allocationStats"); |
| 4071 stats->PrintToJSONObject(*this, &allocation_stats); |
| 4072 } |
| 4073 } |
| 4066 } | 4074 } |
| 4067 | 4075 |
| 4068 | 4076 |
| 4069 void Class::InsertCanonicalConstant(intptr_t index, | 4077 void Class::InsertCanonicalConstant(intptr_t index, |
| 4070 const Instance& constant) const { | 4078 const Instance& constant) const { |
| 4071 // The constant needs to be added to the list. Grow the list if it is full. | 4079 // The constant needs to be added to the list. Grow the list if it is full. |
| 4072 Array& canonical_list = Array::Handle(constants()); | 4080 Array& canonical_list = Array::Handle(constants()); |
| 4073 const intptr_t list_len = canonical_list.Length(); | 4081 const intptr_t list_len = canonical_list.Length(); |
| 4074 if (index >= list_len) { | 4082 if (index >= list_len) { |
| 4075 const intptr_t new_length = (list_len == 0) ? 4 : list_len + 4; | 4083 const intptr_t new_length = (list_len == 0) ? 4 : list_len + 4; |
| (...skipping 14955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19031 return tag_label.ToCString(); | 19039 return tag_label.ToCString(); |
| 19032 } | 19040 } |
| 19033 | 19041 |
| 19034 | 19042 |
| 19035 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19043 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19036 Instance::PrintJSONImpl(stream, ref); | 19044 Instance::PrintJSONImpl(stream, ref); |
| 19037 } | 19045 } |
| 19038 | 19046 |
| 19039 | 19047 |
| 19040 } // namespace dart | 19048 } // namespace dart |
| OLD | NEW |