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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 RawFunction* NewFunction(); | 256 RawFunction* NewFunction(); |
257 RawField* NewField(); | 257 RawField* NewField(); |
258 RawLibrary* NewLibrary(); | 258 RawLibrary* NewLibrary(); |
259 RawLibraryPrefix* NewLibraryPrefix(); | 259 RawLibraryPrefix* NewLibraryPrefix(); |
260 RawNamespace* NewNamespace(); | 260 RawNamespace* NewNamespace(); |
261 RawScript* NewScript(); | 261 RawScript* NewScript(); |
262 RawLiteralToken* NewLiteralToken(); | 262 RawLiteralToken* NewLiteralToken(); |
263 RawGrowableObjectArray* NewGrowableObjectArray(); | 263 RawGrowableObjectArray* NewGrowableObjectArray(); |
264 RawApiError* NewApiError(); | 264 RawApiError* NewApiError(); |
265 RawLanguageError* NewLanguageError(); | 265 RawLanguageError* NewLanguageError(); |
| 266 RawObject* NewInteger(int64_t value); |
266 | 267 |
267 private: | 268 private: |
268 class BackRefNode : public ZoneAllocated { | 269 class BackRefNode : public ZoneAllocated { |
269 public: | 270 public: |
270 BackRefNode(Object* reference, DeserializeState state) | 271 BackRefNode(Object* reference, DeserializeState state) |
271 : reference_(reference), state_(state) {} | 272 : reference_(reference), state_(state) {} |
272 Object* reference() const { return reference_; } | 273 Object* reference() const { return reference_; } |
273 bool is_deserialized() const { return state_ == kIsDeserialized; } | 274 bool is_deserialized() const { return state_ == kIsDeserialized; } |
274 void set_state(DeserializeState state) { state_ = state; } | 275 void set_state(DeserializeState state) { state_ = state; } |
275 | 276 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 private: | 588 private: |
588 SnapshotWriter* writer_; | 589 SnapshotWriter* writer_; |
589 bool as_references_; | 590 bool as_references_; |
590 | 591 |
591 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 592 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
592 }; | 593 }; |
593 | 594 |
594 } // namespace dart | 595 } // namespace dart |
595 | 596 |
596 #endif // VM_SNAPSHOT_H_ | 597 #endif // VM_SNAPSHOT_H_ |
OLD | NEW |