| 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/bigint_operations.h" | 5 #include "vm/bigint_operations.h" |
| 6 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
| 8 #include "vm/snapshot.h" | 8 #include "vm/snapshot.h" |
| 9 #include "vm/stub_code.h" | 9 #include "vm/stub_code.h" |
| 10 #include "vm/symbols.h" | 10 #include "vm/symbols.h" |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 field.set_kind_bits(reader->Read<uint8_t>()); | 776 field.set_kind_bits(reader->Read<uint8_t>()); |
| 777 | 777 |
| 778 // Set all the object fields. | 778 // Set all the object fields. |
| 779 // TODO(5411462): Need to assert No GC can happen here, even though | 779 // TODO(5411462): Need to assert No GC can happen here, even though |
| 780 // allocations may happen. | 780 // allocations may happen. |
| 781 intptr_t num_flds = (field.raw()->to() - field.raw()->from()); | 781 intptr_t num_flds = (field.raw()->to() - field.raw()->from()); |
| 782 for (intptr_t i = 0; i <= num_flds; i++) { | 782 for (intptr_t i = 0; i <= num_flds; i++) { |
| 783 *(field.raw()->from() + i) = reader->ReadObjectRef(); | 783 *(field.raw()->from() + i) = reader->ReadObjectRef(); |
| 784 } | 784 } |
| 785 | 785 |
| 786 field.InitializeGuardedListLengthInObjectOffset(); |
| 787 |
| 786 return field.raw(); | 788 return field.raw(); |
| 787 } | 789 } |
| 788 | 790 |
| 789 | 791 |
| 790 void RawField::WriteTo(SnapshotWriter* writer, | 792 void RawField::WriteTo(SnapshotWriter* writer, |
| 791 intptr_t object_id, | 793 intptr_t object_id, |
| 792 Snapshot::Kind kind) { | 794 Snapshot::Kind kind) { |
| 793 ASSERT(writer != NULL); | 795 ASSERT(writer != NULL); |
| 794 ASSERT(((kind == Snapshot::kScript) && | 796 ASSERT(((kind == Snapshot::kScript) && |
| 795 !RawObject::IsCreatedFromSnapshot(writer->GetObjectTags(this))) || | 797 !RawObject::IsCreatedFromSnapshot(writer->GetObjectTags(this))) || |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2781 // We do not allow objects with native fields in an isolate message. | 2783 // We do not allow objects with native fields in an isolate message. |
| 2782 writer->SetWriteException(Exceptions::kArgument, | 2784 writer->SetWriteException(Exceptions::kArgument, |
| 2783 "Illegal argument in isolate message" | 2785 "Illegal argument in isolate message" |
| 2784 " : (object is a UserTag)"); | 2786 " : (object is a UserTag)"); |
| 2785 } else { | 2787 } else { |
| 2786 UNREACHABLE(); | 2788 UNREACHABLE(); |
| 2787 } | 2789 } |
| 2788 } | 2790 } |
| 2789 | 2791 |
| 2790 } // namespace dart | 2792 } // namespace dart |
| OLD | NEW |