Introduce ModuleContext, ProjectContext and use it some of the APIs
This commit is contained in:
+1
-3
@@ -320,11 +320,9 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
ModuleDescriptorImpl analyzeModule = TopDownAnalyzerFacadeForJVM.createSealedJavaModule();
|
||||
|
||||
return TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(
|
||||
environment.getProject(),
|
||||
ContextPackage.GlobalContext(),
|
||||
ContextPackage.ModuleContext(analyzeModule, environment.getProject()),
|
||||
environment.getSourceFiles(),
|
||||
sharedTrace,
|
||||
analyzeModule,
|
||||
environment.getConfiguration().get(JVMConfigurationKeys.MODULE_IDS),
|
||||
environment.getConfiguration().get(JVMConfigurationKeys.INCREMENTAL_CACHE_PROVIDER)
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.jetbrains.kotlin.codegen.KotlinCodegenFacade;
|
||||
import org.jetbrains.kotlin.codegen.state.GenerationState;
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration;
|
||||
import org.jetbrains.kotlin.context.ContextPackage;
|
||||
import org.jetbrains.kotlin.context.GlobalContextImpl;
|
||||
import org.jetbrains.kotlin.context.ModuleContext;
|
||||
import org.jetbrains.kotlin.descriptors.ScriptDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.impl.CompositePackageFragmentProvider;
|
||||
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl;
|
||||
@@ -110,7 +110,7 @@ public class ReplInterpreter {
|
||||
this.trace = new CliLightClassGenerationSupport.NoScopeRecordCliBindingTrace();
|
||||
this.module = TopDownAnalyzerFacadeForJVM.createJavaModule("<repl>");
|
||||
|
||||
GlobalContextImpl context = ContextPackage.GlobalContext();
|
||||
ModuleContext context = ContextPackage.ModuleContext(module, project);
|
||||
|
||||
scriptDeclarationFactory = new ScriptMutableDeclarationProviderFactory();
|
||||
|
||||
@@ -123,10 +123,8 @@ public class ReplInterpreter {
|
||||
};
|
||||
|
||||
InjectorForReplWithJava injector = new InjectorForReplWithJava(
|
||||
project,
|
||||
context,
|
||||
trace,
|
||||
module,
|
||||
scriptDeclarationFactory,
|
||||
ProjectScope.getAllScope(project),
|
||||
scopeProvider
|
||||
|
||||
Reference in New Issue
Block a user