OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |