Skip to content

Commit bd8e7a6

Browse files
committed
---
yaml --- r: 326654 b: refs/heads/tensorflow c: 1d9f1ec h: refs/heads/master
1 parent d5e0b17 commit bd8e7a6

File tree

18 files changed

+241
-275
lines changed

18 files changed

+241
-275
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: af1fa9c1b45f55f8c1adc2fcc2017b92dbd12803
819+
refs/heads/tensorflow: 1d9f1ec3f8cb537bcec974b9474edac7ccbd7b11
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/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)