From f1d31c82215ccdbf2702c6c8dd4f80ade053670c Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Thu, 19 Sep 2019 19:26:52 +0300 Subject: [PATCH] JVM_IR: Minor. Unmute tests Rename FAKE_CONTINUATION -> fakeContinuation --- .../src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt | 2 +- .../jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt | 2 +- .../jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt | 2 +- .../completionInSuspendFunction/staticSimpleReceiver.kt | 1 - .../completionInSuspendFunction/staticStateMachineReceiver.kt | 1 - .../box/closures/capturedVarsOptimization/withCoroutines.kt | 1 - .../closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt | 1 - 7 files changed, 3 insertions(+), 7 deletions(-) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt index 7f125a7e290..495076fb009 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt @@ -86,7 +86,7 @@ class JvmBackendContext( val suspendLambdaToOriginalFunctionMap = mutableMapOf() val continuationClassBuilders = mutableMapOf() val suspendFunctionViews = mutableMapOf() - val FAKE_CONTINUATION: IrExpression = createFakeContinuation(this) + val fakeContinuation: IrExpression = createFakeContinuation(this) val staticDefaultStubs = mutableMapOf() diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt index 51806011706..39a94bdf042 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/CoroutineCodegen.kt @@ -177,7 +177,7 @@ internal fun IrCall.createSuspendFunctionCallViewIfNeeded( when { caller.isInvokeSuspendOfLambda(context) || caller.isInvokeSuspendOfContinuation(context) -> IrGetValueImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, caller.dispatchReceiverParameter!!.symbol) - callerIsInlineLambda -> context.FAKE_CONTINUATION + callerIsInlineLambda -> context.fakeContinuation else -> IrGetValueImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, caller.valueParameters.last().symbol) } it.putValueArgument(valueArgumentsCount, continuationParameter) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt index 058ef65d0b5..acddc15949a 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt @@ -158,7 +158,7 @@ class ExpressionCodegen( // TODO remove fun gen(expression: IrExpression, type: Type, irType: IrType, data: BlockInfo): StackValue { - if (expression === context.FAKE_CONTINUATION) { + if (expression === context.fakeContinuation) { addFakeContinuationMarker(mv) } else { expression.accept(this, data).coerce(type, irType).materialize() diff --git a/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimpleReceiver.kt b/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimpleReceiver.kt index 87a1367a1e0..157328a2b72 100644 --- a/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimpleReceiver.kt +++ b/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticSimpleReceiver.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME class A diff --git a/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt b/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt index b58207f157b..8c6b7f486e5 100644 --- a/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt +++ b/compiler/testData/checkLocalVariablesTable/completionInSuspendFunction/staticStateMachineReceiver.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME class A diff --git a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt index 178f5c462dd..b7057738b5c 100644 --- a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt +++ b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt @@ -1,5 +1,4 @@ // KJS_WITH_FULL_RUNTIME -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt index e232cfcc9dd..6d672ff1edc 100644 --- a/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt +++ b/compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutinesNoStdLib.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST