| 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 10185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10196 const char* function_name = name.ToCString(); | 10196 const char* function_name = name.ToCString(); |
| 10197 jsobj.AddPropertyF("user_name", "%s%s", is_optimized() ? "*" : "", | 10197 jsobj.AddPropertyF("user_name", "%s%s", is_optimized() ? "*" : "", |
| 10198 function_name); | 10198 function_name); |
| 10199 if (ref) { | 10199 if (ref) { |
| 10200 return; | 10200 return; |
| 10201 } | 10201 } |
| 10202 jsobj.AddProperty("is_optimized", is_optimized()); | 10202 jsobj.AddProperty("is_optimized", is_optimized()); |
| 10203 jsobj.AddProperty("is_alive", is_alive()); | 10203 jsobj.AddProperty("is_alive", is_alive()); |
| 10204 jsobj.AddProperty("function", Object::Handle(function())); | 10204 jsobj.AddProperty("function", Object::Handle(function())); |
| 10205 JSONArray jsarr(&jsobj, "disassembly"); | 10205 JSONArray jsarr(&jsobj, "disassembly"); |
| 10206 DisassembleToJSONStream formatter(jsarr); | 10206 if (is_alive()) { |
| 10207 Disassemble(&formatter); | 10207 // Only disassemble alive code objects. |
| 10208 DisassembleToJSONStream formatter(jsarr); |
| 10209 Disassemble(&formatter); |
| 10210 } |
| 10208 } | 10211 } |
| 10209 | 10212 |
| 10210 | 10213 |
| 10211 uword Code::GetPatchCodePc() const { | 10214 uword Code::GetPatchCodePc() const { |
| 10212 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); | 10215 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
| 10213 return descriptors.GetPcForKind(PcDescriptors::kPatchCode); | 10216 return descriptors.GetPcForKind(PcDescriptors::kPatchCode); |
| 10214 } | 10217 } |
| 10215 | 10218 |
| 10216 | 10219 |
| 10217 uword Code::GetLazyDeoptPc() const { | 10220 uword Code::GetLazyDeoptPc() const { |
| (...skipping 7007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17225 return "_MirrorReference"; | 17228 return "_MirrorReference"; |
| 17226 } | 17229 } |
| 17227 | 17230 |
| 17228 | 17231 |
| 17229 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17232 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 17230 Instance::PrintToJSONStream(stream, ref); | 17233 Instance::PrintToJSONStream(stream, ref); |
| 17231 } | 17234 } |
| 17232 | 17235 |
| 17233 | 17236 |
| 17234 } // namespace dart | 17237 } // namespace dart |
| OLD | NEW |