[JS IR BE] Support main function

* Implement IR-based main function detector
This commit is contained in:
Roman Artemev
2019-04-18 11:07:04 +03:00
committed by romanart
parent 6729603ac7
commit 5bd3bcd237
11 changed files with 131 additions and 11 deletions
@@ -96,7 +96,8 @@ abstract class BasicIrBoxTest(
configuration = config.configuration,
phaseConfig = config.configuration.get(CLIConfigurationKeys.PHASE_CONFIG) ?: PhaseConfig(jsPhases),
immediateDependencies = dependencies,
allDependencies = allDependencies
allDependencies = allDependencies,
mainArguments = mainCallParameters.run { if (shouldBeGenerated()) arguments() else null }
)
val wrappedCode = wrapWithModuleEmulationMarkers(jsCode, moduleId = config.moduleId, moduleKind = config.moduleKind)