Make InitializersLowering a BodyLoweringPass and add a InitializersCleanupLowering
This commit is contained in:
committed by
Anton Bannykh
parent
600caaa636
commit
6e96e271ae
@@ -208,6 +208,13 @@ private val initializersLoweringPhase = makeWasmModulePhase(
|
||||
prerequisite = setOf(primaryConstructorLoweringPhase)
|
||||
)
|
||||
|
||||
private val initializersCleanupLoweringPhase = makeWasmModulePhase(
|
||||
::InitializersCleanupLowering,
|
||||
name = "InitializersCleanupLowering",
|
||||
description = "Remove non-static anonymous initializers and field init expressions",
|
||||
prerequisite = setOf(initializersLoweringPhase)
|
||||
)
|
||||
|
||||
private val excludeDeclarationsFromCodegenPhase = makeCustomWasmModulePhase(
|
||||
{ context, module ->
|
||||
excludeDeclarationsFromCodegen(context, module)
|
||||
@@ -336,6 +343,7 @@ val wasmPhases = namedIrModulePhase<WasmBackendContext>(
|
||||
propertiesLoweringPhase then
|
||||
primaryConstructorLoweringPhase then
|
||||
initializersLoweringPhase then
|
||||
initializersCleanupLoweringPhase then
|
||||
// Common prefix ends
|
||||
|
||||
builtInsLoweringPhase then
|
||||
|
||||
Reference in New Issue
Block a user