Skip to content

Commit f3e849b

Browse files
committed
---
yaml --- r: 349411 b: refs/heads/master-next c: ce0083b h: refs/heads/master i: 349409: 9a4e12c 349407: e23d442
1 parent bec6faf commit f3e849b

File tree

3 files changed

+153
-62
lines changed

3 files changed

+153
-62
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: ebd20ad5c3ac1096a90571822831a5b3edfde447
3+
refs/heads/master-next: ce0083bc39d77d15a4e0d74733e3fe773b13fc8c
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/include/swift/AST/Module.h

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ namespace swift {
6060
class InfixOperatorDecl;
6161
class LazyResolver;
6262
class LinkLibrary;
63-
class LookupCache;
6463
class ModuleLoader;
6564
class NominalTypeDecl;
6665
class EnumElementDecl;
@@ -80,6 +79,7 @@ namespace swift {
8079
class VisibleDeclConsumer;
8180
class SyntaxParsingCache;
8281
class ASTScope;
82+
class SourceLookupCache;
8383

8484
namespace syntax {
8585
class SourceFileSyntax;
@@ -204,6 +204,9 @@ class ModuleDecl : public DeclContext, public TypeDecl {
204204

205205
SmallVector<FileUnit *, 2> Files;
206206

207+
std::unique_ptr<SourceLookupCache> Cache;
208+
SourceLookupCache &getSourceLookupCache() const;
209+
207210
/// Tracks the file that will generate the module's entry point, either
208211
/// because it contains a class marked with \@UIApplicationMain
209212
/// or \@NSApplicationMain, or because it is a script file.
@@ -378,6 +381,12 @@ class ModuleDecl : public DeclContext, public TypeDecl {
378381
VisibleDeclConsumer &Consumer,
379382
NLKind LookupKind) const;
380383

384+
/// This is a hack for 'main' file parsing and the integrated REPL.
385+
///
386+
/// FIXME: Refactor main file parsing to not pump the parser incrementally.
387+
/// FIXME: Remove the integrated REPL.
388+
void clearLookupCache();
389+
381390
/// @{
382391

383392
/// Look up the given operator in this module.
@@ -913,7 +922,6 @@ static inline unsigned alignOfFileUnit() {
913922
/// IR generation.
914923
class SourceFile final : public FileUnit {
915924
public:
916-
class LookupCache;
917925
class Impl;
918926
struct SourceFileSyntaxInfo;
919927

@@ -962,8 +970,8 @@ class SourceFile final : public FileUnit {
962970
};
963971

964972
private:
965-
std::unique_ptr<LookupCache> Cache;
966-
LookupCache &getCache() const;
973+
std::unique_ptr<SourceLookupCache> Cache;
974+
SourceLookupCache &getCache() const;
967975

968976
/// This is the list of modules that are imported by this module.
969977
///
@@ -1118,6 +1126,10 @@ class SourceFile final : public FileUnit {
11181126

11191127
bool isImportedImplementationOnly(const ModuleDecl *module) const;
11201128

1129+
/// This is a hack for 'main' file parsing and the integrated REPL.
1130+
///
1131+
/// FIXME: Refactor main file parsing to not pump the parser incrementally.
1132+
/// FIXME: Remove the integrated REPL.
11211133
void clearLookupCache();
11221134

11231135
void cacheVisibleDecls(SmallVectorImpl<ValueDecl *> &&globals) const;

0 commit comments

Comments
 (0)