Added IfNullExpressionsFusionLowering in pipeline

This commit is contained in:
Elena Lepilkina
2020-05-21 17:32:32 +04:00
committed by LepilkinaElena
parent 8fe80afaf7
commit ebc7449f5f
2 changed files with 7 additions and 0 deletions
@@ -341,4 +341,10 @@ internal val returnsInsertionPhase = makeKonanFileLoweringPhase(
name = "ReturnsInsertion",
description = "Returns insertion for Unit functions",
prerequisite = setOf(autoboxPhase, coroutinesPhase, enumClassPhase)
)
internal val ifNullExpressionsFusionPhase = makeKonanFileLoweringPhase(
::IfNullExpressionsFusionLowering,
name = "IfNullExpressionsFusionLowering",
description = "Simplify '?.' and '?:' operator chains"
)
@@ -347,6 +347,7 @@ internal val allLoweringsPhase = namedIrModulePhase(
innerClassPhase then
dataClassesPhase then
singleAbstractMethodPhase then
ifNullExpressionsFusionPhase then
builtinOperatorPhase then
finallyBlocksPhase then
testProcessorPhase then