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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class RawLibrary; | 47 class RawLibrary; |
48 class RawLibraryPrefix; | 48 class RawLibraryPrefix; |
49 class RawNamespace; | 49 class RawNamespace; |
50 class RawLiteralToken; | 50 class RawLiteralToken; |
51 class RawMint; | 51 class RawMint; |
52 class RawObject; | 52 class RawObject; |
53 class RawOneByteString; | 53 class RawOneByteString; |
54 class RawPatchClass; | 54 class RawPatchClass; |
55 class RawScript; | 55 class RawScript; |
56 class RawSmi; | 56 class RawSmi; |
| 57 class RawStacktrace; |
57 class RawTokenStream; | 58 class RawTokenStream; |
58 class RawType; | 59 class RawType; |
59 class RawTypeParameter; | 60 class RawTypeParameter; |
60 class RawTypeArguments; | 61 class RawTypeArguments; |
61 class RawTwoByteString; | 62 class RawTwoByteString; |
62 class RawUnresolvedClass; | 63 class RawUnresolvedClass; |
63 class String; | 64 class String; |
64 class TokenStream; | 65 class TokenStream; |
65 class UnhandledException; | 66 class UnhandledException; |
66 | 67 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 RawField* NewField(); | 260 RawField* NewField(); |
260 RawLibrary* NewLibrary(); | 261 RawLibrary* NewLibrary(); |
261 RawLibraryPrefix* NewLibraryPrefix(); | 262 RawLibraryPrefix* NewLibraryPrefix(); |
262 RawNamespace* NewNamespace(); | 263 RawNamespace* NewNamespace(); |
263 RawScript* NewScript(); | 264 RawScript* NewScript(); |
264 RawLiteralToken* NewLiteralToken(); | 265 RawLiteralToken* NewLiteralToken(); |
265 RawGrowableObjectArray* NewGrowableObjectArray(); | 266 RawGrowableObjectArray* NewGrowableObjectArray(); |
266 RawApiError* NewApiError(); | 267 RawApiError* NewApiError(); |
267 RawLanguageError* NewLanguageError(); | 268 RawLanguageError* NewLanguageError(); |
268 RawObject* NewInteger(int64_t value); | 269 RawObject* NewInteger(int64_t value); |
| 270 RawStacktrace* NewStacktrace(); |
269 | 271 |
270 private: | 272 private: |
271 class BackRefNode : public ZoneAllocated { | 273 class BackRefNode : public ZoneAllocated { |
272 public: | 274 public: |
273 BackRefNode(Object* reference, DeserializeState state) | 275 BackRefNode(Object* reference, DeserializeState state) |
274 : reference_(reference), state_(state) {} | 276 : reference_(reference), state_(state) {} |
275 Object* reference() const { return reference_; } | 277 Object* reference() const { return reference_; } |
276 bool is_deserialized() const { return state_ == kIsDeserialized; } | 278 bool is_deserialized() const { return state_ == kIsDeserialized; } |
277 void set_state(DeserializeState state) { state_ = state; } | 279 void set_state(DeserializeState state) { state_ = state; } |
278 | 280 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 friend class ImmutableArray; | 335 friend class ImmutableArray; |
334 friend class InstantiatedTypeArguments; | 336 friend class InstantiatedTypeArguments; |
335 friend class JSRegExp; | 337 friend class JSRegExp; |
336 friend class LanguageError; | 338 friend class LanguageError; |
337 friend class Library; | 339 friend class Library; |
338 friend class LibraryPrefix; | 340 friend class LibraryPrefix; |
339 friend class Namespace; | 341 friend class Namespace; |
340 friend class LiteralToken; | 342 friend class LiteralToken; |
341 friend class PatchClass; | 343 friend class PatchClass; |
342 friend class Script; | 344 friend class Script; |
| 345 friend class Stacktrace; |
343 friend class TokenStream; | 346 friend class TokenStream; |
344 friend class Type; | 347 friend class Type; |
345 friend class TypeArguments; | 348 friend class TypeArguments; |
346 friend class TypeParameter; | 349 friend class TypeParameter; |
347 friend class UnresolvedClass; | 350 friend class UnresolvedClass; |
348 friend class WeakProperty; | 351 friend class WeakProperty; |
349 DISALLOW_COPY_AND_ASSIGN(SnapshotReader); | 352 DISALLOW_COPY_AND_ASSIGN(SnapshotReader); |
350 }; | 353 }; |
351 | 354 |
352 | 355 |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 private: | 594 private: |
592 SnapshotWriter* writer_; | 595 SnapshotWriter* writer_; |
593 bool as_references_; | 596 bool as_references_; |
594 | 597 |
595 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 598 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
596 }; | 599 }; |
597 | 600 |
598 } // namespace dart | 601 } // namespace dart |
599 | 602 |
600 #endif // VM_SNAPSHOT_H_ | 603 #endif // VM_SNAPSHOT_H_ |
OLD | NEW |