| 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/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 Class& cls = Class::ZoneHandle(isolate(), Class::null()); | 202 Class& cls = Class::ZoneHandle(isolate(), Class::null()); |
| 203 cls = LookupInternalClass(class_header); | 203 cls = LookupInternalClass(class_header); |
| 204 AddBackRef(object_id, &cls, kIsDeserialized); | 204 AddBackRef(object_id, &cls, kIsDeserialized); |
| 205 if (cls.IsNull()) { | 205 if (cls.IsNull()) { |
| 206 // Read the library/class information and lookup the class. | 206 // Read the library/class information and lookup the class. |
| 207 str_ ^= ReadObjectImpl(class_header); | 207 str_ ^= ReadObjectImpl(class_header); |
| 208 library_ = Library::LookupLibrary(str_); | 208 library_ = Library::LookupLibrary(str_); |
| 209 ASSERT(!library_.IsNull()); | 209 ASSERT(!library_.IsNull()); |
| 210 str_ ^= ReadObjectImpl(); | 210 str_ ^= ReadObjectImpl(); |
| 211 cls = library_.LookupClass(str_); | 211 cls = library_.LookupClass(str_); |
| 212 cls.EnsureIsFinalized(isolate()); |
| 212 } | 213 } |
| 213 ASSERT(!cls.IsNull()); | 214 ASSERT(!cls.IsNull()); |
| 214 return cls.raw(); | 215 return cls.raw(); |
| 215 } | 216 } |
| 216 | 217 |
| 217 | 218 |
| 218 RawObject* SnapshotReader::ReadObjectImpl() { | 219 RawObject* SnapshotReader::ReadObjectImpl() { |
| 219 int64_t value = Read<int64_t>(); | 220 int64_t value = Read<int64_t>(); |
| 220 if ((value & kSmiTagMask) == kSmiTag) { | 221 if ((value & kSmiTagMask) == kSmiTag) { |
| 221 return NewInteger(value); | 222 return NewInteger(value); |
| (...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 UnmarkAll(); | 1463 UnmarkAll(); |
| 1463 isolate->set_long_jump_base(base); | 1464 isolate->set_long_jump_base(base); |
| 1464 } else { | 1465 } else { |
| 1465 isolate->set_long_jump_base(base); | 1466 isolate->set_long_jump_base(base); |
| 1466 ThrowException(exception_type(), exception_msg()); | 1467 ThrowException(exception_type(), exception_msg()); |
| 1467 } | 1468 } |
| 1468 } | 1469 } |
| 1469 | 1470 |
| 1470 | 1471 |
| 1471 } // namespace dart | 1472 } // namespace dart |
| OLD | NEW |