[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"
)
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(
::BridgesConstruction,
name = "BridgesConstruction",
@@ -534,7 +547,7 @@ private val typeOperatorLoweringPhase = makeBodyLoweringPhase(
prerequisite = setOf(
bridgesConstructionPhase,
removeInlineFunctionsWithReifiedTypeParametersLoweringPhase,
singleAbstractMethodPhase
singleAbstractMethodPhase, errorExpressionLoweringPhase
)
)
@@ -707,6 +720,8 @@ val loweringList = listOf<Lowering>(
es6ConstructorLowering,
varargLoweringPhase,
multipleCatchesLoweringPhase,
errorExpressionLoweringPhase,
errorDeclarationLoweringPhase,
bridgesConstructionPhase,
typeOperatorLoweringPhase,
secondaryConstructorLoweringPhase,