Commits

Dmitri Hrybenko committed 8d8b60f9735
Code completion: implement result caching per-imported module across muptiple ASTContexts This introduces swift::ide::CodeCompletionCache, which is a persistent code completion result cache. Right now REPL happens to use it (try importing Cocoa and doing code completion), and the difference is noticeable. But completion in REPL is still slow, because Cocoa goes through the AST Verifier on every completion (for unknown reasons). This commit does not implement cache invalidation yet, and it does not use libcache to evict cache entries under memory pressure. This commit also introduces two regressions: - We get fewer Cocoa results that expected. Module::isModuleVisible in Clang does not incorrectly reports that that ObjectiveC.NSObject submodule is not visible from Cocoa. - We are not implementing the decl hiding rules correctly. We used to rely on visible decl lookup to do it for us, but now we have a different data structure we have real decls from the current module and we have a text-only cache, so we are forced to reimplement this part of name lookup in code completion. Swift SVN r9633