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

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

Issue 1990613002: Attempt to fix the linker issues by wrapping the template call with a helper (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « runtime/vm/object.cc ('k') | no next file » | 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/native_entry.h" 5 #include "vm/native_entry.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 classid_t class_id = reader->ReadClassIDValue(); 54 classid_t class_id = reader->ReadClassIDValue();
55 55
56 // Allocate class object of specified kind. 56 // Allocate class object of specified kind.
57 if (Snapshot::IsFull(kind)) { 57 if (Snapshot::IsFull(kind)) {
58 cls = reader->NewClass(class_id); 58 cls = reader->NewClass(class_id);
59 } else { 59 } else {
60 if (class_id < kNumPredefinedCids) { 60 if (class_id < kNumPredefinedCids) {
61 ASSERT((class_id >= kInstanceCid) && (class_id <= kMirrorReferenceCid)); 61 ASSERT((class_id >= kInstanceCid) && (class_id <= kMirrorReferenceCid));
62 cls = reader->isolate()->class_table()->At(class_id); 62 cls = reader->isolate()->class_table()->At(class_id);
63 } else { 63 } else {
64 cls = Class::New<Instance>(kIllegalCid); 64 cls = Class::NewInstanceClass();
65 } 65 }
66 } 66 }
67 reader->AddBackRef(object_id, &cls, kIsDeserialized); 67 reader->AddBackRef(object_id, &cls, kIsDeserialized);
68 68
69 // Set all non object fields. 69 // Set all non object fields.
70 if (!RawObject::IsInternalVMdefinedClassId(class_id)) { 70 if (!RawObject::IsInternalVMdefinedClassId(class_id)) {
71 // Instance size of a VM defined class is already set up. 71 // Instance size of a VM defined class is already set up.
72 cls.set_instance_size_in_words(reader->Read<int32_t>()); 72 cls.set_instance_size_in_words(reader->Read<int32_t>());
73 cls.set_next_field_offset_in_words(reader->Read<int32_t>()); 73 cls.set_next_field_offset_in_words(reader->Read<int32_t>());
74 } 74 }
(...skipping 3709 matching lines...) Expand 10 before | Expand all | Expand 10 after
3784 // We do not allow objects with native fields in an isolate message. 3784 // We do not allow objects with native fields in an isolate message.
3785 writer->SetWriteException(Exceptions::kArgument, 3785 writer->SetWriteException(Exceptions::kArgument,
3786 "Illegal argument in isolate message" 3786 "Illegal argument in isolate message"
3787 " : (object is a UserTag)"); 3787 " : (object is a UserTag)");
3788 } else { 3788 } else {
3789 UNREACHABLE(); 3789 UNREACHABLE();
3790 } 3790 }
3791 } 3791 }
3792 3792
3793 } // namespace dart 3793 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698