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 #include "vm/snapshot.h" | 5 #include "vm/snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 SnapshotReader::SnapshotReader(const Snapshot* snapshot, Isolate* isolate) | 75 SnapshotReader::SnapshotReader(const Snapshot* snapshot, Isolate* isolate) |
76 : BaseReader(snapshot->content(), snapshot->length()), | 76 : BaseReader(snapshot->content(), snapshot->length()), |
77 kind_(snapshot->kind()), | 77 kind_(snapshot->kind()), |
78 isolate_(isolate), | 78 isolate_(isolate), |
79 cls_(Class::Handle()), | 79 cls_(Class::Handle()), |
80 obj_(Object::Handle()), | 80 obj_(Object::Handle()), |
81 str_(String::Handle()), | 81 str_(String::Handle()), |
82 library_(Library::Handle()), | 82 library_(Library::Handle()), |
83 type_(AbstractType::Handle()), | 83 type_(AbstractType::Handle()), |
84 type_arguments_(AbstractTypeArguments::Handle()), | 84 type_arguments_(AbstractTypeArguments::Handle()), |
| 85 tokens_(Array::Handle()), |
85 backward_references_((snapshot->kind() == Snapshot::kFull) ? | 86 backward_references_((snapshot->kind() == Snapshot::kFull) ? |
86 kNumInitialReferencesInFullSnapshot : | 87 kNumInitialReferencesInFullSnapshot : |
87 kNumInitialReferences) { | 88 kNumInitialReferences) { |
88 } | 89 } |
89 | 90 |
90 | 91 |
91 RawObject* SnapshotReader::ReadObject() { | 92 RawObject* SnapshotReader::ReadObject() { |
92 Object& obj = Object::Handle(ReadObjectImpl()); | 93 Object& obj = Object::Handle(ReadObjectImpl()); |
93 for (intptr_t i = 0; i < backward_references_.length(); i++) { | 94 for (intptr_t i = 0; i < backward_references_.length(); i++) { |
94 if (!backward_references_[i]->is_deserialized()) { | 95 if (!backward_references_[i]->is_deserialized()) { |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 RawObject* raw_obj = *current; | 1009 RawObject* raw_obj = *current; |
1009 if (as_references_) { | 1010 if (as_references_) { |
1010 writer_->WriteObjectRef(raw_obj); | 1011 writer_->WriteObjectRef(raw_obj); |
1011 } else { | 1012 } else { |
1012 writer_->WriteObjectImpl(raw_obj); | 1013 writer_->WriteObjectImpl(raw_obj); |
1013 } | 1014 } |
1014 } | 1015 } |
1015 } | 1016 } |
1016 | 1017 |
1017 } // namespace dart | 1018 } // namespace dart |
OLD | NEW |