Reordered compiler phases
Moved finally blocks, data classes and for loops lowerings down along the pipeline
This commit is contained in:
+11
-11
@@ -74,12 +74,6 @@ internal class KonanLower(val context: Context, val parentPhaser: PhaseManager)
|
|||||||
phaser.phase(KonanPhase.LOWER_STRING_CONCAT) {
|
phaser.phase(KonanPhase.LOWER_STRING_CONCAT) {
|
||||||
StringConcatenationLowering(context).lower(irFile)
|
StringConcatenationLowering(context).lower(irFile)
|
||||||
}
|
}
|
||||||
phaser.phase(KonanPhase.LOWER_DATA_CLASSES) {
|
|
||||||
DataClassOperatorsLowering(context).runOnFilePostfix(irFile)
|
|
||||||
}
|
|
||||||
phaser.phase(KonanPhase.LOWER_FOR_LOOPS) {
|
|
||||||
ForLoopsLowering(context).lower(irFile)
|
|
||||||
}
|
|
||||||
phaser.phase(KonanPhase.LOWER_ENUM_CONSTRUCTORS) {
|
phaser.phase(KonanPhase.LOWER_ENUM_CONSTRUCTORS) {
|
||||||
EnumConstructorsLowering(context).run(irFile)
|
EnumConstructorsLowering(context).run(irFile)
|
||||||
}
|
}
|
||||||
@@ -96,18 +90,24 @@ internal class KonanLower(val context: Context, val parentPhaser: PhaseManager)
|
|||||||
phaser.phase(KonanPhase.LOWER_TAILREC) {
|
phaser.phase(KonanPhase.LOWER_TAILREC) {
|
||||||
TailrecLowering(context).runOnFilePostfix(irFile)
|
TailrecLowering(context).runOnFilePostfix(irFile)
|
||||||
}
|
}
|
||||||
phaser.phase(KonanPhase.LOWER_FINALLY) {
|
|
||||||
FinallyBlocksLowering(context).lower(irFile)
|
|
||||||
}
|
|
||||||
phaser.phase(KonanPhase.LOWER_DEFAULT_PARAMETER_EXTENT) {
|
phaser.phase(KonanPhase.LOWER_DEFAULT_PARAMETER_EXTENT) {
|
||||||
DefaultArgumentStubGenerator(context, skipInlineMethods = false).runOnFilePostfix(irFile)
|
DefaultArgumentStubGenerator(context, skipInlineMethods = false).runOnFilePostfix(irFile)
|
||||||
KonanDefaultParameterInjector(context).lower(irFile)
|
KonanDefaultParameterInjector(context).lower(irFile)
|
||||||
}
|
}
|
||||||
|
phaser.phase(KonanPhase.LOWER_INNER_CLASSES) {
|
||||||
|
InnerClassLowering(context).runOnFilePostfix(irFile)
|
||||||
|
}
|
||||||
|
phaser.phase(KonanPhase.LOWER_FOR_LOOPS) {
|
||||||
|
ForLoopsLowering(context).lower(irFile)
|
||||||
|
}
|
||||||
|
phaser.phase(KonanPhase.LOWER_DATA_CLASSES) {
|
||||||
|
DataClassOperatorsLowering(context).runOnFilePostfix(irFile)
|
||||||
|
}
|
||||||
phaser.phase(KonanPhase.LOWER_BUILTIN_OPERATORS) {
|
phaser.phase(KonanPhase.LOWER_BUILTIN_OPERATORS) {
|
||||||
BuiltinOperatorLowering(context).lower(irFile)
|
BuiltinOperatorLowering(context).lower(irFile)
|
||||||
}
|
}
|
||||||
phaser.phase(KonanPhase.LOWER_INNER_CLASSES) {
|
phaser.phase(KonanPhase.LOWER_FINALLY) {
|
||||||
InnerClassLowering(context).runOnFilePostfix(irFile)
|
FinallyBlocksLowering(context).lower(irFile)
|
||||||
}
|
}
|
||||||
phaser.phase(KonanPhase.TEST_PROCESSOR) {
|
phaser.phase(KonanPhase.TEST_PROCESSOR) {
|
||||||
TestProcessor(context).process(irFile)
|
TestProcessor(context).process(irFile)
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ enum class KonanPhase(val description: String,
|
|||||||
/* ... ... */ LOWER_COMPILE_TIME_EVAL("Compile time evaluation lowering", LOWER_VARARG, enabled = false),
|
/* ... ... */ LOWER_COMPILE_TIME_EVAL("Compile time evaluation lowering", LOWER_VARARG, enabled = false),
|
||||||
/* ... ... */ LOWER_INNER_CLASSES("Inner classes lowering", LOWER_DEFAULT_PARAMETER_EXTENT, GEN_SYNTHETIC_FIELDS),
|
/* ... ... */ LOWER_INNER_CLASSES("Inner classes lowering", LOWER_DEFAULT_PARAMETER_EXTENT, GEN_SYNTHETIC_FIELDS),
|
||||||
/* ... ... */ LOWER_BUILTIN_OPERATORS("BuiltIn Operators Lowering", LOWER_DEFAULT_PARAMETER_EXTENT),
|
/* ... ... */ LOWER_BUILTIN_OPERATORS("BuiltIn Operators Lowering", LOWER_DEFAULT_PARAMETER_EXTENT),
|
||||||
/* ... ... */ LOWER_COROUTINES("Coroutines lowering", LOWER_LOCAL_FUNCTIONS),
|
/* ... ... */ LOWER_COROUTINES("Coroutines lowering", LOWER_LOCAL_FUNCTIONS, LOWER_FINALLY),
|
||||||
/* ... ... */ LOWER_TYPE_OPERATORS("Type operators lowering", LOWER_COROUTINES),
|
/* ... ... */ LOWER_TYPE_OPERATORS("Type operators lowering", LOWER_COROUTINES),
|
||||||
/* ... ... */ BRIDGES_BUILDING("Bridges building", LOWER_COROUTINES),
|
/* ... ... */ BRIDGES_BUILDING("Bridges building", LOWER_COROUTINES),
|
||||||
/* ... ... */ LOWER_STRING_CONCAT("String concatenation lowering"),
|
/* ... ... */ LOWER_STRING_CONCAT("String concatenation lowering"),
|
||||||
|
|||||||
Reference in New Issue
Block a user