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