From 5967e8295e41baea88166300545bd9080e46c227 Mon Sep 17 00:00:00 2001 From: Kristoffer Andersen Date: Mon, 2 Nov 2020 16:10:16 +0100 Subject: [PATCH] [IR] Align captured receiver variable naming with old BE --- .../common/lower/LocalDeclarationsLowering.kt | 18 +++++-- .../psi2ir/generators/FunctionGenerator.kt | 47 +++++++++++++++++-- .../jetbrains/kotlin/ir/util/SymbolTable.kt | 4 +- .../tailCallOptimizations/crossinline_ir.txt | 4 +- .../coroutines/tcoContinuation_ir.txt | 6 +-- .../lambdaWithExtensionReceiver.kt | 19 ++++++++ .../localVariables/receiverMangling/simple.kt | 13 +++++ .../ir/irText/classes/initValInLambda.txt | 2 +- .../lambdaInDataClassDefaultParameter.txt | 2 +- .../declarations/parameters/lambdas.txt | 2 +- .../ir/irText/expressions/kt37570.txt | 4 +- .../ir/irText/firProblems/AllCandidates.txt | 4 +- .../ir/irText/lambdas/extensionLambda.txt | 4 +- .../lambdas/multipleImplicitReceivers.txt | 12 ++--- .../testData/ir/irText/stubs/builtinMap.txt | 4 +- .../types/castsInsideCoroutineInference.txt | 22 ++++----- .../IrLocalVariableTestGenerated.java | 26 ++++++++++ .../LocalVariableTestGenerated.java | 26 ++++++++++ .../multipleBreakpoints/thisLabels.out | 1 - .../frame/hideSyntheticThis.out | 1 - .../frame/lambdaAsValueArgument.out | 1 - 21 files changed, 176 insertions(+), 46 deletions(-) create mode 100644 compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt create mode 100644 compiler/testData/debug/localVariables/receiverMangling/simple.kt diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt index db95dd20bc5..d9a850e635c 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.backend.common.lower import org.jetbrains.kotlin.backend.common.BodyLoweringPass import org.jetbrains.kotlin.backend.common.CommonBackendContext +import org.jetbrains.kotlin.backend.common.descriptors.synthesizedName import org.jetbrains.kotlin.backend.common.descriptors.synthesizedString import org.jetbrains.kotlin.backend.common.ir.* import org.jetbrains.kotlin.backend.common.runOnFilePostfix @@ -765,18 +766,22 @@ class LocalDeclarationsLowering( if (isSpecial) asString().substring(1, asString().length - 1) else asString() private fun suggestNameForCapturedValue(declaration: IrValueDeclaration, usedNames: MutableSet): Name { - if (declaration is IrValueParameter && declaration.name.asString() == "") { - if (declaration.isDispatchReceiver()) { + if (declaration is IrValueParameter) { + if (declaration.name.asString() == "" && declaration.isDispatchReceiver()) { return findFirstUnusedName("this\$0", usedNames) { "this\$$it" } - } else if (declaration.isExtensionReceiver()) { + } else if (declaration.name.asString() == "" && declaration.isExtensionReceiver()) { val parentNameSuffix = declaration.parentNameSuffixForExtensionReceiver return findFirstUnusedName("\$this_$parentNameSuffix", usedNames) { "\$this_$parentNameSuffix\$$it" } + } else if (declaration.isCapturedReceiver()) { + val baseName = declaration.name.asString().removePrefix(CAPTURED_RECEIVER_PREFIX) + return findFirstUnusedName("\$this_$baseName", usedNames) { + "\$this_$baseName\$$it" + } } - // TODO captured extension receivers of extension lambdas? } val base = if (declaration.name.isSpecial) declaration.name.stripSpecialMarkers() @@ -810,6 +815,11 @@ class LocalDeclarationsLowering( return parentFun.extensionReceiverParameter == this } + private val CAPTURED_RECEIVER_PREFIX = "\$this\$" + + private fun IrValueParameter.isCapturedReceiver(): Boolean = + name.asString().startsWith(CAPTURED_RECEIVER_PREFIX) + private val IrValueParameter.parentNameSuffixForExtensionReceiver: String get() { val parentFun = parent as? IrSimpleFunction diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt index 46ff9d1ee2c..e3e02ddee65 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.psi2ir.generators +import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET @@ -19,6 +20,8 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrReturnImpl import org.jetbrains.kotlin.ir.expressions.impl.IrSetFieldImpl import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType import org.jetbrains.kotlin.ir.util.declareSimpleFunctionWithOverrides +import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.name.Name.isValidIdentifier import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.pureEndOffset import org.jetbrains.kotlin.psi.psiUtil.pureStartOffset @@ -26,6 +29,7 @@ import org.jetbrains.kotlin.psi2ir.isConstructorDelegatingToSuper import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils import org.jetbrains.kotlin.resolve.DescriptorUtils +import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall import org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator import org.jetbrains.kotlin.resolve.descriptorUtil.isAnnotationConstructor import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyExternal @@ -328,17 +332,50 @@ class FunctionGenerator(declarationGenerator: DeclarationGenerator) : Declaratio receiverParameterDescriptor: ReceiverParameterDescriptor, ktElement: KtPureElement?, irOwnerElement: IrElement - ): IrValueParameter = - declareParameter(receiverParameterDescriptor, ktElement, irOwnerElement) + ): IrValueParameter { + if (context.languageVersionSettings.supportsFeature(LanguageFeature.NewCapturedReceiverFieldNamingConvention)) { + if (ktElement is KtFunctionLiteral) { + val name = getCallLabelForLambdaArgument(ktElement, this.context.bindingContext)?.let { + it.takeIf(Name::isValidIdentifier) ?: "\$receiver" + } + return declareParameter(receiverParameterDescriptor, ktElement, irOwnerElement, name = Name.identifier("\$this\$$name")) + } + } + return declareParameter(receiverParameterDescriptor, ktElement, irOwnerElement) + } - private fun declareParameter(descriptor: ParameterDescriptor, ktElement: KtPureElement?, irOwnerElement: IrElement) = + private fun getCallLabelForLambdaArgument(declaration: KtFunctionLiteral, bindingContext: BindingContext): String? { + val lambdaExpression = declaration.parent as? KtLambdaExpression ?: return null + val lambdaExpressionParent = lambdaExpression.parent + + if (lambdaExpressionParent is KtLabeledExpression) { + lambdaExpressionParent.name?.let { return it } + } + + val callExpression = when (val argument = lambdaExpression.parent) { + is KtLambdaArgument -> { + argument.parent as? KtCallExpression ?: return null + } + is KtValueArgument -> { + val valueArgumentList = argument.parent as? KtValueArgumentList ?: return null + valueArgumentList.parent as? KtCallExpression ?: return null + } + else -> return null + } + + val call = callExpression.getResolvedCall(bindingContext) ?: return null + return call.resultingDescriptor.name.asString() + } + + private fun declareParameter(descriptor: ParameterDescriptor, ktElement: KtPureElement?, irOwnerElement: IrElement, name: Name? = null) = context.symbolTable.declareValueParameter( ktElement?.pureStartOffset ?: irOwnerElement.startOffset, ktElement?.pureEndOffset ?: irOwnerElement.endOffset, IrDeclarationOrigin.DEFINED, descriptor, descriptor.type.toIrType(), - (descriptor as? ValueParameterDescriptor)?.varargElementType?.toIrType() - ) + (descriptor as? ValueParameterDescriptor)?.varargElementType?.toIrType(), + name + ) private fun generateDefaultAnnotationParameterValue( valueExpression: KtExpression, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt index f63973ae2b5..510a5b7d7bb 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt @@ -31,6 +31,7 @@ import org.jetbrains.kotlin.ir.expressions.IrExpressionBody import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.symbols.impl.* import org.jetbrains.kotlin.ir.types.IrType +import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyExternal import org.jetbrains.kotlin.serialization.deserialization.descriptors.DescriptorWithContainerSource @@ -907,9 +908,10 @@ class SymbolTable( descriptor: ParameterDescriptor, type: IrType, varargElementType: IrType? = null, + name: Name? = null, valueParameterFactory: (IrValueParameterSymbol) -> IrValueParameter = { irFactory.createValueParameter( - startOffset, endOffset, origin, it, nameProvider.nameForDeclaration(descriptor), + startOffset, endOffset, origin, it, name ?: nameProvider.nameForDeclaration(descriptor), descriptor.indexOrMinusOne, type, varargElementType, descriptor.isCrossinline, descriptor.isNoinline, false ) } diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline_ir.txt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline_ir.txt index cef676220eb..fb8d68b8411 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline_ir.txt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline_ir.txt @@ -29,7 +29,7 @@ public final class CrossinlineKt$box$1$invokeSuspend$$inlined$filter$1$2$1 { public final class CrossinlineKt$box$1$invokeSuspend$$inlined$filter$1$2 { // source: 'crossinline.kt' enclosing method CrossinlineKt$box$1$invokeSuspend$$inlined$filter$1.consume(LSink;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - synthetic final field $this_anonymous$inlined: Sink + synthetic final field $this_source$inlined: Sink inner (anonymous) class CrossinlineKt$box$1$invokeSuspend$$inlined$filter$1$2 inner (anonymous) class CrossinlineKt$box$1$invokeSuspend$$inlined$filter$1$2$1 public method (p0: Sink): void @@ -147,7 +147,7 @@ public final class CrossinlineKt$filter$lambda-3$$inlined$consumeEach$1 { // source: 'crossinline.kt' enclosing method CrossinlineKt.filter(LSourceCrossinline;Lkotlin/jvm/functions/Function1;)LSourceCrossinline; synthetic final field $predicate$inlined: kotlin.jvm.functions.Function1 - synthetic final field $this_anonymous$inlined: Sink + synthetic final field $this_source$inlined: Sink inner (anonymous) class CrossinlineKt$filter$lambda-3$$inlined$consumeEach$1 inner (anonymous) class CrossinlineKt$filter$lambda-3$$inlined$consumeEach$1$1 public method (p0: kotlin.jvm.functions.Function1, p1: Sink): void diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_ir.txt b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_ir.txt index 46a4489bb9a..c7c92a1dce2 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_ir.txt @@ -96,7 +96,7 @@ public final class TcoContinuationKt$foo$$inlined$map$1$2$1 { public final class TcoContinuationKt$foo$$inlined$map$1$2 { // source: 'tcoContinuation.kt' enclosing method TcoContinuationKt$foo$$inlined$map$1.collect(LFlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - synthetic final field $this_anonymous$inlined: FlowCollector + synthetic final field $this_flow$inlined: FlowCollector inner (anonymous) class TcoContinuationKt$foo$$inlined$map$1$2 inner (anonymous) class TcoContinuationKt$foo$$inlined$map$1$2$1 public method (p0: FlowCollector): void @@ -143,7 +143,7 @@ public final class TcoContinuationKt$map$$inlined$transform$1$2$1 { public final class TcoContinuationKt$map$$inlined$transform$1$2 { // source: 'tcoContinuation.kt' enclosing method TcoContinuationKt$map$$inlined$transform$1.collect(LFlowCollector;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - synthetic final field $this_anonymous$inlined: FlowCollector + synthetic final field $this_flow$inlined: FlowCollector synthetic final field $transformer$inlined$1: kotlin.jvm.functions.Function2 inner (anonymous) class TcoContinuationKt$map$$inlined$transform$1$2 inner (anonymous) class TcoContinuationKt$map$$inlined$transform$1$2$1 @@ -206,7 +206,7 @@ public final class TcoContinuationKt$transform$lambda-1$$inlined$collect$1$1 { public final class TcoContinuationKt$transform$lambda-1$$inlined$collect$1 { // source: 'tcoContinuation.kt' enclosing method TcoContinuationKt.transform(LFlow;Lkotlin/jvm/functions/Function3;)LFlow; - synthetic final field $this_anonymous$inlined: FlowCollector + synthetic final field $this_flow$inlined: FlowCollector synthetic final field $transformer$inlined: kotlin.jvm.functions.Function3 inner (anonymous) class TcoContinuationKt$transform$lambda-1$$inlined$collect$1 inner (anonymous) class TcoContinuationKt$transform$lambda-1$$inlined$collect$1$1 diff --git a/compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt b/compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt new file mode 100644 index 00000000000..43b04b00f66 --- /dev/null +++ b/compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt @@ -0,0 +1,19 @@ + +// FILE: test.kt +fun foo(block: Long.() -> String): String { + return 1L.block() +} + +fun box() { + foo { + "OK" + } +} + +// LOCAL VARIABLES +// test.kt:8 box: +// test.kt:4 foo: block:kotlin.jvm.functions.Function1=TestKt$box$1 +// test.kt:9 invoke: $this$foo:long=1:long +// test.kt:4 foo: block:kotlin.jvm.functions.Function1=TestKt$box$1 +// test.kt:8 box: +// test.kt:11 box: \ No newline at end of file diff --git a/compiler/testData/debug/localVariables/receiverMangling/simple.kt b/compiler/testData/debug/localVariables/receiverMangling/simple.kt new file mode 100644 index 00000000000..bf01739bc59 --- /dev/null +++ b/compiler/testData/debug/localVariables/receiverMangling/simple.kt @@ -0,0 +1,13 @@ + + +// FILE: test.kt +fun String.foo(a: Int) {} + +fun box() { + "OK".foo(42) +} + +// LOCAL VARIABLES +// test.kt:7 box: +// test.kt:4 foo: $this$foo:java.lang.String="OK":java.lang.String, a:int=42:int +// test.kt:8 box: \ No newline at end of file diff --git a/compiler/testData/ir/irText/classes/initValInLambda.txt b/compiler/testData/ir/irText/classes/initValInLambda.txt index 9c0dbb3f3ea..2cc06d155bd 100644 --- a/compiler/testData/ir/irText/classes/initValInLambda.txt +++ b/compiler/testData/ir/irText/classes/initValInLambda.txt @@ -22,7 +22,7 @@ FILE fqName: fileName:/initValInLambda.kt $receiver: CONST Int type=kotlin.Int value=1 block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:kotlin.Int + $receiver: VALUE_PARAMETER name:$this$run type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null receiver: GET_VAR ': .TestInitValInLambdaCalledOnce declared in .TestInitValInLambdaCalledOnce' type=.TestInitValInLambdaCalledOnce origin=null diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt index 00f57f168b2..7f2f8a2d776 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt EXPRESSION_BODY FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function2<.A, kotlin.String, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A, it:kotlin.String) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:.A + $receiver: VALUE_PARAMETER name:$this$null type:.A VALUE_PARAMETER name:it index:0 type:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String): kotlin.Unit declared in .A.' diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.txt index c58d27fdbb1..a79f92d3c68 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.txt @@ -18,7 +18,7 @@ FILE fqName: fileName:/lambdas.kt EXPRESSION_BODY FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Any, it:kotlin.Any) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:kotlin.Any + $receiver: VALUE_PARAMETER name:$this$null type:kotlin.Any VALUE_PARAMETER name:it index:0 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any): kotlin.Int declared in .test2' diff --git a/compiler/testData/ir/irText/expressions/kt37570.txt b/compiler/testData/ir/irText/expressions/kt37570.txt index fc334bf80ee..153663305a6 100644 --- a/compiler/testData/ir/irText/expressions/kt37570.txt +++ b/compiler/testData/ir/irText/expressions/kt37570.txt @@ -26,11 +26,11 @@ FILE fqName: fileName:/kt37570.kt $receiver: CALL 'public final fun a (): kotlin.String declared in ' type=kotlin.String origin=null block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:kotlin.String + $receiver: VALUE_PARAMETER name:$this$apply type:kotlin.String BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]' type=kotlin.Unit origin=null receiver: GET_VAR ': .A declared in .A' type=.A origin=null - value: GET_VAR ': kotlin.String declared in .A.' type=kotlin.String origin=null + value: GET_VAR '$this$apply: kotlin.String declared in .A.' type=kotlin.String origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.txt index def1c01880a..591878e17f6 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.txt @@ -61,12 +61,12 @@ FILE fqName: fileName:/AllCandidates.kt : @[FlexibleNullability] A of .allCandidatesResult? block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>?) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? + $receiver: VALUE_PARAMETER name:$this$apply type:@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? BLOCK_BODY CALL 'public open fun setAllCandidates (allCandidates: @[FlexibleNullability] kotlin.collections.MutableCollection<@[FlexibleNullability] .ResolvedCall<@[FlexibleNullability] D of .OverloadResolutionResultsImpl?>?>?): kotlin.Unit declared in .OverloadResolutionResultsImpl' type=kotlin.Unit origin=EQ <1>: @[FlexibleNullability] A of .allCandidatesResult? $this: TYPE_OP type=.OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?> origin=IMPLICIT_NOTNULL typeOperand=.OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?> - GET_VAR ': @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? declared in .allCandidatesResult.' type=@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? origin=null + GET_VAR '$this$apply: @[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? declared in .allCandidatesResult.' type=@[FlexibleNullability] .OverloadResolutionResultsImpl<@[FlexibleNullability] A of .allCandidatesResult?>? origin=null allCandidates: CALL 'public final fun map (transform: kotlin.Function1): kotlin.collections.List [inline] declared in kotlin.collections' type=kotlin.collections.List<.ResolvedCall.allCandidatesResult>> origin=null : .MyCandidate : .ResolvedCall.allCandidatesResult> diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index f6736edec91..037908ce0e8 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -8,8 +8,8 @@ FILE fqName: fileName:/extensionLambda.kt $receiver: CONST String type=kotlin.String value="42" block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:kotlin.String + $receiver: VALUE_PARAMETER name:$this$run type:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1' CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR ': kotlin.String declared in .test1.' type=kotlin.String origin=null + $this: GET_VAR '$this$run: kotlin.String declared in .test1.' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 688dbeafe2c..4caa81755a8 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -92,7 +92,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt receiver: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.A, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:.A + $receiver: VALUE_PARAMETER name:$this$with type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test' CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null @@ -101,7 +101,7 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt receiver: GET_VAR 'fooImpl: .IFoo declared in .test' type=.IFoo origin=null block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IFoo) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:.IFoo + $receiver: VALUE_PARAMETER name:$this$with type:.IFoo BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test.' CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null @@ -110,11 +110,11 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt receiver: GET_VAR 'invokeImpl: .IInvoke declared in .test' type=.IInvoke origin=null block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IInvoke) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:.IInvoke + $receiver: VALUE_PARAMETER name:$this$with type:.IInvoke BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test..' CALL 'public open fun invoke (): kotlin.Int [operator] declared in .IInvoke' type=kotlin.Int origin=INVOKE - $this: GET_VAR ': .IInvoke declared in .test...' type=.IInvoke origin=null + $this: GET_VAR '$this$with: .IInvoke declared in .test...' type=.IInvoke origin=null $receiver: CALL 'public open fun (): .B declared in .IFoo' type=.B origin=GET_PROPERTY - $this: GET_VAR ': .IFoo declared in .test..' type=.IFoo origin=null - $receiver: GET_VAR ': .A declared in .test.' type=.A origin=null + $this: GET_VAR '$this$with: .IFoo declared in .test..' type=.IFoo origin=null + $receiver: GET_VAR '$this$with: .A declared in .test.' type=.A origin=null diff --git a/compiler/testData/ir/irText/stubs/builtinMap.txt b/compiler/testData/ir/irText/stubs/builtinMap.txt index d96be88acc2..7698edb6c28 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.txt @@ -24,11 +24,11 @@ FILE fqName: fileName:/builtinMap.kt p0: GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1.plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> }, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> }) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> } + $receiver: VALUE_PARAMETER name:$this$apply type:java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> } BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public open fun put (key: @[EnhancedNullability] K of java.util.LinkedHashMap, value: @[EnhancedNullability] V of java.util.LinkedHashMap): @[EnhancedNullability] V of java.util.LinkedHashMap? [fake_override] declared in java.util.LinkedHashMap' type=@[EnhancedNullability] V1 of .plus? origin=null - $this: GET_VAR ': java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> } declared in .plus.' type=java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> } origin=null + $this: GET_VAR '$this$apply: java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> } declared in .plus.' type=java.util.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?>{ kotlin.collections.LinkedHashMap<@[FlexibleNullability] K1 of .plus?, @[FlexibleNullability] V1 of .plus?> } origin=null key: CALL 'public final fun (): A of kotlin.Pair declared in kotlin.Pair' type=K1 of .plus origin=GET_PROPERTY $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null value: CALL 'public final fun (): B of kotlin.Pair declared in kotlin.Pair' type=V1 of .plus origin=GET_PROPERTY diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.txt index 785ad3c66fb..0b261fec251 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.txt @@ -12,19 +12,19 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt : R of .scopedFlow block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.FlowCollector.scopedFlow>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.FlowCollector.scopedFlow>) returnType:kotlin.Unit [suspend] - $receiver: VALUE_PARAMETER name: type:.FlowCollector.scopedFlow> + $receiver: VALUE_PARAMETER name:$this$flow type:.FlowCollector.scopedFlow> BLOCK_BODY VAR name:collector type:.FlowCollector.scopedFlow> [val] - GET_VAR ': .FlowCollector.scopedFlow> declared in .scopedFlow.' type=.FlowCollector.scopedFlow> origin=null + GET_VAR '$this$flow: .FlowCollector.scopedFlow> declared in .scopedFlow.' type=.FlowCollector.scopedFlow> origin=null CALL 'public final fun flowScope (block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.CoroutineScope, R of .flowScope>): R of .flowScope [suspend] declared in ' type=kotlin.Unit origin=null : kotlin.Unit block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.CoroutineScope, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.CoroutineScope) returnType:kotlin.Unit [suspend] - $receiver: VALUE_PARAMETER name: type:.CoroutineScope + $receiver: VALUE_PARAMETER name:$this$flowScope type:.CoroutineScope BLOCK_BODY CALL 'public abstract fun invoke (p1: P1 of kotlin.coroutines.SuspendFunction2, p2: P2 of kotlin.coroutines.SuspendFunction2): R of kotlin.coroutines.SuspendFunction2 [suspend,operator] declared in kotlin.coroutines.SuspendFunction2' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'block: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.CoroutineScope, .FlowCollector.scopedFlow>, kotlin.Unit> declared in .scopedFlow' type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.CoroutineScope, .FlowCollector.scopedFlow>, kotlin.Unit> origin=VARIABLE_AS_FUNCTION - p1: GET_VAR ': .CoroutineScope declared in .scopedFlow..' type=.CoroutineScope origin=null + p1: GET_VAR '$this$flowScope: .CoroutineScope declared in .scopedFlow..' type=.CoroutineScope origin=null p2: GET_VAR 'val collector: .FlowCollector.scopedFlow> [val] declared in .scopedFlow.' type=.FlowCollector.scopedFlow> origin=null FUN name:onCompletion visibility:public modality:FINAL ($receiver:.Flow.onCompletion>, action:@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.FlowCollector.onCompletion>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit>) returnType:.Flow.onCompletion> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -36,12 +36,12 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt : T of .onCompletion block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.FlowCollector.onCompletion>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.FlowCollector.onCompletion>) returnType:kotlin.Unit [suspend] - $receiver: VALUE_PARAMETER name: type:.FlowCollector.onCompletion> + $receiver: VALUE_PARAMETER name:$this$unsafeFlow type:.FlowCollector.onCompletion> BLOCK_BODY VAR name:safeCollector type:.SafeCollector.onCompletion> [val] CONSTRUCTOR_CALL 'public constructor (collector: .FlowCollector.SafeCollector>) [primary] declared in .SafeCollector' type=.SafeCollector.onCompletion> origin=null : T of .onCompletion - collector: GET_VAR ': .FlowCollector.onCompletion> declared in .onCompletion.' type=.FlowCollector.onCompletion> origin=null + collector: GET_VAR '$this$unsafeFlow: .FlowCollector.onCompletion> declared in .onCompletion.' type=.FlowCollector.onCompletion> origin=null CALL 'public final fun invokeSafely (action: @[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.FlowCollector.invokeSafely>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit>): kotlin.Unit [suspend] declared in ' type=kotlin.Unit origin=null : T of .onCompletion $receiver: GET_VAR 'val safeCollector: .SafeCollector.onCompletion> [val] declared in .onCompletion.' type=.SafeCollector.onCompletion> origin=null @@ -73,7 +73,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt $receiver: GET_VAR ': .Flow.onCompletion> declared in .onCompletion' type=.Flow.onCompletion> origin=null action: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction2<.FlowCollector.onCompletion>, @[ParameterName(name = 'cause')] kotlin.Throwable?, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.FlowCollector.onCompletion>, it:kotlin.Throwable?) returnType:kotlin.Unit [suspend] - $receiver: VALUE_PARAMETER name: type:.FlowCollector.onCompletion> + $receiver: VALUE_PARAMETER name:$this$onCompletion type:.FlowCollector.onCompletion> VALUE_PARAMETER name:it index:0 type:kotlin.Throwable? BLOCK_BODY CALL 'public abstract fun invoke (p1: P1 of kotlin.coroutines.SuspendFunction1): R of kotlin.coroutines.SuspendFunction1 [suspend,operator] declared in kotlin.coroutines.SuspendFunction1' type=kotlin.Unit origin=INVOKE @@ -89,12 +89,12 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt $receiver: GET_VAR ': .CoroutineScope declared in .asFairChannel' type=.CoroutineScope origin=null block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.ProducerScope, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.ProducerScope) returnType:kotlin.Unit [suspend] - $receiver: VALUE_PARAMETER name: type:.ProducerScope + $receiver: VALUE_PARAMETER name:$this$produce type:.ProducerScope BLOCK_BODY VAR name:channel type:.ChannelCoroutine [val] TYPE_OP type=.ChannelCoroutine origin=CAST typeOperand=.ChannelCoroutine CALL 'public abstract fun (): .SendChannel.ProducerScope> declared in .ProducerScope' type=.SendChannel origin=GET_PROPERTY - $this: GET_VAR ': .ProducerScope declared in .asFairChannel.' type=.ProducerScope origin=null + $this: GET_VAR '$this$produce: .ProducerScope declared in .asFairChannel.' type=.ProducerScope origin=null CALL 'public final fun collect (action: kotlin.coroutines.SuspendFunction1<@[ParameterName(name = 'value')] T of .collect, kotlin.Unit>): kotlin.Unit [inline,suspend] declared in ' type=kotlin.Unit origin=null : kotlin.Any? $receiver: GET_VAR 'flow: .Flow<*> declared in .asFairChannel' type=.Flow<*> origin=null @@ -127,7 +127,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt $receiver: GET_VAR ': .CoroutineScope declared in .asChannel' type=.CoroutineScope origin=null block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.coroutines.SuspendFunction1<.ProducerScope, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.ProducerScope) returnType:kotlin.Unit [suspend] - $receiver: VALUE_PARAMETER name: type:.ProducerScope + $receiver: VALUE_PARAMETER name:$this$produce type:.ProducerScope BLOCK_BODY CALL 'public final fun collect (action: kotlin.coroutines.SuspendFunction1<@[ParameterName(name = 'value')] T of .collect, kotlin.Unit>): kotlin.Unit [inline,suspend] declared in ' type=kotlin.Unit origin=null : kotlin.Any? @@ -139,7 +139,7 @@ FILE fqName: fileName:/castsInsideCoroutineInference.kt RETURN type=kotlin.Nothing from='local final fun (value: kotlin.Any?): kotlin.Unit [suspend] declared in .asChannel.' CALL 'public abstract fun send (e: E of .SendChannel): kotlin.Unit [suspend] declared in .SendChannel' type=kotlin.Unit origin=null $this: CALL 'public abstract fun (): .SendChannel.ProducerScope> declared in .ProducerScope' type=.SendChannel origin=GET_PROPERTY - $this: GET_VAR ': .ProducerScope declared in .asChannel.' type=.ProducerScope origin=null + $this: GET_VAR '$this$produce: .ProducerScope declared in .asChannel.' type=.ProducerScope origin=null e: BLOCK type=kotlin.Any origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Any? [val] GET_VAR 'value: kotlin.Any? declared in .asChannel..' type=kotlin.Any? origin=null diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/IrLocalVariableTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/IrLocalVariableTestGenerated.java index e18962bb9ca..7f4f59f31ec 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/IrLocalVariableTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/IrLocalVariableTestGenerated.java @@ -67,6 +67,12 @@ public class IrLocalVariableTestGenerated extends AbstractIrLocalVariableTest { runTest("compiler/testData/debug/localVariables/jvmOverloads.kt"); } + @Test + @TestMetadata("lambdaWithExtensionReceiver.kt") + public void testLambdaWithExtensionReceiver() throws Exception { + runTest("compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt"); + } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { @@ -85,6 +91,26 @@ public class IrLocalVariableTestGenerated extends AbstractIrLocalVariableTest { runTest("compiler/testData/debug/localVariables/underscoreNames.kt"); } + @TestMetadata("compiler/testData/debug/localVariables/receiverMangling") + @TestDataPath("$PROJECT_ROOT") + @RunWith(BlockJUnit4ClassRunner.class) + public static class ReceiverMangling extends AbstractIrLocalVariableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + @Test + public void testAllFilesPresentInReceiverMangling() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/receiverMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/debug/localVariables/receiverMangling/simple.kt"); + } + } + @TestMetadata("compiler/testData/debug/localVariables/suspend") @TestDataPath("$PROJECT_ROOT") @RunWith(BlockJUnit4ClassRunner.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/LocalVariableTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/LocalVariableTestGenerated.java index 0b4d60c9060..b7349719a3c 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/LocalVariableTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/debugInformation/LocalVariableTestGenerated.java @@ -67,6 +67,12 @@ public class LocalVariableTestGenerated extends AbstractLocalVariableTest { runTest("compiler/testData/debug/localVariables/jvmOverloads.kt"); } + @Test + @TestMetadata("lambdaWithExtensionReceiver.kt") + public void testLambdaWithExtensionReceiver() throws Exception { + runTest("compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt"); + } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { @@ -85,6 +91,26 @@ public class LocalVariableTestGenerated extends AbstractLocalVariableTest { runTest("compiler/testData/debug/localVariables/underscoreNames.kt"); } + @TestMetadata("compiler/testData/debug/localVariables/receiverMangling") + @TestDataPath("$PROJECT_ROOT") + @RunWith(BlockJUnit4ClassRunner.class) + public static class ReceiverMangling extends AbstractLocalVariableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + @Test + public void testAllFilesPresentInReceiverMangling() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/receiverMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/debug/localVariables/receiverMangling/simple.kt"); + } + } + @TestMetadata("compiler/testData/debug/localVariables/suspend") @TestDataPath("$PROJECT_ROOT") @RunWith(BlockJUnit4ClassRunner.class) diff --git a/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/multipleBreakpoints/thisLabels.out b/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/multipleBreakpoints/thisLabels.out index ad8f802e606..ca185b30c13 100644 --- a/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/multipleBreakpoints/thisLabels.out +++ b/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/multipleBreakpoints/thisLabels.out @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR LineBreakpoint created at thisLabels.kt:6 LineBreakpoint created at thisLabels.kt:8 LineBreakpoint created at thisLabels.kt:10 diff --git a/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/hideSyntheticThis.out b/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/hideSyntheticThis.out index 89d9f50e199..84aa939489b 100644 --- a/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/hideSyntheticThis.out +++ b/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/hideSyntheticThis.out @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR LineBreakpoint created at hideSyntheticThis.kt:6 Run Java Connected to the target VM diff --git a/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/lambdaAsValueArgument.out b/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/lambdaAsValueArgument.out index a57e681d931..009f1b04456 100644 --- a/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/lambdaAsValueArgument.out +++ b/idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/frame/lambdaAsValueArgument.out @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR LineBreakpoint created at lambdaAsValueArgument.kt:19 Run Java Connected to the target VM