Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Side by Side Diff: runtime/vm/snapshot.cc

Issue 1343213002: Fix for issue 24243 (allow objects of dart:core and dart:collections to be passed in for now, we ne… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: skip-test Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698