[JS IR] Fix phases

- update phase description
 - remove unused phases
This commit is contained in:
Roman Artemev
2020-02-26 17:04:56 +03:00
committed by romanart
parent cf41172521
commit 97b97ddbd7
@@ -132,12 +132,6 @@ val createScriptFunctionsPhase = makeJsModulePhase(
description = "Create functions for initialize and evaluate script" description = "Create functions for initialize and evaluate script"
).toModuleLowering() ).toModuleLowering()
private val moveBodilessDeclarationsToSeparatePlacePhase = makeDeclarationTransformerPhase(
::MoveBodilessDeclarationsToSeparatePlaceLowering,
name = "MoveBodilessDeclarationsToSeparatePlaceLowering",
description = "Move bodiless declarations to a separate place"
)
private val expectDeclarationsRemovingPhase = makeDeclarationTransformerPhase( private val expectDeclarationsRemovingPhase = makeDeclarationTransformerPhase(
::ExpectDeclarationsRemoveLowering, ::ExpectDeclarationsRemoveLowering,
name = "ExpectDeclarationsRemoving", name = "ExpectDeclarationsRemoving",
@@ -168,13 +162,6 @@ private val stripTypeAliasDeclarationsPhase = makeDeclarationTransformerPhase(
description = "Strip typealias declarations" description = "Strip typealias declarations"
) )
// TODO make all lambda-related stuff work with IrFunctionExpression and drop this phase
private val provisionalFunctionExpressionPhase = makeBodyLoweringPhase(
{ ProvisionalFunctionExpressionLowering() },
name = "FunctionExpression",
description = "Transform IrFunctionExpression to a local function reference"
)
private val arrayConstructorPhase = makeBodyLoweringPhase( private val arrayConstructorPhase = makeBodyLoweringPhase(
::ArrayConstructorLowering, ::ArrayConstructorLowering,
name = "ArrayConstructor", name = "ArrayConstructor",
@@ -282,10 +269,10 @@ private val sharedVariablesLoweringPhase = makeBodyLoweringPhase(
description = "Box captured mutable variables" description = "Box captured mutable variables"
) )
private val callableReferenceLoweringX = makeBodyLoweringPhase( private val callableReferenceLowering = makeBodyLoweringPhase(
::CallableReferenceLowering, ::CallableReferenceLowering,
name = "CallableReferenceLoweringXX", name = "CallableReferenceLowering",
description = "Build a callable reference class and capture arguments" description = "Build a lambda/callable reference class"
) )
private val returnableBlockLoweringPhase = makeBodyLoweringPhase( private val returnableBlockLoweringPhase = makeBodyLoweringPhase(
@@ -373,13 +360,13 @@ private val privateMemberUsagesLoweringPhase = makeBodyLoweringPhase(
private val interopCallableReferenceLoweringPhase = makeBodyLoweringPhase( private val interopCallableReferenceLoweringPhase = makeBodyLoweringPhase(
::InteropCallableReferenceLowering, ::InteropCallableReferenceLowering,
name = "CallableReferenceLowering", name = "InteropCallableReferenceLowering",
description = "Handle callable references", description = "Interop layer for function references and lambdas",
prerequisite = setOf( prerequisite = setOf(
suspendFunctionsLoweringPhase, suspendFunctionsLoweringPhase,
localDeclarationsLoweringPhase, localDeclarationsLoweringPhase,
localDelegatedPropertiesLoweringPhase, localDelegatedPropertiesLoweringPhase,
callableReferenceLoweringX callableReferenceLowering
) )
) )
@@ -595,7 +582,7 @@ val loweringList = listOf<Lowering>(
functionInliningPhase, functionInliningPhase,
copyInlineFunctionBodyLoweringPhase, copyInlineFunctionBodyLoweringPhase,
createScriptFunctionsPhase, createScriptFunctionsPhase,
callableReferenceLoweringX, callableReferenceLowering,
singleAbstractMethodPhase, singleAbstractMethodPhase,
lateinitNullableFieldsPhase, lateinitNullableFieldsPhase,
lateinitDeclarationLoweringPhase, lateinitDeclarationLoweringPhase,