[K/Wasm] Add enum entries comparison optimization
This commit is contained in:
@@ -363,7 +363,7 @@ private val forLoopsLoweringPhase = makeIrModulePhase(
|
|||||||
private val enumWhenPhase = makeIrModulePhase(
|
private val enumWhenPhase = makeIrModulePhase(
|
||||||
::EnumWhenLowering,
|
::EnumWhenLowering,
|
||||||
name = "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(
|
private val propertyLazyInitLoweringPhase = makeIrModulePhase(
|
||||||
|
|||||||
@@ -202,6 +202,12 @@ private val jsInteropFunctionCallsLowering = makeIrModulePhase(
|
|||||||
description = "Replace calls to delegates",
|
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(
|
private val enumClassConstructorLoweringPhase = makeIrModulePhase(
|
||||||
::EnumClassConstructorLowering,
|
::EnumClassConstructorLowering,
|
||||||
name = "EnumClassConstructorLowering",
|
name = "EnumClassConstructorLowering",
|
||||||
@@ -646,6 +652,7 @@ val loweringList = listOf(
|
|||||||
|
|
||||||
tailrecLoweringPhase,
|
tailrecLoweringPhase,
|
||||||
|
|
||||||
|
enumWhenPhase,
|
||||||
enumClassConstructorLoweringPhase,
|
enumClassConstructorLoweringPhase,
|
||||||
enumClassConstructorBodyLoweringPhase,
|
enumClassConstructorBodyLoweringPhase,
|
||||||
enumEntryInstancesLoweringPhase,
|
enumEntryInstancesLoweringPhase,
|
||||||
|
|||||||
Reference in New Issue
Block a user