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

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

Issue 2481013006: Check that Dart_CreateIsolate is given a correct kind of snapshot. (Closed)
Patch Set: . Created 4 years, 1 month 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/vm/dart.cc ('k') | runtime/vm/snapshot.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_SNAPSHOT_H_ 5 #ifndef RUNTIME_VM_SNAPSHOT_H_
6 #define RUNTIME_VM_SNAPSHOT_H_ 6 #define RUNTIME_VM_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 kAppWithJIT, // Full snapshot of core libraries and application. Has some 157 kAppWithJIT, // Full snapshot of core libraries and application. Has some
158 // code, but may compile in the future because we haven't 158 // code, but may compile in the future because we haven't
159 // necessarily included code for every function or to 159 // necessarily included code for every function or to
160 // (de)optimize. 160 // (de)optimize.
161 kAppNoJIT, // Full snapshot of core libraries and application. Has 161 kAppNoJIT, // Full snapshot of core libraries and application. Has
162 // complete code for the application that never deopts. Will 162 // complete code for the application that never deopts. Will
163 // not compile in the future. 163 // not compile in the future.
164 kNone, // dart_bootstrap/gen_snapshot 164 kNone, // dart_bootstrap/gen_snapshot
165 kInvalid 165 kInvalid
166 }; 166 };
167 static const char* KindToCString(Kind kind);
167 168
168 static const int kHeaderSize = 2 * sizeof(int64_t); 169 static const int kHeaderSize = 2 * sizeof(int64_t);
169 static const int kLengthIndex = 0; 170 static const int kLengthIndex = 0;
170 static const int kSnapshotFlagIndex = 1; 171 static const int kSnapshotFlagIndex = 1;
171 172
172 static const Snapshot* SetupFromBuffer(const void* raw_memory); 173 static const Snapshot* SetupFromBuffer(const void* raw_memory);
173 174
174 // Getters. 175 // Getters.
175 const uint8_t* content() const { OPEN_ARRAY_START(uint8_t, uint8_t); } 176 const uint8_t* content() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
176 intptr_t length() const { 177 intptr_t length() const {
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 private: 1044 private:
1044 SnapshotWriter* writer_; 1045 SnapshotWriter* writer_;
1045 bool as_references_; 1046 bool as_references_;
1046 1047
1047 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 1048 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
1048 }; 1049 };
1049 1050
1050 } // namespace dart 1051 } // namespace dart
1051 1052
1052 #endif // RUNTIME_VM_SNAPSHOT_H_ 1053 #endif // RUNTIME_VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698