Simplify LocalDeclarationsLowering, support declaration pop up via separate lower
1. Scheme of capturing local variables not touched 2. Lowered local functions are transposed to the nearest class (including local) or file 3. Local classes are also transpose to the nearest class (including local) or file
This commit is contained in:
@@ -179,6 +179,13 @@ private val localDeclarationsLoweringPhase = makeJsModulePhase(
|
||||
prerequisite = setOf(sharedVariablesLoweringPhase, localDelegatedPropertiesLoweringPhase)
|
||||
)
|
||||
|
||||
private val localClassExtractionPhase = makeJsModulePhase(
|
||||
::LocalClassPopupLowering,
|
||||
name = "LocalClassExtractionPhase",
|
||||
description = "Move local declarations into nearest declaration container",
|
||||
prerequisite = setOf(localDeclarationsLoweringPhase)
|
||||
)
|
||||
|
||||
private val innerClassesLoweringPhase = makeJsModulePhase(
|
||||
::InnerClassesLowering,
|
||||
name = "InnerClassesLowering",
|
||||
@@ -372,6 +379,7 @@ val jsPhases = namedIrModulePhase(
|
||||
sharedVariablesLoweringPhase then
|
||||
localDelegatedPropertiesLoweringPhase then
|
||||
localDeclarationsLoweringPhase then
|
||||
localClassExtractionPhase then
|
||||
innerClassesLoweringPhase then
|
||||
innerClassConstructorCallsLoweringPhase then
|
||||
propertiesLoweringPhase then
|
||||
|
||||
Reference in New Issue
Block a user