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/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 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 // Allocate library prefix object. | 1182 // Allocate library prefix object. |
1183 LibraryPrefix& prefix = LibraryPrefix::ZoneHandle(reader->zone(), | 1183 LibraryPrefix& prefix = LibraryPrefix::ZoneHandle(reader->zone(), |
1184 LibraryPrefix::New()); | 1184 LibraryPrefix::New()); |
1185 reader->AddBackRef(object_id, &prefix, kIsDeserialized); | 1185 reader->AddBackRef(object_id, &prefix, kIsDeserialized); |
1186 | 1186 |
1187 // Set all non object fields. | 1187 // Set all non object fields. |
1188 prefix.StoreNonPointer(&prefix.raw_ptr()->num_imports_, | 1188 prefix.StoreNonPointer(&prefix.raw_ptr()->num_imports_, |
1189 reader->Read<int16_t>()); | 1189 reader->Read<int16_t>()); |
1190 prefix.StoreNonPointer(&prefix.raw_ptr()->is_deferred_load_, | 1190 prefix.StoreNonPointer(&prefix.raw_ptr()->is_deferred_load_, |
1191 reader->Read<bool>()); | 1191 reader->Read<bool>()); |
1192 prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_, false); | 1192 prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_, |
| 1193 !prefix.raw_ptr()->is_deferred_load_); |
1193 | 1194 |
1194 // Set all the object fields. | 1195 // Set all the object fields. |
1195 READ_OBJECT_FIELDS(prefix, | 1196 READ_OBJECT_FIELDS(prefix, |
1196 prefix.raw()->from(), | 1197 prefix.raw()->from(), |
1197 prefix.raw()->to_snapshot(kind), | 1198 prefix.raw()->to_snapshot(kind), |
1198 kAsReference); | 1199 kAsReference); |
1199 prefix.StorePointer(&prefix.raw_ptr()->dependent_code_, | 1200 prefix.StorePointer(&prefix.raw_ptr()->dependent_code_, |
1200 Array::null()); | 1201 Array::null()); |
1201 | 1202 |
1202 return prefix.raw(); | 1203 return prefix.raw(); |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3070 // We do not allow objects with native fields in an isolate message. | 3071 // We do not allow objects with native fields in an isolate message. |
3071 writer->SetWriteException(Exceptions::kArgument, | 3072 writer->SetWriteException(Exceptions::kArgument, |
3072 "Illegal argument in isolate message" | 3073 "Illegal argument in isolate message" |
3073 " : (object is a UserTag)"); | 3074 " : (object is a UserTag)"); |
3074 } else { | 3075 } else { |
3075 UNREACHABLE(); | 3076 UNREACHABLE(); |
3076 } | 3077 } |
3077 } | 3078 } |
3078 | 3079 |
3079 } // namespace dart | 3080 } // namespace dart |
OLD | NEW |