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/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 2628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2639 // Indicate this is an instance object. | 2639 // Indicate this is an instance object. |
2640 Write<int32_t>(SerializedHeaderData::encode(kInstanceObjectId)); | 2640 Write<int32_t>(SerializedHeaderData::encode(kInstanceObjectId)); |
2641 WriteTags(tags); | 2641 WriteTags(tags); |
2642 | 2642 |
2643 // Write out the class information for this object. | 2643 // Write out the class information for this object. |
2644 WriteObjectImpl(cls, kAsInlinedObject); | 2644 WriteObjectImpl(cls, kAsInlinedObject); |
2645 } | 2645 } |
2646 | 2646 |
2647 | 2647 |
2648 bool SnapshotWriter::AllowObjectsInDartLibrary(RawLibrary* library) { | 2648 bool SnapshotWriter::AllowObjectsInDartLibrary(RawLibrary* library) { |
2649 return library == object_store()->typed_data_library(); | 2649 return (library == object_store()->collection_library() || |
| 2650 library == object_store()->core_library() || |
| 2651 library == object_store()->typed_data_library()); |
2650 } | 2652 } |
2651 | 2653 |
2652 | 2654 |
2653 intptr_t SnapshotWriter::FindVmSnapshotObject(RawObject* rawobj) { | 2655 intptr_t SnapshotWriter::FindVmSnapshotObject(RawObject* rawobj) { |
2654 intptr_t length = Object::vm_isolate_snapshot_object_table().Length(); | 2656 intptr_t length = Object::vm_isolate_snapshot_object_table().Length(); |
2655 for (intptr_t i = 0; i < length; i++) { | 2657 for (intptr_t i = 0; i < length; i++) { |
2656 if (Object::vm_isolate_snapshot_object_table().At(i) == rawobj) { | 2658 if (Object::vm_isolate_snapshot_object_table().At(i) == rawobj) { |
2657 return (i + kMaxPredefinedObjectIds); | 2659 return (i + kMaxPredefinedObjectIds); |
2658 } | 2660 } |
2659 } | 2661 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 NoSafepointScope no_safepoint; | 2779 NoSafepointScope no_safepoint; |
2778 WriteObject(obj.raw()); | 2780 WriteObject(obj.raw()); |
2779 UnmarkAll(); | 2781 UnmarkAll(); |
2780 } else { | 2782 } else { |
2781 ThrowException(exception_type(), exception_msg()); | 2783 ThrowException(exception_type(), exception_msg()); |
2782 } | 2784 } |
2783 } | 2785 } |
2784 | 2786 |
2785 | 2787 |
2786 } // namespace dart | 2788 } // namespace dart |
OLD | NEW |