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