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/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 intptr_t len, | 1120 intptr_t len, |
1121 intptr_t tags) { | 1121 intptr_t tags) { |
1122 // Set the object tags. | 1122 // Set the object tags. |
1123 result.set_tags(tags); | 1123 result.set_tags(tags); |
1124 | 1124 |
1125 // Setup the object fields. | 1125 // Setup the object fields. |
1126 *TypeArgumentsHandle() ^= ReadObjectImpl(); | 1126 *TypeArgumentsHandle() ^= ReadObjectImpl(); |
1127 result.SetTypeArguments(*TypeArgumentsHandle()); | 1127 result.SetTypeArguments(*TypeArgumentsHandle()); |
1128 | 1128 |
1129 bool is_canonical = RawObject::IsCanonical(tags); | 1129 bool is_canonical = RawObject::IsCanonical(tags); |
1130 Object& obj = Object::Handle(isolate()); | |
1131 | 1130 |
1132 for (intptr_t i = 0; i < len; i++) { | 1131 for (intptr_t i = 0; i < len; i++) { |
1133 *PassiveObjectHandle() = is_canonical ? ReadObjectImpl() : ReadObjectRef(); | 1132 *PassiveObjectHandle() = is_canonical ? ReadObjectImpl() : ReadObjectRef(); |
1134 obj = (*PassiveObjectHandle()).raw(); | |
1135 result.SetAt(i, *PassiveObjectHandle()); | 1133 result.SetAt(i, *PassiveObjectHandle()); |
1136 } | 1134 } |
1137 } | 1135 } |
1138 | 1136 |
1139 | 1137 |
1140 VmIsolateSnapshotReader::VmIsolateSnapshotReader(const uint8_t* buffer, | 1138 VmIsolateSnapshotReader::VmIsolateSnapshotReader(const uint8_t* buffer, |
1141 intptr_t size, | 1139 intptr_t size, |
1142 Zone* zone) | 1140 Zone* zone) |
1143 : SnapshotReader(buffer, | 1141 : SnapshotReader(buffer, |
1144 size, | 1142 size, |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2291 NoSafepointScope no_safepoint; | 2289 NoSafepointScope no_safepoint; |
2292 WriteObject(obj.raw()); | 2290 WriteObject(obj.raw()); |
2293 UnmarkAll(); | 2291 UnmarkAll(); |
2294 } else { | 2292 } else { |
2295 ThrowException(exception_type(), exception_msg()); | 2293 ThrowException(exception_type(), exception_msg()); |
2296 } | 2294 } |
2297 } | 2295 } |
2298 | 2296 |
2299 | 2297 |
2300 } // namespace dart | 2298 } // namespace dart |
OLD | NEW |