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 RUNTIME_VM_DART_H_ | 5 #ifndef RUNTIME_VM_DART_H_ |
6 #define RUNTIME_VM_DART_H_ | 6 #define RUNTIME_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 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } | 69 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } |
70 | 70 |
71 static LocalHandle* AllocateReadOnlyApiHandle(); | 71 static LocalHandle* AllocateReadOnlyApiHandle(); |
72 static bool IsReadOnlyApiHandle(Dart_Handle handle); | 72 static bool IsReadOnlyApiHandle(Dart_Handle handle); |
73 | 73 |
74 static uword AllocateReadOnlyHandle(); | 74 static uword AllocateReadOnlyHandle(); |
75 static bool IsReadOnlyHandle(uword address); | 75 static bool IsReadOnlyHandle(uword address); |
76 | 76 |
77 static const char* FeaturesString(Isolate* isolate, Snapshot::Kind kind); | 77 static const char* FeaturesString(Isolate* isolate, Snapshot::Kind kind); |
78 static Snapshot::Kind vm_snapshot_kind() { return vm_snapshot_kind_; } | 78 static Snapshot::Kind vm_snapshot_kind() { return vm_snapshot_kind_; } |
| 79 static const uint8_t* vm_snapshot_instructions() { |
| 80 return vm_snapshot_instructions_; |
| 81 } |
| 82 static void set_vm_snapshot_instructions(const uint8_t* buffer) { |
| 83 vm_snapshot_instructions_ = buffer; |
| 84 } |
79 | 85 |
80 static Dart_ThreadExitCallback thread_exit_callback() { | 86 static Dart_ThreadExitCallback thread_exit_callback() { |
81 return thread_exit_callback_; | 87 return thread_exit_callback_; |
82 } | 88 } |
83 static void set_thread_exit_callback(Dart_ThreadExitCallback cback) { | 89 static void set_thread_exit_callback(Dart_ThreadExitCallback cback) { |
84 thread_exit_callback_ = cback; | 90 thread_exit_callback_ = cback; |
85 } | 91 } |
86 static void SetFileCallbacks(Dart_FileOpenCallback file_open, | 92 static void SetFileCallbacks(Dart_FileOpenCallback file_open, |
87 Dart_FileReadCallback file_read, | 93 Dart_FileReadCallback file_read, |
88 Dart_FileWriteCallback file_write, | 94 Dart_FileWriteCallback file_write, |
(...skipping 27 matching lines...) Expand all Loading... |
116 private: | 122 private: |
117 static void WaitForIsolateShutdown(); | 123 static void WaitForIsolateShutdown(); |
118 static void WaitForApplicationIsolateShutdown(); | 124 static void WaitForApplicationIsolateShutdown(); |
119 | 125 |
120 static Isolate* vm_isolate_; | 126 static Isolate* vm_isolate_; |
121 static int64_t start_time_micros_; | 127 static int64_t start_time_micros_; |
122 static ThreadPool* thread_pool_; | 128 static ThreadPool* thread_pool_; |
123 static DebugInfo* pprof_symbol_generator_; | 129 static DebugInfo* pprof_symbol_generator_; |
124 static ReadOnlyHandles* predefined_handles_; | 130 static ReadOnlyHandles* predefined_handles_; |
125 static Snapshot::Kind vm_snapshot_kind_; | 131 static Snapshot::Kind vm_snapshot_kind_; |
| 132 static const uint8_t* vm_snapshot_instructions_; |
126 static Dart_ThreadExitCallback thread_exit_callback_; | 133 static Dart_ThreadExitCallback thread_exit_callback_; |
127 static Dart_FileOpenCallback file_open_callback_; | 134 static Dart_FileOpenCallback file_open_callback_; |
128 static Dart_FileReadCallback file_read_callback_; | 135 static Dart_FileReadCallback file_read_callback_; |
129 static Dart_FileWriteCallback file_write_callback_; | 136 static Dart_FileWriteCallback file_write_callback_; |
130 static Dart_FileCloseCallback file_close_callback_; | 137 static Dart_FileCloseCallback file_close_callback_; |
131 static Dart_EntropySource entropy_source_callback_; | 138 static Dart_EntropySource entropy_source_callback_; |
132 }; | 139 }; |
133 | 140 |
134 } // namespace dart | 141 } // namespace dart |
135 | 142 |
136 #endif // RUNTIME_VM_DART_H_ | 143 #endif // RUNTIME_VM_DART_H_ |
OLD | NEW |