[K/JS] Rework main function call to support it in per-file

This commit is contained in:
Artem Kobzar
2023-10-04 12:13:20 +00:00
committed by Space Team
parent faae5f9b38
commit eef57f216c
57 changed files with 1091 additions and 172 deletions
@@ -605,14 +605,15 @@ class GenerateIrRuntime {
symbolTable,
additionalExportedDeclarationNames = emptySet(),
keep = emptySet(),
configuration
configuration,
null
)
ExternalDependenciesGenerator(symbolTable, listOf(jsLinker)).generateUnboundSymbolsAsDependencies()
jsPhases.invokeToplevel(phaseConfig, context, listOf(module))
val transformer = IrModuleToJsTransformer(context, null)
val transformer = IrModuleToJsTransformer(context, shouldReferMainFunction = false)
return transformer.generateModule(listOf(module), setOf(TranslationMode.PER_MODULE_DEV), false)
}