| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 pprof_symbol_generator_ = value; | 47 pprof_symbol_generator_ = value; |
| 48 } | 48 } |
| 49 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } | 49 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } |
| 50 | 50 |
| 51 static LocalHandle* AllocateReadOnlyApiHandle(); | 51 static LocalHandle* AllocateReadOnlyApiHandle(); |
| 52 static bool IsReadOnlyApiHandle(Dart_Handle handle); | 52 static bool IsReadOnlyApiHandle(Dart_Handle handle); |
| 53 | 53 |
| 54 static uword AllocateReadOnlyHandle(); | 54 static uword AllocateReadOnlyHandle(); |
| 55 static bool IsReadOnlyHandle(uword address); | 55 static bool IsReadOnlyHandle(uword address); |
| 56 | 56 |
| 57 static const uint8_t* instructions_snapshot_buffer() { |
| 58 return instructions_snapshot_buffer_; |
| 59 } |
| 60 static void set_instructions_snapshot_buffer(const uint8_t* buffer) { |
| 61 instructions_snapshot_buffer_ = buffer; |
| 62 } |
| 63 static bool IsRunningPrecompiledCode() { |
| 64 return instructions_snapshot_buffer_ != NULL; |
| 65 } |
| 66 |
| 57 private: | 67 private: |
| 58 static void WaitForIsolateShutdown(); | 68 static void WaitForIsolateShutdown(); |
| 59 | 69 |
| 60 static Isolate* vm_isolate_; | 70 static Isolate* vm_isolate_; |
| 61 static ThreadPool* thread_pool_; | 71 static ThreadPool* thread_pool_; |
| 62 static DebugInfo* pprof_symbol_generator_; | 72 static DebugInfo* pprof_symbol_generator_; |
| 63 static ReadOnlyHandles* predefined_handles_; | 73 static ReadOnlyHandles* predefined_handles_; |
| 74 static const uint8_t* instructions_snapshot_buffer_; |
| 64 }; | 75 }; |
| 65 | 76 |
| 66 } // namespace dart | 77 } // namespace dart |
| 67 | 78 |
| 68 #endif // VM_DART_H_ | 79 #endif // VM_DART_H_ |
| OLD | NEW |