[deserialization] Begin move to lazy linking by putting a SerializedModuleLoader on SILModule.

Right now it is not wired up. That is coming in forthcoming commits. I am trying
to be very incremental about this.

This series of patches will fix an assertion triggered by us not deserializing
functions from vtables appropriately. Doing linking lazily fixes that issue and
does the "right thing".

The work is being done in consultation with John, Joe, and Jordan.

Swift SVN r14479
This commit is contained in:
Michael Gottesman
2014-02-27 21:30:54 +00:00
parent ffa9b06042
commit a073096093
2 changed files with 46 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ namespace swift {
class SILTypeList;
class SILUndef;
class SourceFile;
class SerializedSILLoader;
namespace Lowering {
class SILGenModule;
@@ -86,6 +87,7 @@ private:
friend class SILWitnessTable;
friend class Lowering::SILGenModule;
friend class Lowering::TypeConverter;
class SerializationCallback;
/// Allocator that manages the memory of all the pieces of the SILModule.
mutable llvm::BumpPtrAllocator BPA;
@@ -139,6 +141,12 @@ private:
/// The stage of processing this module is at.
SILStage Stage;
/// The callback used by the SILLoader.
std::unique_ptr<SerializationCallback> Callback;
/// The SILLoader used when linking functions into this module.
SerializedSILLoader *SILLoader;
/// The external SIL source to use when linking this module.
SILExternalSource *ExternalSource = nullptr;