Don't stick list of headers files to cache recounting
This commit is contained in:
@@ -84,8 +84,7 @@ public final class AnalyzerFacadeWithCache {
|
|||||||
// System.out.println("===============ReCache - In-Block==============");
|
// System.out.println("===============ReCache - In-Block==============");
|
||||||
|
|
||||||
// Collect context for headers first
|
// Collect context for headers first
|
||||||
Collection<JetFile> allFilesToAnalyze = declarationProvider.fun(file);
|
AnalyzeExhaust analyzeExhaustHeaders = analyzeHeadersWithCacheOnFile(file, declarationProvider);
|
||||||
AnalyzeExhaust analyzeExhaustHeaders = analyzeHeadersWithCacheOnFile(file, allFilesToAnalyze);
|
|
||||||
|
|
||||||
BodiesResolveContext context = analyzeExhaustHeaders.getBodiesResolveContext();
|
BodiesResolveContext context = analyzeExhaustHeaders.getBodiesResolveContext();
|
||||||
assert context != null : "Headers resolver should prepare and stored information for bodies resolve";
|
assert context != null : "Headers resolver should prepare and stored information for bodies resolve";
|
||||||
@@ -125,8 +124,10 @@ public final class AnalyzerFacadeWithCache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AnalyzeExhaust analyzeHeadersWithCacheOnFile(@NotNull final JetFile fileToCache,
|
private static AnalyzeExhaust analyzeHeadersWithCacheOnFile(
|
||||||
@NotNull final Collection<JetFile> headerFiles) {
|
@NotNull final JetFile fileToCache,
|
||||||
|
@NotNull final Function<JetFile, Collection<JetFile>> declarationProvider
|
||||||
|
) {
|
||||||
CachedValue<AnalyzeExhaust> bindingContextCachedValue = fileToCache.getUserData(ANALYZE_EXHAUST_HEADERS);
|
CachedValue<AnalyzeExhaust> bindingContextCachedValue = fileToCache.getUserData(ANALYZE_EXHAUST_HEADERS);
|
||||||
if (bindingContextCachedValue == null) {
|
if (bindingContextCachedValue == null) {
|
||||||
bindingContextCachedValue =
|
bindingContextCachedValue =
|
||||||
@@ -136,7 +137,7 @@ public final class AnalyzerFacadeWithCache {
|
|||||||
// System.out.println("===============ReCache - OUT-OF-BLOCK==============");
|
// System.out.println("===============ReCache - OUT-OF-BLOCK==============");
|
||||||
AnalyzeExhaust exhaust = AnalyzerFacadeProvider.getAnalyzerFacadeForFile(fileToCache)
|
AnalyzeExhaust exhaust = AnalyzerFacadeProvider.getAnalyzerFacadeForFile(fileToCache)
|
||||||
.analyzeFiles(fileToCache.getProject(),
|
.analyzeFiles(fileToCache.getProject(),
|
||||||
headerFiles,
|
declarationProvider.fun(fileToCache),
|
||||||
Collections.<AnalyzerScriptParameter>emptyList(),
|
Collections.<AnalyzerScriptParameter>emptyList(),
|
||||||
Predicates.<PsiFile>alwaysFalse());
|
Predicates.<PsiFile>alwaysFalse());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user