[JS IR] use correct factory for new IR2JS
This commit is contained in:
@@ -381,10 +381,16 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
|||||||
else -> JsGenerationGranularity.WHOLE_PROGRAM
|
else -> JsGenerationGranularity.WHOLE_PROGRAM
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
val irFactory = when {
|
||||||
|
arguments.irDceDriven -> PersistentIrFactory()
|
||||||
|
arguments.irNewIr2Js -> IrFactoryImplForJsIC(WholeWorldStageController())
|
||||||
|
else -> IrFactoryImpl
|
||||||
|
}
|
||||||
|
|
||||||
val ir = compile(
|
val ir = compile(
|
||||||
module,
|
module,
|
||||||
phaseConfig,
|
phaseConfig,
|
||||||
if (arguments.irDceDriven) PersistentIrFactory() else IrFactoryImpl,
|
irFactory,
|
||||||
dceRuntimeDiagnostic = RuntimeDiagnostic.resolve(
|
dceRuntimeDiagnostic = RuntimeDiagnostic.resolve(
|
||||||
arguments.irDceRuntimeDiagnostic,
|
arguments.irDceRuntimeDiagnostic,
|
||||||
messageCollector
|
messageCollector
|
||||||
|
|||||||
Reference in New Issue
Block a user