[JS IR] support per-module in the new Ir2JS

This commit is contained in:
Anton Bannykh
2021-10-25 13:20:39 +03:00
committed by TeamCityServer
parent 1f55dc73d2
commit 0506d422a3
8 changed files with 463 additions and 246 deletions
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.ir.backend.js.codegen.JsGenerationOptions
import org.jetbrains.kotlin.ir.backend.js.codegen.generateEsModules
import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc
import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrModuleToJsTransformer
import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrModuleToJsTransformerTmp
import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl
import org.jetbrains.kotlin.ir.util.IrMessageLogger
import org.jetbrains.kotlin.ir.util.SymbolTable
@@ -136,7 +137,7 @@ class JsIrBackendFacade(
val outputFile = File(JsEnvironmentConfigurator.getJsModuleArtifactPath(testServices, module.name) + ".js")
val dceOutputFile = File(JsEnvironmentConfigurator.getDceJsArtifactPath(testServices, module.name) + ".js")
if (!esModules) {
val transformer = IrModuleToJsTransformer(
val transformer = IrModuleToJsTransformerTmp(
loweredIr.context,
mainArguments,
fullJs = true,