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 10 matching lines...) Expand all Loading... |
21 class AbstractTypeArguments; | 21 class AbstractTypeArguments; |
22 class Array; | 22 class Array; |
23 class Class; | 23 class Class; |
24 class ClassTable; | 24 class ClassTable; |
25 class GrowableObjectArray; | 25 class GrowableObjectArray; |
26 class Heap; | 26 class Heap; |
27 class Library; | 27 class Library; |
28 class Object; | 28 class Object; |
29 class ObjectStore; | 29 class ObjectStore; |
30 class RawAbstractTypeArguments; | 30 class RawAbstractTypeArguments; |
| 31 class RawApiError; |
31 class RawArray; | 32 class RawArray; |
32 class RawBigint; | 33 class RawBigint; |
33 class RawClass; | 34 class RawClass; |
34 class RawContext; | 35 class RawContext; |
35 class RawDouble; | 36 class RawDouble; |
36 class RawField; | 37 class RawField; |
37 class RawFourByteString; | 38 class RawFourByteString; |
38 class RawFunction; | 39 class RawFunction; |
39 class RawGrowableObjectArray; | 40 class RawGrowableObjectArray; |
40 class RawImmutableArray; | 41 class RawImmutableArray; |
| 42 class RawLanguageError; |
41 class RawLibrary; | 43 class RawLibrary; |
42 class RawLibraryPrefix; | 44 class RawLibraryPrefix; |
43 class RawLiteralToken; | 45 class RawLiteralToken; |
44 class RawMint; | 46 class RawMint; |
45 class RawObject; | 47 class RawObject; |
46 class RawOneByteString; | 48 class RawOneByteString; |
47 class RawPatchClass; | 49 class RawPatchClass; |
48 class RawScript; | 50 class RawScript; |
49 class RawSmi; | 51 class RawSmi; |
50 class RawTokenStream; | 52 class RawTokenStream; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 RawType* NewType(); | 227 RawType* NewType(); |
226 RawTypeParameter* NewTypeParameter(); | 228 RawTypeParameter* NewTypeParameter(); |
227 RawPatchClass* NewPatchClass(); | 229 RawPatchClass* NewPatchClass(); |
228 RawFunction* NewFunction(); | 230 RawFunction* NewFunction(); |
229 RawField* NewField(); | 231 RawField* NewField(); |
230 RawLibrary* NewLibrary(); | 232 RawLibrary* NewLibrary(); |
231 RawLibraryPrefix* NewLibraryPrefix(); | 233 RawLibraryPrefix* NewLibraryPrefix(); |
232 RawScript* NewScript(); | 234 RawScript* NewScript(); |
233 RawLiteralToken* NewLiteralToken(); | 235 RawLiteralToken* NewLiteralToken(); |
234 RawGrowableObjectArray* NewGrowableObjectArray(); | 236 RawGrowableObjectArray* NewGrowableObjectArray(); |
| 237 RawApiError* NewApiError(); |
| 238 RawLanguageError* NewLanguageError(); |
235 | 239 |
236 private: | 240 private: |
237 class BackRefNode : public ZoneAllocated { | 241 class BackRefNode : public ZoneAllocated { |
238 public: | 242 public: |
239 BackRefNode(Object* reference, DeserializeState state) | 243 BackRefNode(Object* reference, DeserializeState state) |
240 : reference_(reference), state_(state) {} | 244 : reference_(reference), state_(state) {} |
241 Object* reference() const { return reference_; } | 245 Object* reference() const { return reference_; } |
242 bool is_deserialized() const { return state_ == kIsDeserialized; } | 246 bool is_deserialized() const { return state_ == kIsDeserialized; } |
243 void set_state(DeserializeState state) { state_ = state; } | 247 void set_state(DeserializeState state) { state_ = state; } |
244 | 248 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 Isolate* isolate_; // Current isolate. | 280 Isolate* isolate_; // Current isolate. |
277 Class& cls_; // Temporary Class handle. | 281 Class& cls_; // Temporary Class handle. |
278 Object& obj_; // Temporary Object handle. | 282 Object& obj_; // Temporary Object handle. |
279 String& str_; // Temporary String handle. | 283 String& str_; // Temporary String handle. |
280 Library& library_; // Temporary library handle. | 284 Library& library_; // Temporary library handle. |
281 AbstractType& type_; // Temporary type handle. | 285 AbstractType& type_; // Temporary type handle. |
282 AbstractTypeArguments& type_arguments_; // Temporary type argument handle. | 286 AbstractTypeArguments& type_arguments_; // Temporary type argument handle. |
283 Array& tokens_; // Temporary tokens handle. | 287 Array& tokens_; // Temporary tokens handle. |
284 GrowableArray<BackRefNode*> backward_references_; | 288 GrowableArray<BackRefNode*> backward_references_; |
285 | 289 |
| 290 friend class ApiError; |
286 friend class Array; | 291 friend class Array; |
287 friend class Class; | 292 friend class Class; |
288 friend class Context; | 293 friend class Context; |
289 friend class ContextScope; | 294 friend class ContextScope; |
290 friend class Field; | 295 friend class Field; |
291 friend class Function; | 296 friend class Function; |
292 friend class GrowableObjectArray; | 297 friend class GrowableObjectArray; |
293 friend class ImmutableArray; | 298 friend class ImmutableArray; |
294 friend class InstantiatedTypeArguments; | 299 friend class InstantiatedTypeArguments; |
295 friend class JSRegExp; | 300 friend class JSRegExp; |
| 301 friend class LanguageError; |
296 friend class Library; | 302 friend class Library; |
297 friend class LibraryPrefix; | 303 friend class LibraryPrefix; |
298 friend class LiteralToken; | 304 friend class LiteralToken; |
299 friend class PatchClass; | 305 friend class PatchClass; |
300 friend class Script; | 306 friend class Script; |
301 friend class TokenStream; | 307 friend class TokenStream; |
302 friend class Type; | 308 friend class Type; |
303 friend class TypeArguments; | 309 friend class TypeArguments; |
304 friend class TypeParameter; | 310 friend class TypeParameter; |
305 friend class UnresolvedClass; | 311 friend class UnresolvedClass; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 private: | 513 private: |
508 SnapshotWriter* writer_; | 514 SnapshotWriter* writer_; |
509 bool as_references_; | 515 bool as_references_; |
510 | 516 |
511 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 517 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
512 }; | 518 }; |
513 | 519 |
514 } // namespace dart | 520 } // namespace dart |
515 | 521 |
516 #endif // VM_SNAPSHOT_H_ | 522 #endif // VM_SNAPSHOT_H_ |
OLD | NEW |