diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.java b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.java index 0b75888397a..7e3f4ef9b1d 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/ReplInterpreter.java @@ -100,7 +100,7 @@ public class ReplInterpreter { private final ModuleDescriptorImpl module; private final TopDownAnalysisContext topDownAnalysisContext; - private final LazyTopDownAnalyzer topDownAnalyzer; + private final LazyTopDownAnalyzerForTopLevel topDownAnalyzer; private final ResolveSession resolveSession; private final ScriptMutableDeclarationProviderFactory scriptDeclarationFactory; @@ -143,7 +143,7 @@ public class ReplInterpreter { ); this.topDownAnalysisContext = new TopDownAnalysisContext(topDownAnalysisParameters, DataFlowInfo.EMPTY); - this.topDownAnalyzer = injector.getLazyTopDownAnalyzer(); + this.topDownAnalyzer = injector.getLazyTopDownAnalyzerForTopLevel(); this.resolveSession = injector.getResolveSession(); module.initialize(new CompositePackageFragmentProvider( @@ -362,8 +362,7 @@ public class ReplInterpreter { TopDownAnalysisContext context = topDownAnalyzer.analyzeDeclarations( topDownAnalysisContext.getTopDownAnalysisParameters(), - Collections.singletonList(psiFile), - DataFlowInfo.EMPTY + Collections.singletonList(psiFile) ); if (trace.get(BindingContext.FILE_TO_PACKAGE_FRAGMENT, psiFile) == null) { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyBodyResolve.java b/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyBodyResolve.java index 4c560818d91..d5f9bba60e1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyBodyResolve.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyBodyResolve.java @@ -27,10 +27,11 @@ import org.jetbrains.kotlin.resolve.AdditionalCheckerProvider; import org.jetbrains.kotlin.types.DynamicTypesSettings; import org.jetbrains.kotlin.builtins.KotlinBuiltIns; import org.jetbrains.kotlin.platform.PlatformToKotlinClassMap; -import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer; +import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel; import org.jetbrains.kotlin.resolve.lazy.ScopeProvider.AdditionalFileScopeProvider; import org.jetbrains.kotlin.resolve.lazy.DeclarationScopeProviderImpl; import org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver; +import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer; import org.jetbrains.kotlin.resolve.BodyResolver; import org.jetbrains.kotlin.resolve.AnnotationResolver; import org.jetbrains.kotlin.resolve.calls.CallResolver; @@ -80,10 +81,11 @@ public class InjectorForLazyBodyResolve { private final DynamicTypesSettings dynamicTypesSettings; private final KotlinBuiltIns kotlinBuiltIns; private final PlatformToKotlinClassMap platformToKotlinClassMap; - private final LazyTopDownAnalyzer lazyTopDownAnalyzer; + private final LazyTopDownAnalyzerForTopLevel lazyTopDownAnalyzerForTopLevel; private final AdditionalFileScopeProvider additionalFileScopeProvider; private final DeclarationScopeProviderImpl declarationScopeProvider; private final LazyDeclarationResolver lazyDeclarationResolver; + private final LazyTopDownAnalyzer lazyTopDownAnalyzer; private final BodyResolver bodyResolver; private final AnnotationResolver annotationResolver; private final CallResolver callResolver; @@ -135,10 +137,11 @@ public class InjectorForLazyBodyResolve { this.dynamicTypesSettings = dynamicTypesSettings; this.kotlinBuiltIns = moduleDescriptor.getBuiltIns(); this.platformToKotlinClassMap = moduleDescriptor.getPlatformToKotlinClassMap(); - this.lazyTopDownAnalyzer = new LazyTopDownAnalyzer(); + this.lazyTopDownAnalyzerForTopLevel = new LazyTopDownAnalyzerForTopLevel(); this.additionalFileScopeProvider = new AdditionalFileScopeProvider(); this.lazyDeclarationResolver = new LazyDeclarationResolver(globalContext, bindingTrace); this.declarationScopeProvider = new DeclarationScopeProviderImpl(lazyDeclarationResolver); + this.lazyTopDownAnalyzer = new LazyTopDownAnalyzer(); this.bodyResolver = new BodyResolver(); this.annotationResolver = new AnnotationResolver(); this.callResolver = new CallResolver(); @@ -174,23 +177,26 @@ public class InjectorForLazyBodyResolve { scopeProvider.setAdditionalFileScopesProvider(additionalFileScopeProvider); scopeProvider.setDeclarationScopeProvider(declarationScopeProvider); - this.lazyTopDownAnalyzer.setBodyResolver(bodyResolver); - this.lazyTopDownAnalyzer.setDeclarationResolver(declarationResolver); - this.lazyTopDownAnalyzer.setDeclarationScopeProvider(declarationScopeProvider); - this.lazyTopDownAnalyzer.setFileScopeProvider(scopeProvider); - this.lazyTopDownAnalyzer.setLazyDeclarationResolver(lazyDeclarationResolver); - this.lazyTopDownAnalyzer.setModuleDescriptor(moduleDescriptor); - this.lazyTopDownAnalyzer.setOverloadResolver(overloadResolver); - this.lazyTopDownAnalyzer.setOverrideResolver(overrideResolver); - this.lazyTopDownAnalyzer.setTopLevelDescriptorProvider(analyzer); - this.lazyTopDownAnalyzer.setTrace(bindingTrace); - this.lazyTopDownAnalyzer.setVarianceChecker(varianceChecker); + this.lazyTopDownAnalyzerForTopLevel.setKotlinCodeAnalyzer(analyzer); + this.lazyTopDownAnalyzerForTopLevel.setLazyTopDownAnalyzer(lazyTopDownAnalyzer); declarationScopeProvider.setFileScopeProvider(scopeProvider); lazyDeclarationResolver.setDeclarationScopeProvider(declarationScopeProvider); lazyDeclarationResolver.setTopLevelDescriptorProvider(analyzer); + lazyTopDownAnalyzer.setBodyResolver(bodyResolver); + lazyTopDownAnalyzer.setDeclarationResolver(declarationResolver); + lazyTopDownAnalyzer.setDeclarationScopeProvider(declarationScopeProvider); + lazyTopDownAnalyzer.setFileScopeProvider(scopeProvider); + lazyTopDownAnalyzer.setLazyDeclarationResolver(lazyDeclarationResolver); + lazyTopDownAnalyzer.setModuleDescriptor(moduleDescriptor); + lazyTopDownAnalyzer.setOverloadResolver(overloadResolver); + lazyTopDownAnalyzer.setOverrideResolver(overrideResolver); + lazyTopDownAnalyzer.setTopLevelDescriptorProvider(analyzer); + lazyTopDownAnalyzer.setTrace(bindingTrace); + lazyTopDownAnalyzer.setVarianceChecker(varianceChecker); + bodyResolver.setAnnotationResolver(annotationResolver); bodyResolver.setCallResolver(callResolver); bodyResolver.setControlFlowAnalyzer(controlFlowAnalyzer); @@ -281,8 +287,8 @@ public class InjectorForLazyBodyResolve { public void destroy() { } - public LazyTopDownAnalyzer getLazyTopDownAnalyzer() { - return this.lazyTopDownAnalyzer; + public LazyTopDownAnalyzerForTopLevel getLazyTopDownAnalyzerForTopLevel() { + return this.lazyTopDownAnalyzerForTopLevel; } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyTopDownAnalyzerBasic.java b/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyTopDownAnalyzerBasic.java index b82ffc05af8..ea6c837ebc3 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyTopDownAnalyzerBasic.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/di/InjectorForLazyTopDownAnalyzerBasic.java @@ -26,7 +26,6 @@ import org.jetbrains.kotlin.platform.PlatformToKotlinClassMap; import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactory; import org.jetbrains.kotlin.resolve.lazy.ResolveSession; import org.jetbrains.kotlin.resolve.lazy.ScopeProvider; -import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer; import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel; import org.jetbrains.kotlin.resolve.AdditionalCheckerProvider.DefaultProvider; import org.jetbrains.kotlin.resolve.AnnotationResolver; @@ -56,6 +55,7 @@ import org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver; import org.jetbrains.kotlin.resolve.lazy.DeclarationScopeProviderImpl; import org.jetbrains.kotlin.resolve.ScriptBodyResolver; import org.jetbrains.kotlin.resolve.lazy.ScopeProvider.AdditionalFileScopeProvider; +import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer; import org.jetbrains.kotlin.resolve.BodyResolver; import org.jetbrains.kotlin.resolve.ControlFlowAnalyzer; import org.jetbrains.kotlin.resolve.DeclarationsChecker; @@ -82,7 +82,6 @@ public class InjectorForLazyTopDownAnalyzerBasic { private final DeclarationProviderFactory declarationProviderFactory; private final ResolveSession resolveSession; private final ScopeProvider scopeProvider; - private final LazyTopDownAnalyzer lazyTopDownAnalyzer; private final LazyTopDownAnalyzerForTopLevel lazyTopDownAnalyzerForTopLevel; private final DefaultProvider defaultProvider; private final AnnotationResolver annotationResolver; @@ -112,6 +111,7 @@ public class InjectorForLazyTopDownAnalyzerBasic { private final DeclarationScopeProviderImpl declarationScopeProvider; private final ScriptBodyResolver scriptBodyResolver; private final AdditionalFileScopeProvider additionalFileScopeProvider; + private final LazyTopDownAnalyzer lazyTopDownAnalyzer; private final BodyResolver bodyResolver; private final ControlFlowAnalyzer controlFlowAnalyzer; private final DeclarationsChecker declarationsChecker; @@ -139,7 +139,6 @@ public class InjectorForLazyTopDownAnalyzerBasic { this.declarationProviderFactory = declarationProviderFactory; this.resolveSession = new ResolveSession(project, globalContext, module, declarationProviderFactory, bindingTrace); this.scopeProvider = new ScopeProvider(getResolveSession()); - this.lazyTopDownAnalyzer = new LazyTopDownAnalyzer(); this.lazyTopDownAnalyzerForTopLevel = new LazyTopDownAnalyzerForTopLevel(); this.defaultProvider = DefaultProvider.INSTANCE$; this.annotationResolver = new AnnotationResolver(); @@ -169,6 +168,7 @@ public class InjectorForLazyTopDownAnalyzerBasic { this.declarationScopeProvider = new DeclarationScopeProviderImpl(lazyDeclarationResolver); this.scriptBodyResolver = new ScriptBodyResolver(); this.additionalFileScopeProvider = new AdditionalFileScopeProvider(); + this.lazyTopDownAnalyzer = new LazyTopDownAnalyzer(); this.bodyResolver = new BodyResolver(); this.controlFlowAnalyzer = new ControlFlowAnalyzer(); this.declarationsChecker = new DeclarationsChecker(); @@ -191,18 +191,6 @@ public class InjectorForLazyTopDownAnalyzerBasic { scopeProvider.setAdditionalFileScopesProvider(additionalFileScopeProvider); scopeProvider.setDeclarationScopeProvider(declarationScopeProvider); - this.lazyTopDownAnalyzer.setBodyResolver(bodyResolver); - this.lazyTopDownAnalyzer.setDeclarationResolver(declarationResolver); - this.lazyTopDownAnalyzer.setDeclarationScopeProvider(declarationScopeProvider); - this.lazyTopDownAnalyzer.setFileScopeProvider(scopeProvider); - this.lazyTopDownAnalyzer.setLazyDeclarationResolver(lazyDeclarationResolver); - this.lazyTopDownAnalyzer.setModuleDescriptor(module); - this.lazyTopDownAnalyzer.setOverloadResolver(overloadResolver); - this.lazyTopDownAnalyzer.setOverrideResolver(overrideResolver); - this.lazyTopDownAnalyzer.setTopLevelDescriptorProvider(resolveSession); - this.lazyTopDownAnalyzer.setTrace(bindingTrace); - this.lazyTopDownAnalyzer.setVarianceChecker(varianceChecker); - this.lazyTopDownAnalyzerForTopLevel.setKotlinCodeAnalyzer(resolveSession); this.lazyTopDownAnalyzerForTopLevel.setLazyTopDownAnalyzer(lazyTopDownAnalyzer); @@ -272,6 +260,18 @@ public class InjectorForLazyTopDownAnalyzerBasic { scriptBodyResolver.setExpressionTypingServices(expressionTypingServices); + lazyTopDownAnalyzer.setBodyResolver(bodyResolver); + lazyTopDownAnalyzer.setDeclarationResolver(declarationResolver); + lazyTopDownAnalyzer.setDeclarationScopeProvider(declarationScopeProvider); + lazyTopDownAnalyzer.setFileScopeProvider(scopeProvider); + lazyTopDownAnalyzer.setLazyDeclarationResolver(lazyDeclarationResolver); + lazyTopDownAnalyzer.setModuleDescriptor(module); + lazyTopDownAnalyzer.setOverloadResolver(overloadResolver); + lazyTopDownAnalyzer.setOverrideResolver(overrideResolver); + lazyTopDownAnalyzer.setTopLevelDescriptorProvider(resolveSession); + lazyTopDownAnalyzer.setTrace(bindingTrace); + lazyTopDownAnalyzer.setVarianceChecker(varianceChecker); + bodyResolver.setAnnotationResolver(annotationResolver); bodyResolver.setCallResolver(callResolver); bodyResolver.setControlFlowAnalyzer(controlFlowAnalyzer); @@ -307,10 +307,6 @@ public class InjectorForLazyTopDownAnalyzerBasic { return this.resolveSession; } - public LazyTopDownAnalyzer getLazyTopDownAnalyzer() { - return this.lazyTopDownAnalyzer; - } - public LazyTopDownAnalyzerForTopLevel getLazyTopDownAnalyzerForTopLevel() { return this.lazyTopDownAnalyzerForTopLevel; } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/LazyTopDownAnalyzerForTopLevel.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/LazyTopDownAnalyzerForTopLevel.java index f0a1fdf48c0..41482ba9318 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/LazyTopDownAnalyzerForTopLevel.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/LazyTopDownAnalyzerForTopLevel.java @@ -16,6 +16,7 @@ package org.jetbrains.kotlin.resolve; +import com.intellij.psi.PsiElement; import kotlin.KotlinPackage; import org.jetbrains.annotations.NotNull; import org.jetbrains.kotlin.descriptors.PackageFragmentProvider; @@ -67,7 +68,15 @@ public class LazyTopDownAnalyzerForTopLevel { ((ModuleDescriptorImpl) resolveSession.getModuleDescriptor()).initialize(provider); - TopDownAnalysisContext c = lazyTopDownAnalyzer.analyzeDeclarations(topDownAnalysisParameters, files, DataFlowInfo.EMPTY); + return analyzeDeclarations(topDownAnalysisParameters, files); + } + + @NotNull + public TopDownAnalysisContext analyzeDeclarations( + @NotNull TopDownAnalysisParameters topDownAnalysisParameters, + @NotNull Collection elements + ) { + TopDownAnalysisContext c = lazyTopDownAnalyzer.analyzeDeclarations(topDownAnalysisParameters, elements, DataFlowInfo.EMPTY); resolveImportsInAllFiles(c, resolveSession); diff --git a/generators/src/org/jetbrains/kotlin/generators/injectors/GenerateInjectors.kt b/generators/src/org/jetbrains/kotlin/generators/injectors/GenerateInjectors.kt index ed1a1ce18f0..c31db7b36d9 100644 --- a/generators/src/org/jetbrains/kotlin/generators/injectors/GenerateInjectors.kt +++ b/generators/src/org/jetbrains/kotlin/generators/injectors/GenerateInjectors.kt @@ -94,7 +94,6 @@ private fun generatorForLazyTopDownAnalyzerBasic() = generator("compiler/frontend/src", DI_DEFAULT_PACKAGE, "InjectorForLazyTopDownAnalyzerBasic") { commonForResolveSessionBased() - publicField() publicField() field() @@ -129,14 +128,13 @@ private fun generatorForLazyBodyResolve() = field(init = GivenExpression("analyzer.getModuleDescriptor()"), useAsContext = true) - publicField() + publicField() } private fun generatorForTopDownAnalyzerForJs() = generator("js/js.frontend/src", DI_DEFAULT_PACKAGE, "InjectorForTopDownAnalyzerForJs") { commonForResolveSessionBased() - publicField() publicField() field() diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinResolveCache.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinResolveCache.kt index 23443b6c51e..a3cd0b5369a 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinResolveCache.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinResolveCache.kt @@ -253,7 +253,7 @@ private object KotlinResolveDataProvider { trace, targetPlatform.getAdditionalCheckerProvider(), targetPlatform.getDynamicTypesSettings() - ).getLazyTopDownAnalyzer()!! + ).getLazyTopDownAnalyzerForTopLevel()!! lazyTopDownAnalyzer.analyzeDeclarations( TopDownAnalysisParameters.create( @@ -263,8 +263,7 @@ private object KotlinResolveDataProvider { /* analyzingBootstrapLibrary = */ false, /* declaredLocally = */ false ), - listOf(analyzableElement), - DataFlowInfo.EMPTY + listOf(analyzableElement) ) return AnalysisResult.success( trace.getBindingContext(), diff --git a/js/js.frontend/src/org/jetbrains/kotlin/di/InjectorForTopDownAnalyzerForJs.java b/js/js.frontend/src/org/jetbrains/kotlin/di/InjectorForTopDownAnalyzerForJs.java index b740df4721e..c30f28e16d3 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/di/InjectorForTopDownAnalyzerForJs.java +++ b/js/js.frontend/src/org/jetbrains/kotlin/di/InjectorForTopDownAnalyzerForJs.java @@ -26,7 +26,6 @@ import org.jetbrains.kotlin.platform.PlatformToKotlinClassMap; import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactory; import org.jetbrains.kotlin.resolve.lazy.ResolveSession; import org.jetbrains.kotlin.resolve.lazy.ScopeProvider; -import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer; import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel; import org.jetbrains.kotlin.js.resolve.KotlinJsCheckerProvider; import org.jetbrains.kotlin.types.DynamicTypesAllowed; @@ -56,6 +55,7 @@ import org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver; import org.jetbrains.kotlin.resolve.lazy.DeclarationScopeProviderImpl; import org.jetbrains.kotlin.resolve.ScriptBodyResolver; import org.jetbrains.kotlin.resolve.lazy.ScopeProvider.AdditionalFileScopeProvider; +import org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer; import org.jetbrains.kotlin.resolve.BodyResolver; import org.jetbrains.kotlin.resolve.ControlFlowAnalyzer; import org.jetbrains.kotlin.resolve.DeclarationsChecker; @@ -82,7 +82,6 @@ public class InjectorForTopDownAnalyzerForJs { private final DeclarationProviderFactory declarationProviderFactory; private final ResolveSession resolveSession; private final ScopeProvider scopeProvider; - private final LazyTopDownAnalyzer lazyTopDownAnalyzer; private final LazyTopDownAnalyzerForTopLevel lazyTopDownAnalyzerForTopLevel; private final KotlinJsCheckerProvider kotlinJsCheckerProvider; private final DynamicTypesAllowed dynamicTypesAllowed; @@ -112,6 +111,7 @@ public class InjectorForTopDownAnalyzerForJs { private final DeclarationScopeProviderImpl declarationScopeProvider; private final ScriptBodyResolver scriptBodyResolver; private final AdditionalFileScopeProvider additionalFileScopeProvider; + private final LazyTopDownAnalyzer lazyTopDownAnalyzer; private final BodyResolver bodyResolver; private final ControlFlowAnalyzer controlFlowAnalyzer; private final DeclarationsChecker declarationsChecker; @@ -139,7 +139,6 @@ public class InjectorForTopDownAnalyzerForJs { this.declarationProviderFactory = declarationProviderFactory; this.resolveSession = new ResolveSession(project, globalContext, module, declarationProviderFactory, bindingTrace); this.scopeProvider = new ScopeProvider(getResolveSession()); - this.lazyTopDownAnalyzer = new LazyTopDownAnalyzer(); this.lazyTopDownAnalyzerForTopLevel = new LazyTopDownAnalyzerForTopLevel(); this.kotlinJsCheckerProvider = KotlinJsCheckerProvider.INSTANCE$; this.dynamicTypesAllowed = new DynamicTypesAllowed(); @@ -169,6 +168,7 @@ public class InjectorForTopDownAnalyzerForJs { this.declarationScopeProvider = new DeclarationScopeProviderImpl(lazyDeclarationResolver); this.scriptBodyResolver = new ScriptBodyResolver(); this.additionalFileScopeProvider = new AdditionalFileScopeProvider(); + this.lazyTopDownAnalyzer = new LazyTopDownAnalyzer(); this.bodyResolver = new BodyResolver(); this.controlFlowAnalyzer = new ControlFlowAnalyzer(); this.declarationsChecker = new DeclarationsChecker(); @@ -191,18 +191,6 @@ public class InjectorForTopDownAnalyzerForJs { scopeProvider.setAdditionalFileScopesProvider(additionalFileScopeProvider); scopeProvider.setDeclarationScopeProvider(declarationScopeProvider); - this.lazyTopDownAnalyzer.setBodyResolver(bodyResolver); - this.lazyTopDownAnalyzer.setDeclarationResolver(declarationResolver); - this.lazyTopDownAnalyzer.setDeclarationScopeProvider(declarationScopeProvider); - this.lazyTopDownAnalyzer.setFileScopeProvider(scopeProvider); - this.lazyTopDownAnalyzer.setLazyDeclarationResolver(lazyDeclarationResolver); - this.lazyTopDownAnalyzer.setModuleDescriptor(module); - this.lazyTopDownAnalyzer.setOverloadResolver(overloadResolver); - this.lazyTopDownAnalyzer.setOverrideResolver(overrideResolver); - this.lazyTopDownAnalyzer.setTopLevelDescriptorProvider(resolveSession); - this.lazyTopDownAnalyzer.setTrace(bindingTrace); - this.lazyTopDownAnalyzer.setVarianceChecker(varianceChecker); - this.lazyTopDownAnalyzerForTopLevel.setKotlinCodeAnalyzer(resolveSession); this.lazyTopDownAnalyzerForTopLevel.setLazyTopDownAnalyzer(lazyTopDownAnalyzer); @@ -272,6 +260,18 @@ public class InjectorForTopDownAnalyzerForJs { scriptBodyResolver.setExpressionTypingServices(expressionTypingServices); + lazyTopDownAnalyzer.setBodyResolver(bodyResolver); + lazyTopDownAnalyzer.setDeclarationResolver(declarationResolver); + lazyTopDownAnalyzer.setDeclarationScopeProvider(declarationScopeProvider); + lazyTopDownAnalyzer.setFileScopeProvider(scopeProvider); + lazyTopDownAnalyzer.setLazyDeclarationResolver(lazyDeclarationResolver); + lazyTopDownAnalyzer.setModuleDescriptor(module); + lazyTopDownAnalyzer.setOverloadResolver(overloadResolver); + lazyTopDownAnalyzer.setOverrideResolver(overrideResolver); + lazyTopDownAnalyzer.setTopLevelDescriptorProvider(resolveSession); + lazyTopDownAnalyzer.setTrace(bindingTrace); + lazyTopDownAnalyzer.setVarianceChecker(varianceChecker); + bodyResolver.setAnnotationResolver(annotationResolver); bodyResolver.setCallResolver(callResolver); bodyResolver.setControlFlowAnalyzer(controlFlowAnalyzer); @@ -307,10 +307,6 @@ public class InjectorForTopDownAnalyzerForJs { return this.resolveSession; } - public LazyTopDownAnalyzer getLazyTopDownAnalyzer() { - return this.lazyTopDownAnalyzer; - } - public LazyTopDownAnalyzerForTopLevel getLazyTopDownAnalyzerForTopLevel() { return this.lazyTopDownAnalyzerForTopLevel; }