| 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 | 17 |
| 17 class Dart : public AllStatic { | 18 class Dart : public AllStatic { |
| 18 public: | 19 public: |
| 19 static bool InitOnce(Dart_IsolateCreateCallback create, | 20 static bool InitOnce(Dart_IsolateCreateCallback create, |
| 20 Dart_IsolateInterruptCallback interrupt); | 21 Dart_IsolateInterruptCallback interrupt); |
| 21 | 22 |
| 22 static Isolate* CreateIsolate(const char* name_prefix); | 23 static Isolate* CreateIsolate(const char* name_prefix); |
| 23 static void InitializeIsolate(const uint8_t* snapshot, void* data); | 24 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); |
| 24 static void ShutdownIsolate(); | 25 static void ShutdownIsolate(); |
| 25 | 26 |
| 26 static Isolate* vm_isolate() { return vm_isolate_; } | 27 static Isolate* vm_isolate() { return vm_isolate_; } |
| 27 | 28 |
| 28 static void set_pprof_symbol_generator(DebugInfo* value) { | 29 static void set_pprof_symbol_generator(DebugInfo* value) { |
| 29 pprof_symbol_generator_ = value; | 30 pprof_symbol_generator_ = value; |
| 30 } | 31 } |
| 31 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } | 32 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 static Isolate* vm_isolate_; | 35 static Isolate* vm_isolate_; |
| 35 static DebugInfo* pprof_symbol_generator_; | 36 static DebugInfo* pprof_symbol_generator_; |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 } // namespace dart | 39 } // namespace dart |
| 39 | 40 |
| 40 #endif // VM_DART_H_ | 41 #endif // VM_DART_H_ |
| OLD | NEW |