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

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

Issue 1975423002: Check snapshots for feature compatibility. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 #include "vm/snapshot.h" 10 #include "vm/snapshot.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 // Forward declarations. 14 // Forward declarations.
15 class DebugInfo; 15 class DebugInfo;
16 class Isolate; 16 class Isolate;
17 class LocalHandle; 17 class LocalHandle;
18 class RawError; 18 class RawError;
19 class ReadOnlyHandles; 19 class ReadOnlyHandles;
20 class ThreadPool; 20 class ThreadPool;
21 21
22 class Dart : public AllStatic { 22 class Dart : public AllStatic {
23 public: 23 public:
24 static const char* InitOnce( 24 static char* InitOnce(
25 const uint8_t* vm_isolate_snapshot, 25 const uint8_t* vm_isolate_snapshot,
26 const uint8_t* instructions_snapshot, 26 const uint8_t* instructions_snapshot,
27 const uint8_t* data_snapshot, 27 const uint8_t* data_snapshot,
28 Dart_IsolateCreateCallback create, 28 Dart_IsolateCreateCallback create,
29 Dart_IsolateShutdownCallback shutdown, 29 Dart_IsolateShutdownCallback shutdown,
30 Dart_ThreadExitCallback thread_exit, 30 Dart_ThreadExitCallback thread_exit,
31 Dart_FileOpenCallback file_open, 31 Dart_FileOpenCallback file_open,
32 Dart_FileReadCallback file_read, 32 Dart_FileReadCallback file_read,
33 Dart_FileWriteCallback file_write, 33 Dart_FileWriteCallback file_write,
34 Dart_FileCloseCallback file_close, 34 Dart_FileCloseCallback file_close,
(...skipping 19 matching lines...) Expand all
54 pprof_symbol_generator_ = value; 54 pprof_symbol_generator_ = value;
55 } 55 }
56 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } 56 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; }
57 57
58 static LocalHandle* AllocateReadOnlyApiHandle(); 58 static LocalHandle* AllocateReadOnlyApiHandle();
59 static bool IsReadOnlyApiHandle(Dart_Handle handle); 59 static bool IsReadOnlyApiHandle(Dart_Handle handle);
60 60
61 static uword AllocateReadOnlyHandle(); 61 static uword AllocateReadOnlyHandle();
62 static bool IsReadOnlyHandle(uword address); 62 static bool IsReadOnlyHandle(uword address);
63 63
64 static const char* FeaturesString(Snapshot::Kind kind);
65
64 static Snapshot::Kind snapshot_kind() { 66 static Snapshot::Kind snapshot_kind() {
65 return snapshot_kind_; 67 return snapshot_kind_;
66 } 68 }
67 static const uint8_t* instructions_snapshot_buffer() { 69 static const uint8_t* instructions_snapshot_buffer() {
68 return instructions_snapshot_buffer_; 70 return instructions_snapshot_buffer_;
69 } 71 }
70 static void set_instructions_snapshot_buffer(const uint8_t* buffer) { 72 static void set_instructions_snapshot_buffer(const uint8_t* buffer) {
71 instructions_snapshot_buffer_ = buffer; 73 instructions_snapshot_buffer_ = buffer;
72 } 74 }
73 static const uint8_t* data_snapshot_buffer() { 75 static const uint8_t* data_snapshot_buffer() {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static Dart_FileOpenCallback file_open_callback_; 130 static Dart_FileOpenCallback file_open_callback_;
129 static Dart_FileReadCallback file_read_callback_; 131 static Dart_FileReadCallback file_read_callback_;
130 static Dart_FileWriteCallback file_write_callback_; 132 static Dart_FileWriteCallback file_write_callback_;
131 static Dart_FileCloseCallback file_close_callback_; 133 static Dart_FileCloseCallback file_close_callback_;
132 static Dart_EntropySource entropy_source_callback_; 134 static Dart_EntropySource entropy_source_callback_;
133 }; 135 };
134 136
135 } // namespace dart 137 } // namespace dart
136 138
137 #endif // VM_DART_H_ 139 #endif // VM_DART_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698