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

Side by Side Diff: vm/dart.cc

Issue 9965042: - Add a class index to the classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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) 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/code_index_table.h" 7 #include "vm/code_index_table.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/freelist.h" 10 #include "vm/freelist.h"
11 #include "vm/handles.h" 11 #include "vm/handles.h"
12 #include "vm/heap.h" 12 #include "vm/heap.h"
13 #include "vm/isolate.h" 13 #include "vm/isolate.h"
14 #include "vm/object.h" 14 #include "vm/object.h"
15 #include "vm/object_store.h" 15 #include "vm/object_store.h"
16 #include "vm/port.h" 16 #include "vm/port.h"
17 #include "vm/snapshot.h" 17 #include "vm/snapshot.h"
18 #include "vm/stub_code.h" 18 #include "vm/stub_code.h"
19 #include "vm/virtual_memory.h" 19 #include "vm/virtual_memory.h"
20 #include "vm/zone.h" 20 #include "vm/zone.h"
21 21
22 namespace dart { 22 namespace dart {
23 23
24 DECLARE_FLAG(bool, print_class_table);
24 DECLARE_FLAG(bool, trace_isolates); 25 DECLARE_FLAG(bool, trace_isolates);
25 26
26 Isolate* Dart::vm_isolate_ = NULL; 27 Isolate* Dart::vm_isolate_ = NULL;
27 DebugInfo* Dart::pprof_symbol_generator_ = NULL; 28 DebugInfo* Dart::pprof_symbol_generator_ = NULL;
28 29
29 bool Dart::InitOnce(Dart_IsolateCreateCallback create, 30 bool Dart::InitOnce(Dart_IsolateCreateCallback create,
30 Dart_IsolateInterruptCallback interrupt) { 31 Dart_IsolateInterruptCallback interrupt) {
31 // TODO(iposva): Fix race condition here. 32 // TODO(iposva): Fix race condition here.
32 if (vm_isolate_ != NULL || !Flags::Initialized()) { 33 if (vm_isolate_ != NULL || !Flags::Initialized()) {
33 return false; 34 return false;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (FLAG_trace_isolates) { 90 if (FLAG_trace_isolates) {
90 OS::Print("Size of isolate snapshot = %ld\n", snapshot->length()); 91 OS::Print("Size of isolate snapshot = %ld\n", snapshot->length());
91 } 92 }
92 SnapshotReader reader(snapshot, isolate); 93 SnapshotReader reader(snapshot, isolate);
93 reader.ReadFullSnapshot(); 94 reader.ReadFullSnapshot();
94 } 95 }
95 96
96 StubCode::Init(isolate); 97 StubCode::Init(isolate);
97 CodeIndexTable::Init(isolate); 98 CodeIndexTable::Init(isolate);
98 isolate->set_init_callback_data(data); 99 isolate->set_init_callback_data(data);
100 if (FLAG_print_class_table) {
101 isolate->class_table()->Print();
102 }
99 return Error::null(); 103 return Error::null();
100 } 104 }
101 105
102 106
103 void Dart::ShutdownIsolate() { 107 void Dart::ShutdownIsolate() {
104 Isolate* isolate = Isolate::Current(); 108 Isolate* isolate = Isolate::Current();
105 isolate->Shutdown(); 109 isolate->Shutdown();
106 delete isolate; 110 delete isolate;
107 } 111 }
108 112
109 } // namespace dart 113 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698