Remove unfinished notion of "Component" (originally for resilience).

docs/Resilience.rst describes the notion of a resilience component:
if the current source file is in the same component as a module being
used, it can use fragile access for everything in the other module,
with the assumption that everything in a component will always be
recompiled together.

However, nothing is actually using this today, and the interface we
have is probably not what we'll want in 2.0, when we actually implement
resilience.

Swift SVN r9174
This commit is contained in:
Jordan Rose
2013-10-10 21:41:57 +00:00
parent 9135f61c5a
commit 7b936e2b85
15 changed files with 28 additions and 172 deletions

View File

@@ -14,7 +14,6 @@
#include "ModuleFile.h"
#include "swift/Subsystems.h"
#include "swift/AST/AST.h"
#include "swift/AST/Component.h"
#include "swift/AST/Diagnostics.h"
#include "swift/Basic/STLExtras.h"
#include "swift/Basic/SourceManager.h"
@@ -140,16 +139,14 @@ Module *SerializedModuleLoader::loadModule(SourceLoc importLoc,
// Whether we succeed or fail, don't try to load this module again.
Module *&module = Ctx.LoadedModules[moduleID.first.str()];
auto comp = new (Ctx.Allocate<Component>(1)) Component();
if (err == ModuleStatus::Valid) {
module = new (Ctx) SerializedModule(Ctx, *this, moduleID.first,
DebugModuleName,
comp, *loadedModuleFile);
DebugModuleName, *loadedModuleFile);
} else {
module = new (Ctx) FailedImportModule(moduleID.first, err,
loadedModuleFile->getModuleFilename(),
Ctx, FailedImportLoader, comp);
Ctx, FailedImportLoader);
loadedModuleFile.reset();
}
@@ -194,7 +191,7 @@ Module *SerializedModuleLoader::loadModule(SourceLoc importLoc,
module = new (Ctx) FailedImportModule(moduleID.first,
loadedModuleFile->getStatus(),
loadedModuleFile->getModuleFilename(),
Ctx, FailedImportLoader, comp);
Ctx, FailedImportLoader);
}
}