From 8ef0fdf021ac12c6a3a9a63e277d59d2581605be Mon Sep 17 00:00:00 2001 From: pyos Date: Wed, 7 Oct 2020 09:28:34 +0200 Subject: [PATCH] JVM_IR: remove two outdated comments --- .../kotlin/backend/jvm/lower/AddContinuationLowering.kt | 2 -- .../jetbrains/kotlin/backend/jvm/lower/SuspendLambdaLowering.kt | 1 - 2 files changed, 3 deletions(-) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt index 22084220c08..15cf2b86277 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt @@ -51,8 +51,6 @@ internal val addContinuationPhase = makeIrFilePhase( private class AddContinuationLowering(context: JvmBackendContext) : SuspendLoweringUtils(context), FileLoweringPass { override fun lower(irFile: IrFile) { - // This should be done after converting lambdas into classes to avoid breaking the invariant that - // each lambda is referenced at most once while creating `$$forInline` methods. addContinuationObjectAndContinuationParameterToSuspendFunctions(irFile) addContinuationParameterToSuspendCalls(irFile) } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SuspendLambdaLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SuspendLambdaLowering.kt index 5c44bad0a1c..9d60f5653dd 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SuspendLambdaLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SuspendLambdaLowering.kt @@ -283,7 +283,6 @@ private class SuspendLambdaLowering(context: JvmBackendContext) : SuspendLowerin private fun IrBlockBodyBuilder.callInvokeSuspend(invokeSuspend: IrSimpleFunction, lambda: IrExpression): IrExpression = irCallOp(invokeSuspend.symbol, invokeSuspend.returnType, lambda, irUnit()) - // Primary constructor accepts parameters equal to function reference arguments + continuation and sets the fields. private fun IrClass.addPrimaryConstructorForLambda(superClass: IrClass, arity: Int): IrConstructor = addConstructor { origin = JvmLoweredDeclarationOrigin.SUSPEND_LAMBDA