[K/Wasm] Add enum entries comparison optimization
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user