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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 !IsSingletonClassId(GetVMIsolateObjectId(class_header))); | 205 !IsSingletonClassId(GetVMIsolateObjectId(class_header))); |
206 ASSERT((SerializedHeaderTag::decode(class_header) != kObjectId) || | 206 ASSERT((SerializedHeaderTag::decode(class_header) != kObjectId) || |
207 !IsObjectStoreClassId(SerializedHeaderData::decode(class_header))); | 207 !IsObjectStoreClassId(SerializedHeaderData::decode(class_header))); |
208 Class& cls = Class::ZoneHandle(isolate(), Class::null()); | 208 Class& cls = Class::ZoneHandle(isolate(), Class::null()); |
209 AddBackRef(object_id, &cls, kIsDeserialized); | 209 AddBackRef(object_id, &cls, kIsDeserialized); |
210 // Read the library/class information and lookup the class. | 210 // Read the library/class information and lookup the class. |
211 str_ ^= ReadObjectImpl(class_header); | 211 str_ ^= ReadObjectImpl(class_header); |
212 library_ = Library::LookupLibrary(str_); | 212 library_ = Library::LookupLibrary(str_); |
213 ASSERT(!library_.IsNull()); | 213 ASSERT(!library_.IsNull()); |
214 str_ ^= ReadObjectImpl(); | 214 str_ ^= ReadObjectImpl(); |
215 cls = library_.LookupClass(str_); | 215 cls = library_.LookupClass(str_, NULL); // No ambiguity error expected. |
216 cls.EnsureIsFinalized(isolate()); | 216 cls.EnsureIsFinalized(isolate()); |
217 ASSERT(!cls.IsNull()); | 217 ASSERT(!cls.IsNull()); |
218 return cls.raw(); | 218 return cls.raw(); |
219 } | 219 } |
220 | 220 |
221 | 221 |
222 RawObject* SnapshotReader::ReadObjectImpl() { | 222 RawObject* SnapshotReader::ReadObjectImpl() { |
223 int64_t value = Read<int64_t>(); | 223 int64_t value = Read<int64_t>(); |
224 if ((value & kSmiTagMask) == kSmiTag) { | 224 if ((value & kSmiTagMask) == kSmiTag) { |
225 return NewInteger(value); | 225 return NewInteger(value); |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 UnmarkAll(); | 1473 UnmarkAll(); |
1474 isolate->set_long_jump_base(base); | 1474 isolate->set_long_jump_base(base); |
1475 } else { | 1475 } else { |
1476 isolate->set_long_jump_base(base); | 1476 isolate->set_long_jump_base(base); |
1477 ThrowException(exception_type(), exception_msg()); | 1477 ThrowException(exception_type(), exception_msg()); |
1478 } | 1478 } |
1479 } | 1479 } |
1480 | 1480 |
1481 | 1481 |
1482 } // namespace dart | 1482 } // namespace dart |
OLD | NEW |