Files
swift-mirror/lib/Serialization/ModuleFile.h
Jordan Rose c2bd6eb2b0 Lazily deserialize members from AST files.
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
2013-12-12 23:31:15 +00:00

14 KiB