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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 } | 788 } |
789 intptr_t offset = Object::InstanceSize(); | 789 intptr_t offset = Object::InstanceSize(); |
790 while (offset < instance_size) { | 790 while (offset < instance_size) { |
791 obj_ = ReadObjectRef(); | 791 obj_ = ReadObjectRef(); |
792 result->SetFieldAtOffset(offset, obj_); | 792 result->SetFieldAtOffset(offset, obj_); |
793 offset += kWordSize; | 793 offset += kWordSize; |
794 } | 794 } |
795 if (kind_ == Snapshot::kFull) { | 795 if (kind_ == Snapshot::kFull) { |
796 result->SetCreatedFromSnapshot(); | 796 result->SetCreatedFromSnapshot(); |
797 } else if (result->IsCanonical()) { | 797 } else if (result->IsCanonical()) { |
798 *result = result->Canonicalize(); | 798 *result = result->CheckAndCanonicalize(NULL); |
| 799 ASSERT(!result->IsNull()); |
799 } | 800 } |
800 return result->raw(); | 801 return result->raw(); |
801 } | 802 } |
802 ASSERT((class_header & kSmiTagMask) != kSmiTag); | 803 ASSERT((class_header & kSmiTagMask) != kSmiTag); |
803 cls_ = LookupInternalClass(class_header); | 804 cls_ = LookupInternalClass(class_header); |
804 ASSERT(!cls_.IsNull()); | 805 ASSERT(!cls_.IsNull()); |
805 switch (cls_.id()) { | 806 switch (cls_.id()) { |
806 #define SNAPSHOT_READ(clazz) \ | 807 #define SNAPSHOT_READ(clazz) \ |
807 case clazz::kClassId: { \ | 808 case clazz::kClassId: { \ |
808 obj_ = clazz::ReadFrom(this, object_id, tags, kind_); \ | 809 obj_ = clazz::ReadFrom(this, object_id, tags, kind_); \ |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 UnmarkAll(); | 1466 UnmarkAll(); |
1466 isolate->set_long_jump_base(base); | 1467 isolate->set_long_jump_base(base); |
1467 } else { | 1468 } else { |
1468 isolate->set_long_jump_base(base); | 1469 isolate->set_long_jump_base(base); |
1469 ThrowException(exception_type(), exception_msg()); | 1470 ThrowException(exception_type(), exception_msg()); |
1470 } | 1471 } |
1471 } | 1472 } |
1472 | 1473 |
1473 | 1474 |
1474 } // namespace dart | 1475 } // namespace dart |
OLD | NEW |