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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 } | 1175 } |
1176 // Initialize cache of resolved names. | 1176 // Initialize cache of resolved names. |
1177 const intptr_t kInitialNameCacheSize = 64; | 1177 const intptr_t kInitialNameCacheSize = 64; |
1178 if (kind != Snapshot::kFull) { | 1178 if (kind != Snapshot::kFull) { |
1179 // The cache of resolved names in library scope is not serialized. | 1179 // The cache of resolved names in library scope is not serialized. |
1180 library.InitResolvedNamesCache(kInitialNameCacheSize); | 1180 library.InitResolvedNamesCache(kInitialNameCacheSize); |
1181 library.Register(); | 1181 library.Register(); |
1182 } else { | 1182 } else { |
1183 library.InitResolvedNamesCache(kInitialNameCacheSize, reader); | 1183 library.InitResolvedNamesCache(kInitialNameCacheSize, reader); |
1184 } | 1184 } |
| 1185 library.StorePointer(&library.raw_ptr()->exported_names_, Array::null()); |
1185 // Initialize cache of loaded scripts. | 1186 // Initialize cache of loaded scripts. |
1186 library.StorePointer(&library.raw_ptr()->loaded_scripts_, Array::null()); | 1187 library.StorePointer(&library.raw_ptr()->loaded_scripts_, Array::null()); |
1187 } | 1188 } |
1188 return library.raw(); | 1189 return library.raw(); |
1189 } | 1190 } |
1190 | 1191 |
1191 | 1192 |
1192 void RawLibrary::WriteTo(SnapshotWriter* writer, | 1193 void RawLibrary::WriteTo(SnapshotWriter* writer, |
1193 intptr_t object_id, | 1194 intptr_t object_id, |
1194 Snapshot::Kind kind, | 1195 Snapshot::Kind kind, |
(...skipping 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3700 // We do not allow objects with native fields in an isolate message. | 3701 // We do not allow objects with native fields in an isolate message. |
3701 writer->SetWriteException(Exceptions::kArgument, | 3702 writer->SetWriteException(Exceptions::kArgument, |
3702 "Illegal argument in isolate message" | 3703 "Illegal argument in isolate message" |
3703 " : (object is a UserTag)"); | 3704 " : (object is a UserTag)"); |
3704 } else { | 3705 } else { |
3705 UNREACHABLE(); | 3706 UNREACHABLE(); |
3706 } | 3707 } |
3707 } | 3708 } |
3708 | 3709 |
3709 } // namespace dart | 3710 } // namespace dart |
OLD | NEW |