| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 DeserializeState state, | 389 DeserializeState state, |
| 390 bool defer_canonicalization = false); | 390 bool defer_canonicalization = false); |
| 391 | 391 |
| 392 // Get an object from the backward references list. | 392 // Get an object from the backward references list. |
| 393 Object* GetBackRef(intptr_t id); | 393 Object* GetBackRef(intptr_t id); |
| 394 | 394 |
| 395 // Read a script snapshot. | 395 // Read a script snapshot. |
| 396 RawObject* ReadScriptSnapshot(); | 396 RawObject* ReadScriptSnapshot(); |
| 397 | 397 |
| 398 // Read version number of snapshot and verify. | 398 // Read version number of snapshot and verify. |
| 399 RawApiError* VerifyVersionAndFeatures(); | 399 RawApiError* VerifyVersionAndFeatures(Isolate* isolate); |
| 400 | 400 |
| 401 RawObject* NewInteger(int64_t value); | 401 RawObject* NewInteger(int64_t value); |
| 402 | 402 |
| 403 protected: | 403 protected: |
| 404 SnapshotReader(const uint8_t* buffer, | 404 SnapshotReader(const uint8_t* buffer, |
| 405 intptr_t size, | 405 intptr_t size, |
| 406 Snapshot::Kind kind, | 406 Snapshot::Kind kind, |
| 407 ZoneGrowableArray<BackRefNode>* backward_references, | 407 ZoneGrowableArray<BackRefNode>* backward_references, |
| 408 Thread* thread); | 408 Thread* thread); |
| 409 ~SnapshotReader() {} | 409 ~SnapshotReader() {} |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 private: | 1011 private: |
| 1012 SnapshotWriter* writer_; | 1012 SnapshotWriter* writer_; |
| 1013 bool as_references_; | 1013 bool as_references_; |
| 1014 | 1014 |
| 1015 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 1015 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
| 1016 }; | 1016 }; |
| 1017 | 1017 |
| 1018 } // namespace dart | 1018 } // namespace dart |
| 1019 | 1019 |
| 1020 #endif // RUNTIME_VM_SNAPSHOT_H_ | 1020 #endif // RUNTIME_VM_SNAPSHOT_H_ |
| OLD | NEW |