| 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 7557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7568 const char* cls_name = String::Handle(cls.Name()).ToCString(); | 7568 const char* cls_name = String::Handle(cls.Name()).ToCString(); |
| 7569 return OS::SCreate(Thread::Current()->zone(), | 7569 return OS::SCreate(Thread::Current()->zone(), |
| 7570 "Field <%s.%s>:%s%s%s", cls_name, field_name, kF0, kF1, kF2); | 7570 "Field <%s.%s>:%s%s%s", cls_name, field_name, kF0, kF1, kF2); |
| 7571 } | 7571 } |
| 7572 | 7572 |
| 7573 | 7573 |
| 7574 void Field::PrintJSONImpl(JSONStream* stream, bool ref) const { | 7574 void Field::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 7575 JSONObject jsobj(stream); | 7575 JSONObject jsobj(stream); |
| 7576 Class& cls = Class::Handle(owner()); | 7576 Class& cls = Class::Handle(owner()); |
| 7577 String& field_name = String::Handle(name()); | 7577 String& field_name = String::Handle(name()); |
| 7578 ASSERT(cls.LookupField(field_name) == this->raw()); | |
| 7579 field_name = String::EncodeIRI(field_name); | 7578 field_name = String::EncodeIRI(field_name); |
| 7580 AddCommonObjectProperties(&jsobj, "Field", ref); | 7579 AddCommonObjectProperties(&jsobj, "Field", ref); |
| 7581 jsobj.AddFixedServiceId("classes/%" Pd "/fields/%s", | 7580 jsobj.AddFixedServiceId("classes/%" Pd "/fields/%s", |
| 7582 cls.id(), field_name.ToCString()); | 7581 cls.id(), field_name.ToCString()); |
| 7583 | 7582 |
| 7584 const String& user_name = String::Handle(PrettyName()); | 7583 const String& user_name = String::Handle(PrettyName()); |
| 7585 const String& vm_name = String::Handle(name()); | 7584 const String& vm_name = String::Handle(name()); |
| 7586 AddNameProperties(&jsobj, user_name, vm_name); | 7585 AddNameProperties(&jsobj, user_name, vm_name); |
| 7587 if (cls.IsTopLevel()) { | 7586 if (cls.IsTopLevel()) { |
| 7588 const Library& library = Library::Handle(cls.library()); | 7587 const Library& library = Library::Handle(cls.library()); |
| (...skipping 14334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21923 return tag_label.ToCString(); | 21922 return tag_label.ToCString(); |
| 21924 } | 21923 } |
| 21925 | 21924 |
| 21926 | 21925 |
| 21927 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21926 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 21928 Instance::PrintJSONImpl(stream, ref); | 21927 Instance::PrintJSONImpl(stream, ref); |
| 21929 } | 21928 } |
| 21930 | 21929 |
| 21931 | 21930 |
| 21932 } // namespace dart | 21931 } // namespace dart |
| OLD | NEW |