[JS IR] Enable IR dump for IC invalidation tests
Support 'fd.kotlin.js.debugMode' property in IC invalidation tests.
This commit is contained in:
committed by
Space Team
parent
c58314fddf
commit
1ec88ff560
@@ -682,6 +682,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
mainModule,
|
||||
cfg,
|
||||
arguments.granularity,
|
||||
PhaseConfig(jsPhases),
|
||||
es6mode = arguments.useEsClasses
|
||||
)
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class JsIrCompilerWithIC(
|
||||
private val mainModule: IrModuleFragment,
|
||||
configuration: CompilerConfiguration,
|
||||
granularity: JsGenerationGranularity,
|
||||
private val phaseConfig: PhaseConfig,
|
||||
exportedDeclarations: Set<FqName> = emptySet(),
|
||||
es6mode: Boolean = false
|
||||
) : JsIrCompilerICInterface {
|
||||
@@ -64,7 +65,7 @@ class JsIrCompilerWithIC(
|
||||
|
||||
generateJsTests(context, mainModule)
|
||||
|
||||
lowerPreservingTags(allModules, context, PhaseConfig(jsPhases), context.irFactory.stageController as WholeWorldStageController)
|
||||
lowerPreservingTags(allModules, context, phaseConfig, context.irFactory.stageController as WholeWorldStageController)
|
||||
|
||||
val transformer = IrModuleToJsTransformer(context, mainArguments)
|
||||
return transformer.makeIrFragmentsGenerators(dirtyFiles, allModules)
|
||||
@@ -72,7 +73,10 @@ class JsIrCompilerWithIC(
|
||||
}
|
||||
|
||||
fun lowerPreservingTags(
|
||||
modules: Iterable<IrModuleFragment>, context: JsIrBackendContext, phaseConfig: PhaseConfig, controller: WholeWorldStageController
|
||||
modules: Iterable<IrModuleFragment>,
|
||||
context: JsIrBackendContext,
|
||||
phaseConfig: PhaseConfig,
|
||||
controller: WholeWorldStageController
|
||||
) {
|
||||
// Lower all the things
|
||||
controller.currentStage = 0
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.backend.js.ic
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.phaser.PhaseConfig
|
||||
import org.jetbrains.kotlin.backend.common.serialization.cityHash64
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.ir.backend.js.*
|
||||
@@ -758,6 +759,7 @@ fun rebuildCacheForDirtyFiles(
|
||||
currentIrModule,
|
||||
configuration,
|
||||
JsGenerationGranularity.PER_MODULE,
|
||||
PhaseConfig(jsPhases),
|
||||
exportedDeclarations,
|
||||
es6mode
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user