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 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 // Forward declarations. | 13 // Forward declarations. |
14 class DebugInfo; | 14 class DebugInfo; |
15 class Isolate; | 15 class Isolate; |
16 class RawError; | 16 class RawError; |
17 class ThreadPool; | 17 class ThreadPool; |
18 | 18 |
19 class Dart : public AllStatic { | 19 class Dart : public AllStatic { |
20 public: | 20 public: |
21 static const char* InitOnce(Dart_IsolateCreateCallback create, | 21 static const char* InitOnce( |
22 Dart_IsolateInterruptCallback interrupt, | 22 Dart_IsolateCreateCallback create, |
23 Dart_IsolateShutdownCallback shutdown); | 23 Dart_IsolateInterruptCallback interrupt, |
| 24 Dart_IsolateUnhandledExceptionCallback unhandled, |
| 25 Dart_IsolateShutdownCallback shutdown); |
24 | 26 |
25 static Isolate* CreateIsolate(const char* name_prefix); | 27 static Isolate* CreateIsolate(const char* name_prefix); |
26 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); | 28 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); |
27 static void ShutdownIsolate(); | 29 static void ShutdownIsolate(); |
28 | 30 |
29 static Isolate* vm_isolate() { return vm_isolate_; } | 31 static Isolate* vm_isolate() { return vm_isolate_; } |
30 static ThreadPool* thread_pool() { return thread_pool_; } | 32 static ThreadPool* thread_pool() { return thread_pool_; } |
31 | 33 |
32 static void set_perf_events_writer(Dart_FileWriterFunction writer_function) { | 34 static void set_perf_events_writer(Dart_FileWriterFunction writer_function) { |
33 perf_events_writer_ = writer_function; | 35 perf_events_writer_ = writer_function; |
(...skipping 18 matching lines...) Expand all Loading... |
52 static Isolate* vm_isolate_; | 54 static Isolate* vm_isolate_; |
53 static ThreadPool* thread_pool_; | 55 static ThreadPool* thread_pool_; |
54 static Dart_FileWriterFunction perf_events_writer_; | 56 static Dart_FileWriterFunction perf_events_writer_; |
55 static DebugInfo* pprof_symbol_generator_; | 57 static DebugInfo* pprof_symbol_generator_; |
56 static Dart_FileWriterFunction flow_graph_writer_; | 58 static Dart_FileWriterFunction flow_graph_writer_; |
57 }; | 59 }; |
58 | 60 |
59 } // namespace dart | 61 } // namespace dart |
60 | 62 |
61 #endif // VM_DART_H_ | 63 #endif // VM_DART_H_ |
OLD | NEW |