| 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 11 matching lines...) Expand all Loading... |
| 22 Dart_IsolateInterruptCallback interrupt, | 22 Dart_IsolateInterruptCallback interrupt, |
| 23 Dart_IsolateShutdownCallback shutdown); | 23 Dart_IsolateShutdownCallback shutdown); |
| 24 | 24 |
| 25 static Isolate* CreateIsolate(const char* name_prefix); | 25 static Isolate* CreateIsolate(const char* name_prefix); |
| 26 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); | 26 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); |
| 27 static void ShutdownIsolate(); | 27 static void ShutdownIsolate(); |
| 28 | 28 |
| 29 static Isolate* vm_isolate() { return vm_isolate_; } | 29 static Isolate* vm_isolate() { return vm_isolate_; } |
| 30 static ThreadPool* thread_pool() { return thread_pool_; } | 30 static ThreadPool* thread_pool() { return thread_pool_; } |
| 31 | 31 |
| 32 static void set_perf_events_writer(Dart_FileWriterFunction writer_function) { |
| 33 perf_events_writer_ = writer_function; |
| 34 } |
| 35 static Dart_FileWriterFunction perf_events_writer() { |
| 36 return perf_events_writer_; |
| 37 } |
| 38 |
| 32 static void set_pprof_symbol_generator(DebugInfo* value) { | 39 static void set_pprof_symbol_generator(DebugInfo* value) { |
| 33 pprof_symbol_generator_ = value; | 40 pprof_symbol_generator_ = value; |
| 34 } | 41 } |
| 35 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } | 42 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } |
| 36 | 43 |
| 37 static void set_flow_graph_writer(FileWriterFunction writer_function) { | 44 static void set_flow_graph_writer(Dart_FileWriterFunction writer_function) { |
| 38 flow_graph_writer_ = writer_function; | 45 flow_graph_writer_ = writer_function; |
| 39 } | 46 } |
| 40 | 47 static Dart_FileWriterFunction flow_graph_writer() { |
| 41 static FileWriterFunction flow_graph_writer() { return flow_graph_writer_; } | 48 return flow_graph_writer_; |
| 49 } |
| 42 | 50 |
| 43 private: | 51 private: |
| 44 static Isolate* vm_isolate_; | 52 static Isolate* vm_isolate_; |
| 45 static ThreadPool* thread_pool_; | 53 static ThreadPool* thread_pool_; |
| 54 static Dart_FileWriterFunction perf_events_writer_; |
| 46 static DebugInfo* pprof_symbol_generator_; | 55 static DebugInfo* pprof_symbol_generator_; |
| 47 static FileWriterFunction flow_graph_writer_; | 56 static Dart_FileWriterFunction flow_graph_writer_; |
| 48 }; | 57 }; |
| 49 | 58 |
| 50 } // namespace dart | 59 } // namespace dart |
| 51 | 60 |
| 52 #endif // VM_DART_H_ | 61 #endif // VM_DART_H_ |
| OLD | NEW |