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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 class SnapshotReader : public BaseReader { | 403 class SnapshotReader : public BaseReader { |
404 public: | 404 public: |
405 Thread* thread() const { return thread_; } | 405 Thread* thread() const { return thread_; } |
406 Zone* zone() const { return zone_; } | 406 Zone* zone() const { return zone_; } |
407 Isolate* isolate() const { return thread_->isolate(); } | 407 Isolate* isolate() const { return thread_->isolate(); } |
408 Heap* heap() const { return heap_; } | 408 Heap* heap() const { return heap_; } |
409 ObjectStore* object_store() const { return isolate()->object_store(); } | 409 ObjectStore* object_store() const { return isolate()->object_store(); } |
410 ClassTable* class_table() const { return isolate()->class_table(); } | 410 ClassTable* class_table() const { return isolate()->class_table(); } |
411 PassiveObject* PassiveObjectHandle() { return &pobj_; } | 411 PassiveObject* PassiveObjectHandle() { return &pobj_; } |
412 Array* ArrayHandle() { return &array_; } | 412 Array* ArrayHandle() { return &array_; } |
| 413 Class* ClassHandle() { return &cls_; } |
413 String* StringHandle() { return &str_; } | 414 String* StringHandle() { return &str_; } |
414 AbstractType* TypeHandle() { return &type_; } | 415 AbstractType* TypeHandle() { return &type_; } |
415 TypeArguments* TypeArgumentsHandle() { return &type_arguments_; } | 416 TypeArguments* TypeArgumentsHandle() { return &type_arguments_; } |
416 GrowableObjectArray* TokensHandle() { return &tokens_; } | 417 GrowableObjectArray* TokensHandle() { return &tokens_; } |
417 TokenStream* StreamHandle() { return &stream_; } | 418 TokenStream* StreamHandle() { return &stream_; } |
418 ExternalTypedData* DataHandle() { return &data_; } | 419 ExternalTypedData* DataHandle() { return &data_; } |
419 TypedData* TypedDataHandle() { return &typed_data_; } | 420 TypedData* TypedDataHandle() { return &typed_data_; } |
420 Code* CodeHandle() { return &code_; } | 421 Code* CodeHandle() { return &code_; } |
421 Function* FunctionHandle() { return &function_; } | 422 Function* FunctionHandle() { return &function_; } |
422 MegamorphicCache* MegamorphicCacheHandle() { return &megamorphic_cache_; } | 423 MegamorphicCache* MegamorphicCacheHandle() { return &megamorphic_cache_; } |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 friend class RawClass; | 1098 friend class RawClass; |
1098 friend class RawClosureData; | 1099 friend class RawClosureData; |
1099 friend class RawCode; | 1100 friend class RawCode; |
1100 friend class RawContextScope; | 1101 friend class RawContextScope; |
1101 friend class RawExceptionHandlers; | 1102 friend class RawExceptionHandlers; |
1102 friend class RawField; | 1103 friend class RawField; |
1103 friend class RawFunction; | 1104 friend class RawFunction; |
1104 friend class RawGrowableObjectArray; | 1105 friend class RawGrowableObjectArray; |
1105 friend class RawImmutableArray; | 1106 friend class RawImmutableArray; |
1106 friend class RawInstructions; | 1107 friend class RawInstructions; |
1107 friend class RawRegExp; | |
1108 friend class RawLibrary; | 1108 friend class RawLibrary; |
1109 friend class RawLinkedHashMap; | 1109 friend class RawLinkedHashMap; |
1110 friend class RawLiteralToken; | 1110 friend class RawLiteralToken; |
1111 friend class RawLocalVarDescriptors; | 1111 friend class RawLocalVarDescriptors; |
1112 friend class RawMirrorReference; | 1112 friend class RawMirrorReference; |
1113 friend class RawObjectPool; | 1113 friend class RawObjectPool; |
1114 friend class RawReceivePort; | 1114 friend class RawReceivePort; |
| 1115 friend class RawRegExp; |
1115 friend class RawScript; | 1116 friend class RawScript; |
1116 friend class RawStacktrace; | 1117 friend class RawStacktrace; |
1117 friend class RawSubtypeTestCache; | 1118 friend class RawSubtypeTestCache; |
1118 friend class RawTokenStream; | 1119 friend class RawTokenStream; |
| 1120 friend class RawType; |
1119 friend class RawTypeArguments; | 1121 friend class RawTypeArguments; |
| 1122 friend class RawTypeParameter; |
1120 friend class RawUserTag; | 1123 friend class RawUserTag; |
1121 friend class SnapshotWriterVisitor; | 1124 friend class SnapshotWriterVisitor; |
1122 friend class WriteInlinedObjectVisitor; | 1125 friend class WriteInlinedObjectVisitor; |
1123 DISALLOW_COPY_AND_ASSIGN(SnapshotWriter); | 1126 DISALLOW_COPY_AND_ASSIGN(SnapshotWriter); |
1124 }; | 1127 }; |
1125 | 1128 |
1126 | 1129 |
1127 class FullSnapshotWriter { | 1130 class FullSnapshotWriter { |
1128 public: | 1131 public: |
1129 static const intptr_t kInitialSize = 64 * KB; | 1132 static const intptr_t kInitialSize = 64 * KB; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 private: | 1230 private: |
1228 SnapshotWriter* writer_; | 1231 SnapshotWriter* writer_; |
1229 bool as_references_; | 1232 bool as_references_; |
1230 | 1233 |
1231 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 1234 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
1232 }; | 1235 }; |
1233 | 1236 |
1234 } // namespace dart | 1237 } // namespace dart |
1235 | 1238 |
1236 #endif // VM_SNAPSHOT_H_ | 1239 #endif // VM_SNAPSHOT_H_ |
OLD | NEW |