OLD | NEW |
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 #ifndef VM_DART_H_ | 5 #ifndef VM_DART_H_ |
6 #define VM_DART_H_ | 6 #define VM_DART_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 static const char* InitOnce( | 22 static const char* InitOnce( |
23 Dart_IsolateCreateCallback create, | 23 Dart_IsolateCreateCallback create, |
24 Dart_IsolateInterruptCallback interrupt, | 24 Dart_IsolateInterruptCallback interrupt, |
25 Dart_IsolateUnhandledExceptionCallback unhandled, | 25 Dart_IsolateUnhandledExceptionCallback unhandled, |
26 Dart_IsolateShutdownCallback shutdown, | 26 Dart_IsolateShutdownCallback shutdown, |
27 Dart_FileOpenCallback file_open, | 27 Dart_FileOpenCallback file_open, |
28 Dart_FileReadCallback file_read, | 28 Dart_FileReadCallback file_read, |
29 Dart_FileWriteCallback file_write, | 29 Dart_FileWriteCallback file_write, |
30 Dart_FileCloseCallback file_close); | 30 Dart_FileCloseCallback file_close); |
| 31 static const char* Cleanup(); |
31 | 32 |
32 static Isolate* CreateIsolate(const char* name_prefix); | 33 static Isolate* CreateIsolate(const char* name_prefix); |
33 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); | 34 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); |
34 static void RunShutdownCallback(); | 35 static void RunShutdownCallback(); |
35 static void ShutdownIsolate(); | 36 static void ShutdownIsolate(); |
36 | 37 |
37 static Isolate* vm_isolate() { return vm_isolate_; } | 38 static Isolate* vm_isolate() { return vm_isolate_; } |
38 static ThreadPool* thread_pool() { return thread_pool_; } | 39 static ThreadPool* thread_pool() { return thread_pool_; } |
39 | 40 |
40 static void set_pprof_symbol_generator(DebugInfo* value) { | 41 static void set_pprof_symbol_generator(DebugInfo* value) { |
41 pprof_symbol_generator_ = value; | 42 pprof_symbol_generator_ = value; |
42 } | 43 } |
43 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } | 44 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } |
44 | 45 |
45 static uword AllocateReadOnlyHandle(); | 46 static uword AllocateReadOnlyHandle(); |
46 static bool IsReadOnlyHandle(uword address); | 47 static bool IsReadOnlyHandle(uword address); |
47 | 48 |
48 private: | 49 private: |
49 static Isolate* vm_isolate_; | 50 static Isolate* vm_isolate_; |
50 static ThreadPool* thread_pool_; | 51 static ThreadPool* thread_pool_; |
51 static DebugInfo* pprof_symbol_generator_; | 52 static DebugInfo* pprof_symbol_generator_; |
52 static ReadOnlyHandles* predefined_handles_; | 53 static ReadOnlyHandles* predefined_handles_; |
53 }; | 54 }; |
54 | 55 |
55 } // namespace dart | 56 } // namespace dart |
56 | 57 |
57 #endif // VM_DART_H_ | 58 #endif // VM_DART_H_ |
OLD | NEW |