Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: runtime/vm/dart.cc

Issue 9242035: Give isolates names to be used during debugging. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_index_table.h" 7 #include "vm/code_index_table.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/freelist.h" 9 #include "vm/freelist.h"
10 #include "vm/handles.h" 10 #include "vm/handles.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 OS::InitOnce(); 33 OS::InitOnce();
34 VirtualMemory::InitOnce(); 34 VirtualMemory::InitOnce();
35 Isolate::InitOnce(); 35 Isolate::InitOnce();
36 PortMap::InitOnce(); 36 PortMap::InitOnce();
37 FreeListElement::InitOnce(); 37 FreeListElement::InitOnce();
38 // Create the VM isolate and finish the VM initialization. 38 // Create the VM isolate and finish the VM initialization.
39 { 39 {
40 ASSERT(vm_isolate_ == NULL); 40 ASSERT(vm_isolate_ == NULL);
41 ASSERT(Flags::Initialized()); 41 ASSERT(Flags::Initialized());
42 vm_isolate_ = Isolate::Init(); 42 vm_isolate_ = Isolate::Init("vm-isolate");
43 Zone zone(vm_isolate_); 43 Zone zone(vm_isolate_);
44 HandleScope handle_scope(vm_isolate_); 44 HandleScope handle_scope(vm_isolate_);
45 Heap::Init(vm_isolate_); 45 Heap::Init(vm_isolate_);
46 ObjectStore::Init(vm_isolate_); 46 ObjectStore::Init(vm_isolate_);
47 Object::InitOnce(); 47 Object::InitOnce();
48 StubCode::InitOnce(); 48 StubCode::InitOnce();
49 Scanner::InitOnce(); 49 Scanner::InitOnce();
50 } 50 }
51 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread. 51 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread.
52 Isolate::SetCreateCallback(create); 52 Isolate::SetCreateCallback(create);
53 Isolate::SetInterruptCallback(interrupt); 53 Isolate::SetInterruptCallback(interrupt);
54 return true; 54 return true;
55 } 55 }
56 56
57 57
58 Isolate* Dart::CreateIsolate() { 58 Isolate* Dart::CreateIsolate(const char* name_prefix) {
59 // Create a new isolate. 59 // Create a new isolate.
60 Isolate* isolate = Isolate::Init(); 60 Isolate* isolate = Isolate::Init(name_prefix);
61 ASSERT(isolate != NULL); 61 ASSERT(isolate != NULL);
62 return isolate; 62 return isolate;
63 } 63 }
64 64
65 65
66 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { 66 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
67 // Initialize the new isolate. 67 // Initialize the new isolate.
68 TIMERSCOPE(time_isolate_initialization); 68 TIMERSCOPE(time_isolate_initialization);
69 Isolate* isolate = Isolate::Current(); 69 Isolate* isolate = Isolate::Current();
70 ASSERT(isolate != NULL); 70 ASSERT(isolate != NULL);
(...skipping 19 matching lines...) Expand all
90 } 90 }
91 91
92 92
93 void Dart::ShutdownIsolate() { 93 void Dart::ShutdownIsolate() {
94 Isolate* isolate = Isolate::Current(); 94 Isolate* isolate = Isolate::Current();
95 isolate->Shutdown(); 95 isolate->Shutdown();
96 delete isolate; 96 delete isolate;
97 } 97 }
98 98
99 } // namespace dart 99 } // namespace dart
OLDNEW
« runtime/include/dart_api.h ('K') | « runtime/vm/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698