[JS IR BE] Enable unconditional validation

This commit is contained in:
Svyatoslav Kuzmich
2019-05-13 16:07:10 +03:00
parent b07690fccf
commit 28406b6bc4
@@ -66,6 +66,18 @@ private fun makeCustomJsModulePhase(
}
)
private val validateIrBeforeLowering = makeCustomJsModulePhase(
{ context, module -> validationCallback(context, module) },
name = "ValidateIrBeforeLowering",
description = "Validate IR before lowering"
)
private val validateIrAfterLowering = makeCustomJsModulePhase(
{ context, module -> validationCallback(context, module) },
name = "ValidateIrAfterLowering",
description = "Validate IR after lowering"
)
private val moveBodilessDeclarationsToSeparatePlacePhase = makeCustomJsModulePhase(
{ context, module ->
moveBodilessDeclarationsToSeparatePlace(context, module)
@@ -357,7 +369,8 @@ private val staticMembersLoweringPhase = makeJsModulePhase(
val jsPhases = namedIrModulePhase(
name = "IrModuleLowering",
description = "IR module lowering",
lower = testGenerationPhase then
lower = validateIrBeforeLowering then
testGenerationPhase then
expectDeclarationsRemovingPhase then
arrayConstructorPhase then
functionInliningPhase then
@@ -399,5 +412,6 @@ val jsPhases = namedIrModulePhase(
primitiveCompanionLoweringPhase then
constLoweringPhase then
callsLoweringPhase then
staticMembersLoweringPhase
staticMembersLoweringPhase then
validateIrAfterLowering
)