| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/json.h" | 10 #include "platform/json.h" |
| (...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1823 default: | 1823 default: |
| 1824 UNIMPLEMENTED(); | 1824 UNIMPLEMENTED(); |
| 1825 return NULL; | 1825 return NULL; |
| 1826 } | 1826 } |
| 1827 } | 1827 } |
| 1828 | 1828 |
| 1829 | 1829 |
| 1830 void Isolate::PrintJSON(JSONStream* stream, bool ref) { | 1830 void Isolate::PrintJSON(JSONStream* stream, bool ref) { |
| 1831 JSONObject jsobj(stream); | 1831 JSONObject jsobj(stream); |
| 1832 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); | 1832 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); |
| 1833 jsobj.AddFixedServiceId("isolates/%" Pd "", | 1833 jsobj.AddFixedServiceId("isolates/%" Pd64 "", |
| 1834 static_cast<intptr_t>(main_port())); | 1834 static_cast<int64_t>(main_port())); |
| 1835 | 1835 |
| 1836 jsobj.AddProperty("name", debugger_name()); | 1836 jsobj.AddProperty("name", debugger_name()); |
| 1837 jsobj.AddPropertyF("number", "%" Pd "", | 1837 jsobj.AddPropertyF("number", "%" Pd64 "", |
| 1838 static_cast<intptr_t>(main_port())); | 1838 static_cast<int64_t>(main_port())); |
| 1839 if (ref) { | 1839 if (ref) { |
| 1840 return; | 1840 return; |
| 1841 } | 1841 } |
| 1842 jsobj.AddPropertyF("_originNumber", "%" Pd "", | 1842 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", |
| 1843 static_cast<intptr_t>(origin_id())); | 1843 static_cast<int64_t>(origin_id())); |
| 1844 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; | 1844 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; |
| 1845 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); | 1845 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); |
| 1846 { | 1846 { |
| 1847 JSONObject jsheap(&jsobj, "_heaps"); | 1847 JSONObject jsheap(&jsobj, "_heaps"); |
| 1848 heap()->PrintToJSONObject(Heap::kNew, &jsheap); | 1848 heap()->PrintToJSONObject(Heap::kNew, &jsheap); |
| 1849 heap()->PrintToJSONObject(Heap::kOld, &jsheap); | 1849 heap()->PrintToJSONObject(Heap::kOld, &jsheap); |
| 1850 } | 1850 } |
| 1851 | 1851 |
| 1852 jsobj.AddProperty("livePorts", message_handler()->live_ports()); | 1852 jsobj.AddProperty("livePorts", message_handler()->live_ports()); |
| 1853 jsobj.AddProperty("pauseOnExit", message_handler()->pause_on_exit()); | 1853 jsobj.AddProperty("pauseOnExit", message_handler()->pause_on_exit()); |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2602 serialized_message_, serialized_message_len_); | 2602 serialized_message_, serialized_message_len_); |
| 2603 } | 2603 } |
| 2604 | 2604 |
| 2605 | 2605 |
| 2606 void IsolateSpawnState::Cleanup() { | 2606 void IsolateSpawnState::Cleanup() { |
| 2607 SwitchIsolateScope switch_scope(I); | 2607 SwitchIsolateScope switch_scope(I); |
| 2608 Dart::ShutdownIsolate(); | 2608 Dart::ShutdownIsolate(); |
| 2609 } | 2609 } |
| 2610 | 2610 |
| 2611 } // namespace dart | 2611 } // namespace dart |
| OLD | NEW |