Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: runtime/vm/dart.h

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: compute string hash if necessary Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 LocalHandle; 16 class LocalHandle;
17 class RawError; 17 class RawError;
18 class ReadOnlyHandles; 18 class ReadOnlyHandles;
19 class ThreadPool; 19 class ThreadPool;
20 20
21 class Dart : public AllStatic { 21 class Dart : public AllStatic {
22 public: 22 public:
23 static const char* InitOnce( 23 static const char* InitOnce(
24 const uint8_t* vm_isolate_snapshot, 24 const uint8_t* vm_isolate_snapshot,
25 const uint8_t* instructions_snapshot, 25 const uint8_t* instructions_snapshot,
26 const uint8_t* data_snapshot,
26 Dart_IsolateCreateCallback create, 27 Dart_IsolateCreateCallback create,
27 Dart_IsolateShutdownCallback shutdown, 28 Dart_IsolateShutdownCallback shutdown,
28 Dart_FileOpenCallback file_open, 29 Dart_FileOpenCallback file_open,
29 Dart_FileReadCallback file_read, 30 Dart_FileReadCallback file_read,
30 Dart_FileWriteCallback file_write, 31 Dart_FileWriteCallback file_write,
31 Dart_FileCloseCallback file_close, 32 Dart_FileCloseCallback file_close,
32 Dart_EntropySource entropy_source, 33 Dart_EntropySource entropy_source,
33 Dart_GetVMServiceAssetsArchive get_service_assets); 34 Dart_GetVMServiceAssetsArchive get_service_assets);
34 static const char* Cleanup(); 35 static const char* Cleanup();
35 36
(...skipping 25 matching lines...) Expand all
61 static const uint8_t* instructions_snapshot_buffer() { 62 static const uint8_t* instructions_snapshot_buffer() {
62 return instructions_snapshot_buffer_; 63 return instructions_snapshot_buffer_;
63 } 64 }
64 static void set_instructions_snapshot_buffer(const uint8_t* buffer) { 65 static void set_instructions_snapshot_buffer(const uint8_t* buffer) {
65 instructions_snapshot_buffer_ = buffer; 66 instructions_snapshot_buffer_ = buffer;
66 } 67 }
67 static bool IsRunningPrecompiledCode() { 68 static bool IsRunningPrecompiledCode() {
68 return instructions_snapshot_buffer_ != NULL; 69 return instructions_snapshot_buffer_ != NULL;
69 } 70 }
70 71
72 static const uint8_t* data_snapshot_buffer() {
73 return data_snapshot_buffer_;
74 }
75 static void set_data_snapshot_buffer(const uint8_t* buffer) {
76 data_snapshot_buffer_ = buffer;
77 }
78
71 private: 79 private:
72 static void WaitForIsolateShutdown(); 80 static void WaitForIsolateShutdown();
73 81
74 static Isolate* vm_isolate_; 82 static Isolate* vm_isolate_;
75 static int64_t start_time_; 83 static int64_t start_time_;
76 static ThreadPool* thread_pool_; 84 static ThreadPool* thread_pool_;
77 static DebugInfo* pprof_symbol_generator_; 85 static DebugInfo* pprof_symbol_generator_;
78 static ReadOnlyHandles* predefined_handles_; 86 static ReadOnlyHandles* predefined_handles_;
79 static const uint8_t* instructions_snapshot_buffer_; 87 static const uint8_t* instructions_snapshot_buffer_;
88 static const uint8_t* data_snapshot_buffer_;
80 }; 89 };
81 90
82 } // namespace dart 91 } // namespace dart
83 92
84 #endif // VM_DART_H_ 93 #endif // VM_DART_H_
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698