| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/debugger.h" | 5 #include "vm/debugger.h" |
| 6 #include "vm/disassembler.h" | 6 #include "vm/disassembler.h" |
| 7 #include "vm/object.h" | 7 #include "vm/object.h" |
| 8 #include "vm/object_store.h" | 8 #include "vm/object_store.h" |
| 9 #include "vm/stub_code.h" | 9 #include "vm/stub_code.h" |
| 10 #include "vm/symbols.h" | 10 #include "vm/symbols.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 327 } |
| 328 | 328 |
| 329 | 329 |
| 330 void RedirectionData::PrintJSONImpl(JSONStream* stream, bool ref) const { | 330 void RedirectionData::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 331 Object::PrintJSONImpl(stream, ref); | 331 Object::PrintJSONImpl(stream, ref); |
| 332 } | 332 } |
| 333 | 333 |
| 334 | 334 |
| 335 void Field::PrintJSONImpl(JSONStream* stream, bool ref) const { | 335 void Field::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 336 JSONObject jsobj(stream); | 336 JSONObject jsobj(stream); |
| 337 Class& cls = Class::Handle(owner()); | 337 Class& cls = Class::Handle(Owner()); |
| 338 String& field_name = String::Handle(name()); | 338 String& field_name = String::Handle(name()); |
| 339 field_name = String::EncodeIRI(field_name); | 339 field_name = String::EncodeIRI(field_name); |
| 340 AddCommonObjectProperties(&jsobj, "Field", ref); | 340 AddCommonObjectProperties(&jsobj, "Field", ref); |
| 341 jsobj.AddFixedServiceId("classes/%" Pd "/fields/%s", | 341 jsobj.AddFixedServiceId("classes/%" Pd "/fields/%s", |
| 342 cls.id(), field_name.ToCString()); | 342 cls.id(), field_name.ToCString()); |
| 343 | 343 |
| 344 const String& user_name = String::Handle(UserVisibleName()); | 344 const String& user_name = String::Handle(UserVisibleName()); |
| 345 const String& vm_name = String::Handle(name()); | 345 const String& vm_name = String::Handle(name()); |
| 346 AddNameProperties(&jsobj, user_name, vm_name); | 346 AddNameProperties(&jsobj, user_name, vm_name); |
| 347 if (cls.IsTopLevel()) { | 347 if (cls.IsTopLevel()) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 375 cls ^= table->At(guarded_cid()); | 375 cls ^= table->At(guarded_cid()); |
| 376 jsobj.AddProperty("_guardClass", cls); | 376 jsobj.AddProperty("_guardClass", cls); |
| 377 } | 377 } |
| 378 if (guarded_list_length() == kUnknownFixedLength) { | 378 if (guarded_list_length() == kUnknownFixedLength) { |
| 379 jsobj.AddProperty("_guardLength", "unknown"); | 379 jsobj.AddProperty("_guardLength", "unknown"); |
| 380 } else if (guarded_list_length() == kNoFixedLength) { | 380 } else if (guarded_list_length() == kNoFixedLength) { |
| 381 jsobj.AddProperty("_guardLength", "variable"); | 381 jsobj.AddProperty("_guardLength", "variable"); |
| 382 } else { | 382 } else { |
| 383 jsobj.AddProperty("_guardLength", guarded_list_length()); | 383 jsobj.AddProperty("_guardLength", guarded_list_length()); |
| 384 } | 384 } |
| 385 const Class& origin_cls = Class::Handle(origin()); | 385 const Class& origin_cls = Class::Handle(Origin()); |
| 386 const Script& script = Script::Handle(origin_cls.script()); | 386 const class Script& script = Script::Handle(origin_cls.script()); |
| 387 if (!script.IsNull()) { | 387 if (!script.IsNull()) { |
| 388 jsobj.AddLocation(script, token_pos()); | 388 jsobj.AddLocation(script, token_pos()); |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 | 391 |
| 392 | 392 |
| 393 void LiteralToken::PrintJSONImpl(JSONStream* stream, bool ref) const { | 393 void LiteralToken::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 394 Object::PrintJSONImpl(stream, ref); | 394 Object::PrintJSONImpl(stream, ref); |
| 395 } | 395 } |
| 396 | 396 |
| (...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 jsobj.AddProperty("mirrorReferent", referent_handle); | 1593 jsobj.AddProperty("mirrorReferent", referent_handle); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 1596 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 1597 Instance::PrintJSONImpl(stream, ref); | 1597 Instance::PrintJSONImpl(stream, ref); |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 #endif | 1600 #endif |
| 1601 | 1601 |
| 1602 } // namespace dart | 1602 } // namespace dart |
| OLD | NEW |