| 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/service.h" | 5 #include "vm/service.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2489 | 2489 |
| 2490 private: | 2490 private: |
| 2491 JSONArray* jsarr_; | 2491 JSONArray* jsarr_; |
| 2492 }; | 2492 }; |
| 2493 | 2493 |
| 2494 | 2494 |
| 2495 static bool HandleVM(JSONStream* js) { | 2495 static bool HandleVM(JSONStream* js) { |
| 2496 JSONObject jsobj(js); | 2496 JSONObject jsobj(js); |
| 2497 jsobj.AddProperty("type", "VM"); | 2497 jsobj.AddProperty("type", "VM"); |
| 2498 jsobj.AddProperty("id", "vm"); | 2498 jsobj.AddProperty("id", "vm"); |
| 2499 jsobj.AddProperty("architectureBits", static_cast<intptr_t>(kBitsPerWord)); |
| 2499 jsobj.AddProperty("targetCPU", CPU::Id()); | 2500 jsobj.AddProperty("targetCPU", CPU::Id()); |
| 2500 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); | 2501 jsobj.AddProperty("hostCPU", HostCPUFeatures::hardware()); |
| 2501 jsobj.AddPropertyF("date", "%" Pd64 "", OS::GetCurrentTimeMillis()); | 2502 jsobj.AddPropertyF("date", "%" Pd64 "", OS::GetCurrentTimeMillis()); |
| 2502 jsobj.AddProperty("version", Version::String()); | 2503 jsobj.AddProperty("version", Version::String()); |
| 2503 // Send pid as a string because it allows us to avoid any issues with | 2504 // Send pid as a string because it allows us to avoid any issues with |
| 2504 // pids > 53-bits (when consumed by JavaScript). | 2505 // pids > 53-bits (when consumed by JavaScript). |
| 2505 // TODO(johnmccutchan): Codify how integers are sent across the service. | 2506 // TODO(johnmccutchan): Codify how integers are sent across the service. |
| 2506 jsobj.AddPropertyF("pid", "%" Pd "", OS::ProcessId()); | 2507 jsobj.AddPropertyF("pid", "%" Pd "", OS::ProcessId()); |
| 2507 jsobj.AddProperty("assertsEnabled", FLAG_enable_asserts); | 2508 jsobj.AddProperty("assertsEnabled", FLAG_enable_asserts); |
| 2508 jsobj.AddProperty("typeChecksEnabled", FLAG_enable_type_checks); | 2509 jsobj.AddProperty("typeChecksEnabled", FLAG_enable_type_checks); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2745 while (current != NULL) { | 2746 while (current != NULL) { |
| 2746 if (strcmp(name, current->name()) == 0) { | 2747 if (strcmp(name, current->name()) == 0) { |
| 2747 return current; | 2748 return current; |
| 2748 } | 2749 } |
| 2749 current = current->next(); | 2750 current = current->next(); |
| 2750 } | 2751 } |
| 2751 return NULL; | 2752 return NULL; |
| 2752 } | 2753 } |
| 2753 | 2754 |
| 2754 } // namespace dart | 2755 } // namespace dart |
| OLD | NEW |