diff --git a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java index 78219f4727d..5c5b1f1d7bc 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.java @@ -42,6 +42,7 @@ import org.jetbrains.jet.codegen.*; import org.jetbrains.jet.codegen.state.GenerationState; import org.jetbrains.jet.codegen.state.Progress; import org.jetbrains.jet.config.CompilerConfiguration; +import org.jetbrains.jet.context.ContextPackage; import org.jetbrains.jet.lang.descriptors.impl.ModuleDescriptorImpl; import org.jetbrains.jet.lang.parsing.JetScriptDefinition; import org.jetbrains.jet.lang.parsing.JetScriptDefinitionProvider; @@ -62,7 +63,9 @@ import org.jetbrains.jet.utils.KotlinPaths; import java.io.File; import java.net.URL; import java.net.URLClassLoader; -import java.util.*; +import java.util.Collection; +import java.util.List; +import java.util.Map; public class KotlinToJVMBytecodeCompiler { @@ -294,8 +297,9 @@ public class KotlinToJVMBytecodeCompiler { BindingTrace sharedTrace = new CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace(); ModuleDescriptorImpl analyzeModule = TopDownAnalyzerFacadeForJVM.createSealedJavaModule(); - return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( + return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext( environment.getProject(), + ContextPackage.GlobalContext(), environment.getSourceFiles(), sharedTrace, Predicates.alwaysTrue(), diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/TopDownAnalyzerFacadeForJVM.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/TopDownAnalyzerFacadeForJVM.java index 1fea4ae71e0..3e73acb2c9e 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/TopDownAnalyzerFacadeForJVM.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/TopDownAnalyzerFacadeForJVM.java @@ -62,7 +62,7 @@ public enum TopDownAnalyzerFacadeForJVM { } @NotNull - public static AnalysisResult analyzeFilesWithJavaIntegration( + public static AnalysisResult analyzeFilesWithJavaIntegrationNoIncremental( @NotNull Project project, @NotNull Collection files, @NotNull BindingTrace trace, @@ -72,22 +72,6 @@ public enum TopDownAnalyzerFacadeForJVM { return analyzeFilesWithJavaIntegration(project, files, trace, topDownAnalysisParameters, module, null, null); } - @NotNull - public static AnalysisResult analyzeFilesWithJavaIntegration( - @NotNull Project project, - @NotNull Collection files, - @NotNull BindingTrace trace, - @NotNull Predicate filesToAnalyzeCompletely, - @NotNull ModuleDescriptorImpl module, - @Nullable List moduleIds, - @Nullable IncrementalCacheProvider incrementalCacheProvider - ) { - return analyzeFilesWithJavaIntegrationWithCustomContext( - project, ContextPackage.GlobalContext(), files, trace, - filesToAnalyzeCompletely, module, moduleIds, - incrementalCacheProvider); - } - @NotNull public static AnalysisResult analyzeFilesWithJavaIntegrationWithCustomContext( @NotNull Project project, diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java index a856ae821bf..365921555be 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/AbstractLoadJavaTest.java @@ -156,7 +156,7 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir { false ); - TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( + TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationNoIncremental( environment.getProject(), environment.getSourceFiles(), trace, diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/JvmResolveUtil.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/JvmResolveUtil.java index 50a4de3946f..37d77db6961 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/JvmResolveUtil.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/JvmResolveUtil.java @@ -23,11 +23,11 @@ import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.analyzer.AnalysisResult; import org.jetbrains.jet.cli.jvm.compiler.CliLightClassGenerationSupport; +import org.jetbrains.jet.context.ContextPackage; import org.jetbrains.jet.lang.descriptors.impl.ModuleDescriptorImpl; import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.resolve.AnalyzingUtils; import org.jetbrains.jet.lang.resolve.BindingTrace; -import org.jetbrains.jet.lang.resolve.BindingTraceContext; import org.jetbrains.jet.lang.resolve.java.TopDownAnalyzerFacadeForJVM; import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns; @@ -82,7 +82,7 @@ public class JvmResolveUtil { BindingTrace trace = new CliLightClassGenerationSupport.CliBindingTrace(); - return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( - project, files, trace, filesToAnalyzeCompletely, module, null, null); + return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext( + project, ContextPackage.GlobalContext(), files, trace, filesToAnalyzeCompletely, module, null, null); } } diff --git a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveTestUtil.java b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveTestUtil.java index 4f21301f866..318d5176de5 100644 --- a/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveTestUtil.java +++ b/compiler/tests/org/jetbrains/jet/lang/resolve/lazy/LazyResolveTestUtil.java @@ -56,7 +56,7 @@ public class LazyResolveTestUtil { BindingTrace trace = new CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace(); ModuleDescriptorImpl sharedModule = TopDownAnalyzerFacadeForJVM.createSealedJavaModule(); - TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( + TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationNoIncremental( environment.getProject(), files, trace, diff --git a/idea/tests/org/jetbrains/jet/plugin/decompiler/textBuilder/DecompiledTextConsistencyTest.kt b/idea/tests/org/jetbrains/jet/plugin/decompiler/textBuilder/DecompiledTextConsistencyTest.kt index 3b5b932fd85..6cdc1a1921e 100644 --- a/idea/tests/org/jetbrains/jet/plugin/decompiler/textBuilder/DecompiledTextConsistencyTest.kt +++ b/idea/tests/org/jetbrains/jet/plugin/decompiler/textBuilder/DecompiledTextConsistencyTest.kt @@ -34,6 +34,7 @@ import org.jetbrains.jet.lang.resolve.BindingTraceContext import org.jetbrains.jet.lang.resolve.name.ClassId import org.jetbrains.jet.lang.resolve.MemberComparator import org.jetbrains.jet.lang.resolve.descriptorUtil.module +import org.jetbrains.jet.context.GlobalContext public class DecompiledTextConsistencyTest : JetLightCodeInsightFixtureTestCase() { @@ -63,8 +64,8 @@ class ProjectBasedResolverForDecompiler(project: Project) : ResolverForDecompile module.addDependencyOnModule(module) module.addDependencyOnModule(KotlinBuiltIns.getInstance().getBuiltInsModule()) module.seal() - TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration( - project, listOf(), BindingTraceContext(), { false }, + TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext( + project, GlobalContext(), listOf(), BindingTraceContext(), { false }, module, null, null ).moduleDescriptor }