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

Side by Side Diff: vm/dart.cc

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « vm/compiler_test.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/dart_api_state.h" 7 #include "vm/dart_api_state.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"
11 #include "vm/heap.h" 11 #include "vm/heap.h"
12 #include "vm/isolate.h" 12 #include "vm/isolate.h"
13 #include "vm/object.h" 13 #include "vm/object.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/port.h" 15 #include "vm/port.h"
16 #include "vm/snapshot.h" 16 #include "vm/snapshot.h"
17 #include "vm/stub_code.h" 17 #include "vm/stub_code.h"
18 #include "vm/symbols.h"
18 #include "vm/thread_pool.h" 19 #include "vm/thread_pool.h"
19 #include "vm/virtual_memory.h" 20 #include "vm/virtual_memory.h"
20 #include "vm/zone.h" 21 #include "vm/zone.h"
21 22
22 namespace dart { 23 namespace dart {
23 24
24 DECLARE_FLAG(bool, print_class_table); 25 DECLARE_FLAG(bool, print_class_table);
25 DECLARE_FLAG(bool, trace_isolates); 26 DECLARE_FLAG(bool, trace_isolates);
26 27
27 Isolate* Dart::vm_isolate_ = NULL; 28 Isolate* Dart::vm_isolate_ = NULL;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ASSERT(vm_isolate_ == NULL); 66 ASSERT(vm_isolate_ == NULL);
66 ASSERT(Flags::Initialized()); 67 ASSERT(Flags::Initialized());
67 vm_isolate_ = Isolate::Init("vm-isolate"); 68 vm_isolate_ = Isolate::Init("vm-isolate");
68 Zone zone(vm_isolate_); 69 Zone zone(vm_isolate_);
69 HandleScope handle_scope(vm_isolate_); 70 HandleScope handle_scope(vm_isolate_);
70 Heap::Init(vm_isolate_); 71 Heap::Init(vm_isolate_);
71 ObjectStore::Init(vm_isolate_); 72 ObjectStore::Init(vm_isolate_);
72 Object::InitOnce(); 73 Object::InitOnce();
73 StubCode::InitOnce(); 74 StubCode::InitOnce();
74 Scanner::InitOnce(); 75 Scanner::InitOnce();
76 Symbols::InitOnce(vm_isolate_);
75 PremarkingVisitor premarker(vm_isolate_); 77 PremarkingVisitor premarker(vm_isolate_);
76 vm_isolate_->heap()->IterateOldObjects(&premarker); 78 vm_isolate_->heap()->IterateOldObjects(&premarker);
77 } 79 }
78 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread. 80 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread.
79 Isolate::SetCreateCallback(create); 81 Isolate::SetCreateCallback(create);
80 Isolate::SetInterruptCallback(interrupt); 82 Isolate::SetInterruptCallback(interrupt);
81 Isolate::SetShutdownCallback(shutdown); 83 Isolate::SetShutdownCallback(shutdown);
82 return true; 84 return true;
83 } 85 }
84 86
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 isolate->Shutdown(); 139 isolate->Shutdown();
138 delete isolate; 140 delete isolate;
139 141
140 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); 142 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
141 if (callback != NULL) { 143 if (callback != NULL) {
142 (callback)(callback_data); 144 (callback)(callback_data);
143 } 145 }
144 } 146 }
145 147
146 } // namespace dart 148 } // namespace dart
OLDNEW
« no previous file with comments | « vm/compiler_test.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698