| 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 4427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4438 const Array& table = Array::Handle(object_store->canonical_type_arguments()); | 4438 const Array& table = Array::Handle(object_store->canonical_type_arguments()); |
| 4439 ASSERT(table.Length() > 0); | 4439 ASSERT(table.Length() > 0); |
| 4440 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); | 4440 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); |
| 4441 const intptr_t id = ring->GetIdForObject(raw()); | 4441 const intptr_t id = ring->GetIdForObject(raw()); |
| 4442 jsobj.AddProperty("type", JSONType(ref)); | 4442 jsobj.AddProperty("type", JSONType(ref)); |
| 4443 jsobj.AddPropertyF("id", "objects/%" Pd "", id); | 4443 jsobj.AddPropertyF("id", "objects/%" Pd "", id); |
| 4444 const String& user_name = String::Handle(PrettyName()); | 4444 const String& user_name = String::Handle(PrettyName()); |
| 4445 const String& vm_name = String::Handle(Name()); | 4445 const String& vm_name = String::Handle(Name()); |
| 4446 AddNameProperties(&jsobj, user_name, vm_name); | 4446 AddNameProperties(&jsobj, user_name, vm_name); |
| 4447 jsobj.AddProperty("length", Length()); | 4447 jsobj.AddProperty("length", Length()); |
| 4448 jsobj.AddProperty("num_instantiations", NumInstantiations()); | 4448 jsobj.AddProperty("numInstantiations", NumInstantiations()); |
| 4449 if (ref) { | 4449 if (ref) { |
| 4450 return; | 4450 return; |
| 4451 } | 4451 } |
| 4452 { | 4452 { |
| 4453 JSONArray jsarr(&jsobj, "types"); | 4453 JSONArray jsarr(&jsobj, "types"); |
| 4454 AbstractType& type_arg = AbstractType::Handle(); | 4454 AbstractType& type_arg = AbstractType::Handle(); |
| 4455 for (intptr_t i = 0; i < Length(); i++) { | 4455 for (intptr_t i = 0; i < Length(); i++) { |
| 4456 type_arg = TypeAt(i); | 4456 type_arg = TypeAt(i); |
| 4457 jsarr.AddValue(type_arg); | 4457 jsarr.AddValue(type_arg); |
| 4458 } | 4458 } |
| (...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6806 } | 6806 } |
| 6807 const Function& parent = Function::Handle(parent_function()); | 6807 const Function& parent = Function::Handle(parent_function()); |
| 6808 if (!parent.IsNull()) { | 6808 if (!parent.IsNull()) { |
| 6809 jsobj.AddProperty("parent", parent); | 6809 jsobj.AddProperty("parent", parent); |
| 6810 } | 6810 } |
| 6811 const char* kind_string = Function::KindToCString(kind()); | 6811 const char* kind_string = Function::KindToCString(kind()); |
| 6812 jsobj.AddProperty("kind", kind_string); | 6812 jsobj.AddProperty("kind", kind_string); |
| 6813 if (ref) { | 6813 if (ref) { |
| 6814 return; | 6814 return; |
| 6815 } | 6815 } |
| 6816 jsobj.AddProperty("is_static", is_static()); | 6816 jsobj.AddProperty("static", is_static()); |
| 6817 jsobj.AddProperty("is_const", is_const()); | 6817 jsobj.AddProperty("const", is_const()); |
| 6818 jsobj.AddProperty("is_optimizable", is_optimizable()); | 6818 jsobj.AddProperty("optimizable", is_optimizable()); |
| 6819 jsobj.AddProperty("is_inlinable", IsInlineable()); | 6819 jsobj.AddProperty("inlinable", IsInlineable()); |
| 6820 jsobj.AddProperty("unoptimized_code", Object::Handle(unoptimized_code())); | 6820 jsobj.AddProperty("unoptimizedCode", Object::Handle(unoptimized_code())); |
| 6821 jsobj.AddProperty("usage_counter", usage_counter()); | 6821 jsobj.AddProperty("usageCounter", usage_counter()); |
| 6822 jsobj.AddProperty("optimized_call_site_count", optimized_call_site_count()); | 6822 jsobj.AddProperty("optimizedCallSiteCount", optimized_call_site_count()); |
| 6823 jsobj.AddProperty("code", Object::Handle(CurrentCode())); | 6823 jsobj.AddProperty("code", Object::Handle(CurrentCode())); |
| 6824 jsobj.AddProperty("deoptimizations", | 6824 jsobj.AddProperty("deoptimizations", |
| 6825 static_cast<intptr_t>(deoptimization_counter())); | 6825 static_cast<intptr_t>(deoptimization_counter())); |
| 6826 | 6826 |
| 6827 const Script& script = Script::Handle(this->script()); | 6827 const Script& script = Script::Handle(this->script()); |
| 6828 if (!script.IsNull()) { | 6828 if (!script.IsNull()) { |
| 6829 jsobj.AddProperty("script", script); | 6829 jsobj.AddProperty("script", script); |
| 6830 jsobj.AddProperty("tokenPos", token_pos()); | 6830 jsobj.AddProperty("tokenPos", token_pos()); |
| 6831 jsobj.AddProperty("endTokenPos", end_token_pos()); | 6831 jsobj.AddProperty("endTokenPos", end_token_pos()); |
| 6832 } | 6832 } |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7150 } | 7150 } |
| 7151 | 7151 |
| 7152 if (cls.IsTopLevel()) { | 7152 if (cls.IsTopLevel()) { |
| 7153 const Library& library = Library::Handle(cls.library()); | 7153 const Library& library = Library::Handle(cls.library()); |
| 7154 jsobj.AddProperty("owner", library); | 7154 jsobj.AddProperty("owner", library); |
| 7155 } else { | 7155 } else { |
| 7156 jsobj.AddProperty("owner", cls); | 7156 jsobj.AddProperty("owner", cls); |
| 7157 } | 7157 } |
| 7158 | 7158 |
| 7159 AbstractType& declared_type = AbstractType::Handle(type()); | 7159 AbstractType& declared_type = AbstractType::Handle(type()); |
| 7160 jsobj.AddProperty("declared_type", declared_type); | 7160 jsobj.AddProperty("declaredType", declared_type); |
| 7161 jsobj.AddProperty("static", is_static()); | 7161 jsobj.AddProperty("static", is_static()); |
| 7162 jsobj.AddProperty("final", is_final()); | 7162 jsobj.AddProperty("final", is_final()); |
| 7163 jsobj.AddProperty("const", is_const()); | 7163 jsobj.AddProperty("const", is_const()); |
| 7164 if (ref) { | 7164 if (ref) { |
| 7165 return; | 7165 return; |
| 7166 } | 7166 } |
| 7167 jsobj.AddProperty("guard_nullable", is_nullable()); | 7167 jsobj.AddProperty("guardNullable", is_nullable()); |
| 7168 if (guarded_cid() == kIllegalCid) { | 7168 if (guarded_cid() == kIllegalCid) { |
| 7169 jsobj.AddProperty("guard_class", "unknown"); | 7169 jsobj.AddProperty("guardClass", "unknown"); |
| 7170 } else if (guarded_cid() == kDynamicCid) { | 7170 } else if (guarded_cid() == kDynamicCid) { |
| 7171 jsobj.AddProperty("guard_class", "dynamic"); | 7171 jsobj.AddProperty("guardClass", "dynamic"); |
| 7172 } else { | 7172 } else { |
| 7173 ClassTable* table = Isolate::Current()->class_table(); | 7173 ClassTable* table = Isolate::Current()->class_table(); |
| 7174 ASSERT(table->IsValidIndex(guarded_cid())); | 7174 ASSERT(table->IsValidIndex(guarded_cid())); |
| 7175 cls ^= table->At(guarded_cid()); | 7175 cls ^= table->At(guarded_cid()); |
| 7176 jsobj.AddProperty("guard_class", cls); | 7176 jsobj.AddProperty("guardClass", cls); |
| 7177 } | 7177 } |
| 7178 if (guarded_list_length() == kUnknownFixedLength) { | 7178 if (guarded_list_length() == kUnknownFixedLength) { |
| 7179 jsobj.AddProperty("guard_length", "unknown"); | 7179 jsobj.AddProperty("guardLength", "unknown"); |
| 7180 } else if (guarded_list_length() == kNoFixedLength) { | 7180 } else if (guarded_list_length() == kNoFixedLength) { |
| 7181 jsobj.AddProperty("guard_length", "variable"); | 7181 jsobj.AddProperty("guardLength", "variable"); |
| 7182 } else { | 7182 } else { |
| 7183 jsobj.AddProperty("guard_length", guarded_list_length()); | 7183 jsobj.AddProperty("guardLength", guarded_list_length()); |
| 7184 } | 7184 } |
| 7185 const Class& origin_cls = Class::Handle(origin()); | 7185 const Class& origin_cls = Class::Handle(origin()); |
| 7186 const Script& script = Script::Handle(origin_cls.script()); | 7186 const Script& script = Script::Handle(origin_cls.script()); |
| 7187 if (!script.IsNull()) { | 7187 if (!script.IsNull()) { |
| 7188 jsobj.AddProperty("script", script); | 7188 jsobj.AddProperty("script", script); |
| 7189 jsobj.AddProperty("token_pos", token_pos()); | 7189 jsobj.AddProperty("tokenPos", token_pos()); |
| 7190 } | 7190 } |
| 7191 } | 7191 } |
| 7192 | 7192 |
| 7193 | 7193 |
| 7194 RawArray* Field::dependent_code() const { | 7194 RawArray* Field::dependent_code() const { |
| 7195 return raw_ptr()->dependent_code_; | 7195 return raw_ptr()->dependent_code_; |
| 7196 } | 7196 } |
| 7197 | 7197 |
| 7198 | 7198 |
| 7199 void Field::set_dependent_code(const Array& array) const { | 7199 void Field::set_dependent_code(const Array& array) const { |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8466 ASSERT(!encoded_url.IsNull()); | 8466 ASSERT(!encoded_url.IsNull()); |
| 8467 const Library& lib = Library::Handle(FindLibrary()); | 8467 const Library& lib = Library::Handle(FindLibrary()); |
| 8468 intptr_t lib_index = (lib.IsNull()) ? -1 : lib.index(); | 8468 intptr_t lib_index = (lib.IsNull()) ? -1 : lib.index(); |
| 8469 jsobj.AddPropertyF("id", "libraries/%" Pd "/scripts/%s", | 8469 jsobj.AddPropertyF("id", "libraries/%" Pd "/scripts/%s", |
| 8470 lib_index, encoded_url.ToCString()); | 8470 lib_index, encoded_url.ToCString()); |
| 8471 jsobj.AddProperty("name", name.ToCString()); | 8471 jsobj.AddProperty("name", name.ToCString()); |
| 8472 jsobj.AddProperty("kind", GetKindAsCString()); | 8472 jsobj.AddProperty("kind", GetKindAsCString()); |
| 8473 if (ref) { | 8473 if (ref) { |
| 8474 return; | 8474 return; |
| 8475 } | 8475 } |
| 8476 jsobj.AddProperty("owning_library", lib); | 8476 jsobj.AddProperty("owningLibrary", lib); |
| 8477 const String& source = String::Handle(Source()); | 8477 const String& source = String::Handle(Source()); |
| 8478 jsobj.AddProperty("source", source.ToCString()); | 8478 jsobj.AddProperty("source", source.ToCString()); |
| 8479 | 8479 |
| 8480 // Print the line number table | 8480 // Print the line number table |
| 8481 { | 8481 { |
| 8482 JSONArray tokenPosTable(&jsobj, "tokenPosTable"); | 8482 JSONArray tokenPosTable(&jsobj, "tokenPosTable"); |
| 8483 | 8483 |
| 8484 const GrowableObjectArray& lineNumberArray = | 8484 const GrowableObjectArray& lineNumberArray = |
| 8485 GrowableObjectArray::Handle(GenerateLineNumberArray()); | 8485 GrowableObjectArray::Handle(GenerateLineNumberArray()); |
| 8486 Object& value = Object::Handle(); | 8486 Object& value = Object::Handle(); |
| (...skipping 3776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12263 } | 12263 } |
| 12264 | 12264 |
| 12265 | 12265 |
| 12266 void Code::PrintJSONImpl(JSONStream* stream, bool ref) const { | 12266 void Code::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 12267 JSONObject jsobj(stream); | 12267 JSONObject jsobj(stream); |
| 12268 jsobj.AddProperty("type", JSONType(ref)); | 12268 jsobj.AddProperty("type", JSONType(ref)); |
| 12269 jsobj.AddPropertyF("id", "code/%" Px64"-%" Px "", compile_timestamp(), | 12269 jsobj.AddPropertyF("id", "code/%" Px64"-%" Px "", compile_timestamp(), |
| 12270 EntryPoint()); | 12270 EntryPoint()); |
| 12271 jsobj.AddPropertyF("start", "%" Px "", EntryPoint()); | 12271 jsobj.AddPropertyF("start", "%" Px "", EntryPoint()); |
| 12272 jsobj.AddPropertyF("end", "%" Px "", EntryPoint() + Size()); | 12272 jsobj.AddPropertyF("end", "%" Px "", EntryPoint() + Size()); |
| 12273 jsobj.AddProperty("isOptimized", is_optimized()); | 12273 jsobj.AddProperty("optimized", is_optimized()); |
| 12274 jsobj.AddProperty("isAlive", is_alive()); | 12274 jsobj.AddProperty("alive", is_alive()); |
| 12275 jsobj.AddProperty("kind", "Dart"); | 12275 jsobj.AddProperty("kind", "Dart"); |
| 12276 const String& user_name = String::Handle(PrettyName()); | 12276 const String& user_name = String::Handle(PrettyName()); |
| 12277 const String& vm_name = String::Handle(Name()); | 12277 const String& vm_name = String::Handle(Name()); |
| 12278 AddNameProperties(&jsobj, user_name, vm_name); | 12278 AddNameProperties(&jsobj, user_name, vm_name); |
| 12279 const Object& obj = Object::Handle(owner()); | 12279 const Object& obj = Object::Handle(owner()); |
| 12280 if (obj.IsFunction()) { | 12280 if (obj.IsFunction()) { |
| 12281 jsobj.AddProperty("function", obj); | 12281 jsobj.AddProperty("function", obj); |
| 12282 } else { | 12282 } else { |
| 12283 // Generate a fake function reference. | 12283 // Generate a fake function reference. |
| 12284 JSONObject func(&jsobj, "function"); | 12284 JSONObject func(&jsobj, "function"); |
| 12285 func.AddProperty("type", "@Function"); | 12285 func.AddProperty("type", "@Function"); |
| 12286 func.AddProperty("kind", "Stub"); | 12286 func.AddProperty("kind", "Stub"); |
| 12287 func.AddPropertyF("id", "functions/stub-%" Pd "", EntryPoint()); | 12287 func.AddPropertyF("id", "functions/stub-%" Pd "", EntryPoint()); |
| 12288 func.AddProperty("name", user_name.ToCString()); | 12288 func.AddProperty("name", user_name.ToCString()); |
| 12289 AddNameProperties(&func, user_name, vm_name); | 12289 AddNameProperties(&func, user_name, vm_name); |
| 12290 } | 12290 } |
| 12291 if (ref) { | 12291 if (ref) { |
| 12292 return; | 12292 return; |
| 12293 } | 12293 } |
| 12294 const Array& array = Array::Handle(ObjectPool()); | 12294 const Array& array = Array::Handle(ObjectPool()); |
| 12295 jsobj.AddProperty("object_pool", array); | 12295 jsobj.AddProperty("objectPool", array); |
| 12296 { | 12296 { |
| 12297 JSONArray jsarr(&jsobj, "disassembly"); | 12297 JSONArray jsarr(&jsobj, "disassembly"); |
| 12298 if (is_alive()) { | 12298 if (is_alive()) { |
| 12299 // Only disassemble alive code objects. | 12299 // Only disassemble alive code objects. |
| 12300 DisassembleToJSONStream formatter(jsarr); | 12300 DisassembleToJSONStream formatter(jsarr); |
| 12301 Disassemble(&formatter); | 12301 Disassemble(&formatter); |
| 12302 } | 12302 } |
| 12303 } | 12303 } |
| 12304 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); | 12304 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
| 12305 if (!descriptors.IsNull()) { | 12305 if (!descriptors.IsNull()) { |
| (...skipping 2362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14668 | 14668 |
| 14669 void Type::PrintJSONImpl(JSONStream* stream, bool ref) const { | 14669 void Type::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 14670 JSONObject jsobj(stream); | 14670 JSONObject jsobj(stream); |
| 14671 PrintSharedInstanceJSON(&jsobj, ref); | 14671 PrintSharedInstanceJSON(&jsobj, ref); |
| 14672 if (IsCanonical()) { | 14672 if (IsCanonical()) { |
| 14673 const Class& type_cls = Class::Handle(type_class()); | 14673 const Class& type_cls = Class::Handle(type_class()); |
| 14674 intptr_t id = type_cls.FindCanonicalTypeIndex(*this); | 14674 intptr_t id = type_cls.FindCanonicalTypeIndex(*this); |
| 14675 ASSERT(id >= 0); | 14675 ASSERT(id >= 0); |
| 14676 intptr_t cid = type_cls.id(); | 14676 intptr_t cid = type_cls.id(); |
| 14677 jsobj.AddPropertyF("id", "classes/%" Pd "/types/%" Pd "", cid, id); | 14677 jsobj.AddPropertyF("id", "classes/%" Pd "/types/%" Pd "", cid, id); |
| 14678 jsobj.AddProperty("type_class", type_cls); | 14678 jsobj.AddProperty("typeClass", type_cls); |
| 14679 } else { | 14679 } else { |
| 14680 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); | 14680 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); |
| 14681 const intptr_t id = ring->GetIdForObject(raw()); | 14681 const intptr_t id = ring->GetIdForObject(raw()); |
| 14682 jsobj.AddPropertyF("id", "objects/%" Pd "", id); | 14682 jsobj.AddPropertyF("id", "objects/%" Pd "", id); |
| 14683 } | 14683 } |
| 14684 const String& user_name = String::Handle(PrettyName()); | 14684 const String& user_name = String::Handle(PrettyName()); |
| 14685 const String& vm_name = String::Handle(Name()); | 14685 const String& vm_name = String::Handle(Name()); |
| 14686 AddNameProperties(&jsobj, user_name, vm_name); | 14686 AddNameProperties(&jsobj, user_name, vm_name); |
| 14687 if (ref) { | 14687 if (ref) { |
| 14688 return; | 14688 return; |
| 14689 } | 14689 } |
| 14690 jsobj.AddProperty("type_arguments", TypeArguments::Handle(arguments())); | 14690 jsobj.AddProperty("typeArguments", TypeArguments::Handle(arguments())); |
| 14691 } | 14691 } |
| 14692 | 14692 |
| 14693 | 14693 |
| 14694 bool TypeRef::IsInstantiated(GrowableObjectArray* trail) const { | 14694 bool TypeRef::IsInstantiated(GrowableObjectArray* trail) const { |
| 14695 if (TestAndAddToTrail(&trail)) { | 14695 if (TestAndAddToTrail(&trail)) { |
| 14696 return true; | 14696 return true; |
| 14697 } | 14697 } |
| 14698 return AbstractType::Handle(type()).IsInstantiated(trail); | 14698 return AbstractType::Handle(type()).IsInstantiated(trail); |
| 14699 } | 14699 } |
| 14700 | 14700 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14843 PrintSharedInstanceJSON(&jsobj, ref); | 14843 PrintSharedInstanceJSON(&jsobj, ref); |
| 14844 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); | 14844 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); |
| 14845 const intptr_t id = ring->GetIdForObject(raw()); | 14845 const intptr_t id = ring->GetIdForObject(raw()); |
| 14846 jsobj.AddPropertyF("id", "objects/%" Pd "", id); | 14846 jsobj.AddPropertyF("id", "objects/%" Pd "", id); |
| 14847 const String& user_name = String::Handle(PrettyName()); | 14847 const String& user_name = String::Handle(PrettyName()); |
| 14848 const String& vm_name = String::Handle(Name()); | 14848 const String& vm_name = String::Handle(Name()); |
| 14849 AddNameProperties(&jsobj, user_name, vm_name); | 14849 AddNameProperties(&jsobj, user_name, vm_name); |
| 14850 if (ref) { | 14850 if (ref) { |
| 14851 return; | 14851 return; |
| 14852 } | 14852 } |
| 14853 jsobj.AddProperty("ref_type", AbstractType::Handle(type())); | 14853 jsobj.AddProperty("refType", AbstractType::Handle(type())); |
| 14854 } | 14854 } |
| 14855 | 14855 |
| 14856 | 14856 |
| 14857 void TypeParameter::set_is_finalized() const { | 14857 void TypeParameter::set_is_finalized() const { |
| 14858 ASSERT(!IsFinalized()); | 14858 ASSERT(!IsFinalized()); |
| 14859 set_type_state(RawTypeParameter::kFinalizedUninstantiated); | 14859 set_type_state(RawTypeParameter::kFinalizedUninstantiated); |
| 14860 } | 14860 } |
| 14861 | 14861 |
| 14862 | 14862 |
| 14863 bool TypeParameter::IsEquivalent(const Instance& other, | 14863 bool TypeParameter::IsEquivalent(const Instance& other, |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15057 void TypeParameter::PrintJSONImpl(JSONStream* stream, bool ref) const { | 15057 void TypeParameter::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 15058 JSONObject jsobj(stream); | 15058 JSONObject jsobj(stream); |
| 15059 PrintSharedInstanceJSON(&jsobj, ref); | 15059 PrintSharedInstanceJSON(&jsobj, ref); |
| 15060 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); | 15060 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); |
| 15061 const intptr_t id = ring->GetIdForObject(raw()); | 15061 const intptr_t id = ring->GetIdForObject(raw()); |
| 15062 jsobj.AddPropertyF("id", "objects/%" Pd "", id); | 15062 jsobj.AddPropertyF("id", "objects/%" Pd "", id); |
| 15063 const String& user_name = String::Handle(PrettyName()); | 15063 const String& user_name = String::Handle(PrettyName()); |
| 15064 const String& vm_name = String::Handle(Name()); | 15064 const String& vm_name = String::Handle(Name()); |
| 15065 AddNameProperties(&jsobj, user_name, vm_name); | 15065 AddNameProperties(&jsobj, user_name, vm_name); |
| 15066 const Class& param_cls = Class::Handle(parameterized_class()); | 15066 const Class& param_cls = Class::Handle(parameterized_class()); |
| 15067 jsobj.AddProperty("parameterized_class", param_cls); | 15067 jsobj.AddProperty("parameterizedClass", param_cls); |
| 15068 if (ref) { | 15068 if (ref) { |
| 15069 return; | 15069 return; |
| 15070 } | 15070 } |
| 15071 jsobj.AddProperty("index", index()); | 15071 jsobj.AddProperty("index", index()); |
| 15072 const AbstractType& upper_bound = AbstractType::Handle(bound()); | 15072 const AbstractType& upper_bound = AbstractType::Handle(bound()); |
| 15073 jsobj.AddProperty("upper_bound", upper_bound); | 15073 jsobj.AddProperty("upperBound", upper_bound); |
| 15074 } | 15074 } |
| 15075 | 15075 |
| 15076 | 15076 |
| 15077 bool BoundedType::IsMalformed() const { | 15077 bool BoundedType::IsMalformed() const { |
| 15078 return AbstractType::Handle(type()).IsMalformed(); | 15078 return AbstractType::Handle(type()).IsMalformed(); |
| 15079 } | 15079 } |
| 15080 | 15080 |
| 15081 | 15081 |
| 15082 bool BoundedType::IsMalbounded() const { | 15082 bool BoundedType::IsMalbounded() const { |
| 15083 return AbstractType::Handle(type()).IsMalbounded(); | 15083 return AbstractType::Handle(type()).IsMalbounded(); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15262 PrintSharedInstanceJSON(&jsobj, ref); | 15262 PrintSharedInstanceJSON(&jsobj, ref); |
| 15263 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); | 15263 ObjectIdRing* ring = Isolate::Current()->object_id_ring(); |
| 15264 const intptr_t id = ring->GetIdForObject(raw()); | 15264 const intptr_t id = ring->GetIdForObject(raw()); |
| 15265 jsobj.AddPropertyF("id", "objects/%" Pd "", id); | 15265 jsobj.AddPropertyF("id", "objects/%" Pd "", id); |
| 15266 const String& user_name = String::Handle(PrettyName()); | 15266 const String& user_name = String::Handle(PrettyName()); |
| 15267 const String& vm_name = String::Handle(Name()); | 15267 const String& vm_name = String::Handle(Name()); |
| 15268 AddNameProperties(&jsobj, user_name, vm_name); | 15268 AddNameProperties(&jsobj, user_name, vm_name); |
| 15269 if (ref) { | 15269 if (ref) { |
| 15270 return; | 15270 return; |
| 15271 } | 15271 } |
| 15272 jsobj.AddProperty("bounded_type", AbstractType::Handle(type())); | 15272 jsobj.AddProperty("boundedType", AbstractType::Handle(type())); |
| 15273 jsobj.AddProperty("upper_bound", AbstractType::Handle(bound())); | 15273 jsobj.AddProperty("upperBound", AbstractType::Handle(bound())); |
| 15274 } | 15274 } |
| 15275 | 15275 |
| 15276 | 15276 |
| 15277 intptr_t MixinAppType::token_pos() const { | 15277 intptr_t MixinAppType::token_pos() const { |
| 15278 return AbstractType::Handle(MixinTypeAt(0)).token_pos(); | 15278 return AbstractType::Handle(MixinTypeAt(0)).token_pos(); |
| 15279 } | 15279 } |
| 15280 | 15280 |
| 15281 | 15281 |
| 15282 intptr_t MixinAppType::Depth() const { | 15282 intptr_t MixinAppType::Depth() const { |
| 15283 return Array::Handle(mixin_types()).Length(); | 15283 return Array::Handle(mixin_types()).Length(); |
| (...skipping 4291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19575 return tag_label.ToCString(); | 19575 return tag_label.ToCString(); |
| 19576 } | 19576 } |
| 19577 | 19577 |
| 19578 | 19578 |
| 19579 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19579 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19580 Instance::PrintJSONImpl(stream, ref); | 19580 Instance::PrintJSONImpl(stream, ref); |
| 19581 } | 19581 } |
| 19582 | 19582 |
| 19583 | 19583 |
| 19584 } // namespace dart | 19584 } // namespace dart |
| OLD | NEW |