[JS IR] Enable IrError element's lowerings in JS

This commit is contained in:
Roman Artemev
2020-09-01 12:19:02 +03:00
parent 4dca3715fa
commit 7a6415dc53
@@ -514,6 +514,19 @@ private val multipleCatchesLoweringPhase = makeBodyLoweringPhase(
description = "Replace multiple catches with single one" description = "Replace multiple catches with single one"
) )
private val errorExpressionLoweringPhase = makeBodyLoweringPhase(
::JsErrorExpressionLowering,
name = "errorExpressionLoweringPhase",
description = "Transform error expressions into simple ir code",
prerequisite = setOf(multipleCatchesLoweringPhase)
)
private val errorDeclarationLoweringPhase = makeDeclarationTransformerPhase(
::JsErrorDeclarationLowering,
name = "errorDeclarationLoweringPhase",
description = "Transform error declarations into simple ir code"
)
private val bridgesConstructionPhase = makeDeclarationTransformerPhase( private val bridgesConstructionPhase = makeDeclarationTransformerPhase(
::BridgesConstruction, ::BridgesConstruction,
name = "BridgesConstruction", name = "BridgesConstruction",
@@ -534,7 +547,7 @@ private val typeOperatorLoweringPhase = makeBodyLoweringPhase(
prerequisite = setOf( prerequisite = setOf(
bridgesConstructionPhase, bridgesConstructionPhase,
removeInlineFunctionsWithReifiedTypeParametersLoweringPhase, removeInlineFunctionsWithReifiedTypeParametersLoweringPhase,
singleAbstractMethodPhase singleAbstractMethodPhase, errorExpressionLoweringPhase
) )
) )
@@ -707,6 +720,8 @@ val loweringList = listOf<Lowering>(
es6ConstructorLowering, es6ConstructorLowering,
varargLoweringPhase, varargLoweringPhase,
multipleCatchesLoweringPhase, multipleCatchesLoweringPhase,
errorExpressionLoweringPhase,
errorDeclarationLoweringPhase,
bridgesConstructionPhase, bridgesConstructionPhase,
typeOperatorLoweringPhase, typeOperatorLoweringPhase,
secondaryConstructorLoweringPhase, secondaryConstructorLoweringPhase,