| 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 9314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9325 | 9325 |
| 9326 void Library::PrintJSONImpl(JSONStream* stream, bool ref) const { | 9326 void Library::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 9327 const char* library_name = String::Handle(name()).ToCString(); | 9327 const char* library_name = String::Handle(name()).ToCString(); |
| 9328 intptr_t id = index(); | 9328 intptr_t id = index(); |
| 9329 ASSERT(id >= 0); | 9329 ASSERT(id >= 0); |
| 9330 JSONObject jsobj(stream); | 9330 JSONObject jsobj(stream); |
| 9331 jsobj.AddProperty("type", JSONType(ref)); | 9331 jsobj.AddProperty("type", JSONType(ref)); |
| 9332 jsobj.AddPropertyF("id", "libraries/%" Pd "", id); | 9332 jsobj.AddPropertyF("id", "libraries/%" Pd "", id); |
| 9333 jsobj.AddProperty("user_name", library_name); | 9333 jsobj.AddProperty("user_name", library_name); |
| 9334 jsobj.AddProperty("name", library_name); | 9334 jsobj.AddProperty("name", library_name); |
| 9335 const char* library_url = String::Handle(url()).ToCString(); |
| 9336 jsobj.AddProperty("url", library_url); |
| 9335 if (ref) { | 9337 if (ref) { |
| 9336 return; | 9338 return; |
| 9337 } | 9339 } |
| 9338 const char* library_url = String::Handle(url()).ToCString(); | |
| 9339 jsobj.AddProperty("url", library_url); | |
| 9340 { | 9340 { |
| 9341 JSONArray jsarr(&jsobj, "classes"); | 9341 JSONArray jsarr(&jsobj, "classes"); |
| 9342 ClassDictionaryIterator class_iter(*this); | 9342 ClassDictionaryIterator class_iter(*this); |
| 9343 Class& klass = Class::Handle(); | 9343 Class& klass = Class::Handle(); |
| 9344 while (class_iter.HasNext()) { | 9344 while (class_iter.HasNext()) { |
| 9345 klass = class_iter.GetNextClass(); | 9345 klass = class_iter.GetNextClass(); |
| 9346 if (!klass.IsCanonicalSignatureClass() && | 9346 if (!klass.IsCanonicalSignatureClass() && |
| 9347 !klass.IsMixinApplication()) { | 9347 !klass.IsMixinApplication()) { |
| 9348 jsarr.AddValue(klass); | 9348 jsarr.AddValue(klass); |
| 9349 } | 9349 } |
| (...skipping 9428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18778 return tag_label.ToCString(); | 18778 return tag_label.ToCString(); |
| 18779 } | 18779 } |
| 18780 | 18780 |
| 18781 | 18781 |
| 18782 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 18782 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 18783 Instance::PrintJSONImpl(stream, ref); | 18783 Instance::PrintJSONImpl(stream, ref); |
| 18784 } | 18784 } |
| 18785 | 18785 |
| 18786 | 18786 |
| 18787 } // namespace dart | 18787 } // namespace dart |
| OLD | NEW |