Copy EnumWhenLowering from Kotlin/Native

This commit is contained in:
pyos
2019-05-07 13:53:08 +02:00
committed by Georgy Bronnikov
parent 52315106e8
commit fb194e982e
11 changed files with 117 additions and 9 deletions
@@ -61,6 +61,12 @@ private val propertiesPhase = makeIrFilePhase<CommonBackendContext>(
stickyPostconditions = setOf((PropertiesLowering)::checkNoProperties)
)
private val enumWhenPhase = makeIrFilePhase(
::EnumWhenLowering,
name = "EnumWhenLowering",
description = "Replace `when` subjects of enum types with their ordinals"
)
val jvmPhases = namedIrFilePhase<JvmBackendContext>(
name = "IrLowering",
description = "IR lowering",
@@ -88,6 +94,7 @@ val jvmPhases = namedIrFilePhase<JvmBackendContext>(
makePatchParentsPhase(1) then
enumWhenPhase then
singletonReferencesPhase then
jvmLocalDeclarationsPhase then
singleAbstractMethodPhase then