| 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 VM_SNAPSHOT_H_ | 5 #ifndef VM_SNAPSHOT_H_ |
| 6 #define VM_SNAPSHOT_H_ | 6 #define 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // Reads an object. | 265 // Reads an object. |
| 266 RawObject* ReadObject(); | 266 RawObject* ReadObject(); |
| 267 | 267 |
| 268 // Add object to backward references. | 268 // Add object to backward references. |
| 269 void AddBackRef(intptr_t id, Object* obj, DeserializeState state); | 269 void AddBackRef(intptr_t id, Object* obj, DeserializeState state); |
| 270 | 270 |
| 271 // Get an object from the backward references list. | 271 // Get an object from the backward references list. |
| 272 Object* GetBackRef(intptr_t id); | 272 Object* GetBackRef(intptr_t id); |
| 273 | 273 |
| 274 // Read a full snap shot. | 274 // Read a full snap shot. |
| 275 void ReadFullSnapshot(); | 275 RawApiError* ReadFullSnapshot(); |
| 276 |
| 277 // Read a script snap shot. |
| 278 RawObject* ReadScriptSnapshot(); |
| 276 | 279 |
| 277 // Helper functions for creating uninitialized versions | 280 // Helper functions for creating uninitialized versions |
| 278 // of various object types. These are used when reading a | 281 // of various object types. These are used when reading a |
| 279 // full snapshot. | 282 // full snapshot. |
| 280 RawArray* NewArray(intptr_t len); | 283 RawArray* NewArray(intptr_t len); |
| 281 RawImmutableArray* NewImmutableArray(intptr_t len); | 284 RawImmutableArray* NewImmutableArray(intptr_t len); |
| 282 RawOneByteString* NewOneByteString(intptr_t len); | 285 RawOneByteString* NewOneByteString(intptr_t len); |
| 283 RawTwoByteString* NewTwoByteString(intptr_t len); | 286 RawTwoByteString* NewTwoByteString(intptr_t len); |
| 284 RawTypeArguments* NewTypeArguments(intptr_t len); | 287 RawTypeArguments* NewTypeArguments(intptr_t len); |
| 285 RawTokenStream* NewTokenStream(intptr_t len); | 288 RawTokenStream* NewTokenStream(intptr_t len); |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 private: | 725 private: |
| 723 SnapshotWriter* writer_; | 726 SnapshotWriter* writer_; |
| 724 bool as_references_; | 727 bool as_references_; |
| 725 | 728 |
| 726 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 729 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
| 727 }; | 730 }; |
| 728 | 731 |
| 729 } // namespace dart | 732 } // namespace dart |
| 730 | 733 |
| 731 #endif // VM_SNAPSHOT_H_ | 734 #endif // VM_SNAPSHOT_H_ |
| OLD | NEW |