IR: use IrFactory in SymbolTable

This commit is contained in:
Alexander Udalov
2020-07-13 17:48:07 +02:00
parent c6a127e87e
commit db4cbe7103
23 changed files with 92 additions and 62 deletions
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrModuleToJsTransf
import org.jetbrains.kotlin.ir.backend.js.utils.NameTables
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
import org.jetbrains.kotlin.ir.declarations.StageController
import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl
import org.jetbrains.kotlin.ir.declarations.stageController
import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator
import org.jetbrains.kotlin.ir.util.noUnboundLeft
@@ -52,7 +53,7 @@ fun compile(
stageController = StageController()
val (moduleFragment: IrModuleFragment, dependencyModules, irBuiltIns, symbolTable, deserializer) =
loadIr(project, mainModule, analyzer, configuration, allDependencies, friendDependencies)
loadIr(project, mainModule, analyzer, configuration, allDependencies, friendDependencies, IrFactoryImpl)
val moduleDescriptor = moduleFragment.descriptor
@@ -17,7 +17,7 @@ import org.jetbrains.kotlin.ir.declarations.IrValueParameter
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.name.Name
// This is a temporary class for migration to IrDeclarationFactory. Usages should be refactored to use the factory directly once possible,
// This is a temporary class for migration to IrFactory. Usages should be refactored to use the factory directly once possible,
// since it doesn't add sufficient value on its own.
class JsIrDeclarationBuilder {
fun buildValueParameter(parent: IrDeclarationParent, name: String, index: Int, type: IrType): IrValueParameter =