mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add a request to lazily parse function bodies.
Rework the lazy function body parsing mechanism to use the request-evaluator, so that asking for the body of a function will initiate parsing. Clean up a number of callers to AbstractFunctionDecl::getBody() that don't actually need the body, so we don't perform unnecessary parsing. This change does not delay parsing of function bodies in the general case; rather, it sets up the infrastructure to always delay parsing of function bodies.
This commit is contained in:
@@ -152,9 +152,6 @@ ModuleDecl *SourceLoader::loadModule(SourceLoc importLoc,
|
||||
assert(done && "Parser returned early?");
|
||||
(void)done;
|
||||
|
||||
if (SkipBodies)
|
||||
performDelayedParsing(importMod, persistentState, nullptr);
|
||||
|
||||
// FIXME: Support recursive definitions in immediate modes by making type
|
||||
// checking even lazier.
|
||||
if (SkipBodies)
|
||||
|
||||
Reference in New Issue
Block a user