| 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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 // Verify that we are never reusing a live origin id. | 880 // Verify that we are never reusing a live origin id. |
| 881 VerifyOriginId id_verifier(result->main_port()); | 881 VerifyOriginId id_verifier(result->main_port()); |
| 882 Isolate::VisitIsolates(&id_verifier); | 882 Isolate::VisitIsolates(&id_verifier); |
| 883 #endif | 883 #endif |
| 884 result->set_origin_id(result->main_port()); | 884 result->set_origin_id(result->main_port()); |
| 885 result->set_pause_capability(result->random()->NextUInt64()); | 885 result->set_pause_capability(result->random()->NextUInt64()); |
| 886 result->set_terminate_capability(result->random()->NextUInt64()); | 886 result->set_terminate_capability(result->random()->NextUInt64()); |
| 887 | 887 |
| 888 result->BuildName(name_prefix); | 888 result->BuildName(name_prefix); |
| 889 result->debugger_ = new Debugger(); | 889 result->debugger_ = new Debugger(); |
| 890 result->debugger_->Initialize(result); | 890 result->debugger_->Initialize(Thread::Current()); |
| 891 if (FLAG_trace_isolates) { | 891 if (FLAG_trace_isolates) { |
| 892 if (name_prefix == NULL || strcmp(name_prefix, "vm-isolate") != 0) { | 892 if (name_prefix == NULL || strcmp(name_prefix, "vm-isolate") != 0) { |
| 893 OS::Print("[+] Starting isolate:\n" | 893 OS::Print("[+] Starting isolate:\n" |
| 894 "\tisolate: %s\n", result->name()); | 894 "\tisolate: %s\n", result->name()); |
| 895 } | 895 } |
| 896 } | 896 } |
| 897 | 897 |
| 898 result->compiler_stats_ = new CompilerStats(result); | 898 result->compiler_stats_ = new CompilerStats(result); |
| 899 if (FLAG_compiler_benchmark) { | 899 if (FLAG_compiler_benchmark) { |
| 900 result->compiler_stats_->EnableBenchmark(); | 900 result->compiler_stats_->EnableBenchmark(); |
| (...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 serialized_message_, serialized_message_len_); | 2575 serialized_message_, serialized_message_len_); |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 | 2578 |
| 2579 void IsolateSpawnState::Cleanup() { | 2579 void IsolateSpawnState::Cleanup() { |
| 2580 SwitchIsolateScope switch_scope(I); | 2580 SwitchIsolateScope switch_scope(I); |
| 2581 Dart::ShutdownIsolate(); | 2581 Dart::ShutdownIsolate(); |
| 2582 } | 2582 } |
| 2583 | 2583 |
| 2584 } // namespace dart | 2584 } // namespace dart |
| OLD | NEW |