Commits

Manman Ren committed fa0acc9328a
SIL Serialiation: add implementation to deserialize SIL and a wrapper class SerializedSILLoader to hold a list of SIL deserializers. Also add an intial implementation of a linking pass that is run right after SILGen to link the declaration of SILFunction to the actual definition in the serialized module. We add two blocks to the serialized module: a sil index block that maps identifier to a function ID and also holds a list of function offsets, and a sil block for the actual SILFunctions. We can probably use subblock instead of two top-level blocks. The serialization/de-serialization of the function hash table and the function offsets are implemented. But we are missing handling of types (see FIXME in the code). ModuleFile::Serialized is made public to be used by SIL deserializer, as well as ModuleFile::getType. The SIL deserializer holds a pointer to the ModuleFile, it gets the sil cursor and the sil index cursor from the ModuleFile. The other option is for SIL deserializer to find the start of the two sil blocks within itself, thus having less coupling with ModuleFile. No testing case yet because we are missing handling of types. Swift SVN r8206