| 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 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3709 // We do not allow objects with native fields in an isolate message. | 3710 // We do not allow objects with native fields in an isolate message. |
| 3710 writer->SetWriteException(Exceptions::kArgument, | 3711 writer->SetWriteException(Exceptions::kArgument, |
| 3711 "Illegal argument in isolate message" | 3712 "Illegal argument in isolate message" |
| 3712 " : (object is a UserTag)"); | 3713 " : (object is a UserTag)"); |
| 3713 } else { | 3714 } else { |
| 3714 UNREACHABLE(); | 3715 UNREACHABLE(); |
| 3715 } | 3716 } |
| 3716 } | 3717 } |
| 3717 | 3718 |
| 3718 } // namespace dart | 3719 } // namespace dart |
| OLD | NEW |