IR: move frontend-dependent code into implementations in psi2ir

This commit is contained in:
Alexander Udalov
2021-02-21 15:41:48 +01:00
parent d991a3e40f
commit addabae8d2
22 changed files with 167 additions and 73 deletions
@@ -55,6 +55,7 @@ import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStat
import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.kotlin.psi2ir.Psi2IrConfiguration
import org.jetbrains.kotlin.psi2ir.Psi2IrTranslator
import org.jetbrains.kotlin.psi2ir.generators.TypeTranslatorImpl
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.CompilerEnvironment
import org.jetbrains.kotlin.resolve.multiplatform.isCommonSource
@@ -513,7 +514,7 @@ class GenerateIrRuntime {
val mangler = JsManglerDesc
val signaturer = IdSignatureDescriptor(mangler)
val symbolTable = SymbolTable(signaturer, PersistentIrFactory())
val typeTranslator = TypeTranslator(symbolTable, languageVersionSettings, moduleDescriptor)
val typeTranslator = TypeTranslatorImpl(symbolTable, languageVersionSettings, moduleDescriptor)
val irBuiltIns = IrBuiltIns(moduleDescriptor.builtIns, typeTranslator, symbolTable)
val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable)
@@ -540,7 +541,7 @@ class GenerateIrRuntime {
val mangler = JsManglerDesc
val signaturer = IdSignatureDescriptor(mangler)
val symbolTable = SymbolTable(signaturer, PersistentIrFactory())
val typeTranslator = TypeTranslator(symbolTable, languageVersionSettings, moduleDescriptor)
val typeTranslator = TypeTranslatorImpl(symbolTable, languageVersionSettings, moduleDescriptor)
val irBuiltIns = IrBuiltIns(moduleDescriptor.builtIns, typeTranslator, symbolTable)
val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable)