[K/Wasm] Add enum entries comparison optimization

This commit is contained in:
Artem Kobzar
2024-02-21 13:30:12 +00:00
committed by Space Team
parent 7416d7271a
commit 79cce48aa9
2 changed files with 8 additions and 1 deletions
@@ -363,7 +363,7 @@ private val forLoopsLoweringPhase = makeIrModulePhase(
private val enumWhenPhase = makeIrModulePhase(
::EnumWhenLowering,
name = "EnumWhenLowering",
description = "Replace `when` subjects of enum types with their ordinals"
description = "[Optimization] Replace `when` subjects of enum types with their ordinals"
)
private val propertyLazyInitLoweringPhase = makeIrModulePhase(
@@ -202,6 +202,12 @@ private val jsInteropFunctionCallsLowering = makeIrModulePhase(
description = "Replace calls to delegates",
)
private val enumWhenPhase = makeIrModulePhase(
::EnumWhenLowering,
name = "EnumWhenLowering",
description = "[Optimization] Replace `when` subjects of enum types with their ordinals"
)
private val enumClassConstructorLoweringPhase = makeIrModulePhase(
::EnumClassConstructorLowering,
name = "EnumClassConstructorLowering",
@@ -646,6 +652,7 @@ val loweringList = listOf(
tailrecLoweringPhase,
enumWhenPhase,
enumClassConstructorLoweringPhase,
enumClassConstructorBodyLoweringPhase,
enumEntryInstancesLoweringPhase,