mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
NominalTypeDecls and ExtensionDecls have a list of members. Rather than eagerly populating that list when the nominal or extension is just referenced, just include a pointer back to the ModuleFile, so that they can be deserialized when we actually look into the decl. The design here is general enough that we could do something similar with imported Clang decls. Clang is even more lazy here: the on-disk representation is a hash table, so lookup only forces deserialization of members with the same name. We probably want that some day, but this might be enough to get by for now. This is groundwork for loading partial ASTs, where eagerly deserializing members leads to circular references we're not able to handle. Swift SVN r11219
14 KiB
14 KiB