From 02604060ae58868a16ffdb4073ea2b4ef45dc383 Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Mon, 20 Nov 2023 19:10:54 +0100 Subject: [PATCH] IR text tests: Don't dump signatures for local declarations 1. Local declarations don't participate in IR-linkage, because they can be referenced only inside the same body -> can be dropped from IR text tests. 2. Mangled names for private declarations computed by descriptors/fir are actually not used anywhere (they are recomputed by IR immediately before serialization of IR). But sometimes such mangled names diverge between K1 and K2 -> don't check them, but always check mangled names computed by IR even for private declarations. 3. Also: Drop DUMP_LOCAL_DECLARATION_SIGNATURES test directive. ^KT-57428 Obsolete ^KT-57430 Obsolete ^KT-57434 Obsolete ^KT-57778 Obsolete ^KT-57775 Obsolete --- .../delegatedImplementation.sig.kt.txt | 15 -- ...lementationWithExplicitOverride.sig.kt.txt | 5 - compiler/testData/ir/irText/classes/enum.kt | 10 +- .../ir/irText/classes/enumClassModality.kt | 10 +- .../irText/classes/enumWithMultipleCtors.kt | 10 +- .../irText/classes/enumWithSecondaryCtor.kt | 10 +- ...mplicitNotNullOnDelegatedImplementation.kt | 4 +- ...otNullOnDelegatedImplementation.sig.kt.txt | 25 ---- .../testData/ir/irText/classes/kt43217.kt | 5 +- .../ir/irText/classes/kt43217.sig.kt.txt | 48 +------ .../ir/irText/classes/localClasses.kt | 4 - .../ir/irText/classes/localClasses.sig.kt.txt | 15 -- .../classes/objectLiteralExpressions.kt | 4 - .../objectLiteralExpressions.sig.kt.txt | 97 ------------- .../delegateFieldWithAnnotations.kt | 4 - .../delegateFieldWithAnnotations.sig.kt.txt | 13 -- .../annotations/genericAnnotationClasses.kt | 4 +- .../inheritingDeprecation.sig.kt.txt | 5 - .../declarations/contextReceivers/class.kt | 4 - .../contextReceivers/class.sig.kt.txt | 17 --- .../contextReceiverMethod.sig.kt.txt | 9 -- .../contextualPrimaryConstructorWithParams.kt | 4 - ...ualPrimaryConstructorWithParams.sig.kt.txt | 19 --- .../delegatedPropertiesOperators.sig.kt.txt | 9 -- .../declarations/contextReceivers/function.kt | 4 - .../contextReceivers/function.sig.kt.txt | 5 - .../genericOuterClass.sig.kt.txt | 18 --- .../iteratorOperator.sig.kt.txt | 9 -- .../contextReceivers/kt52791.sig.kt.txt | 18 --- .../declarations/contextReceivers/lazy.kt | 4 - .../contextReceivers/lazy.sig.kt.txt | 44 ------ .../contextReceivers/overloadPriority.kt | 4 - .../overloadPriority.sig.kt.txt | 7 - .../contextReceivers/overloading.kt | 4 - .../contextReceivers/overloading.sig.kt.txt | 7 - .../typeParameterAsContextReceiver.kt | 4 - .../typeParameterAsContextReceiver.sig.kt.txt | 8 -- .../irText/declarations/defaultArguments.kt | 4 - .../declarations/defaultArguments.sig.kt.txt | 4 - .../delegationEvaluationOrder1.sig.kt.txt | 18 --- .../delegationEvaluationOrder2.sig.kt.txt | 54 ------- .../ir/irText/declarations/kt35550.sig.kt.txt | 5 - .../declarations/localClassWithOverrides.kt | 4 - .../localClassWithOverrides.sig.kt.txt | 89 ------------ ...expectMemberInNotExpectClassFir.sig.kt.txt | 10 ++ .../parameters/delegatedMembers.sig.kt.txt | 5 - .../declarations/parameters/localFun.kt | 4 - .../parameters/localFun.sig.kt.txt | 19 --- .../declarations/provideDelegate/local.kt | 4 - .../provideDelegate/local.sig.kt.txt | 9 -- .../localDifferentReceivers.kt | 4 - .../localDifferentReceivers.sig.kt.txt | 16 --- .../errors/unresolvedReference.sig.kt.txt | 24 ++-- .../expressions/argumentMappedWithError.kt | 2 +- .../argumentMappedWithError.sig.kt.txt | 6 +- .../irText/expressions/enumEntryAsReceiver.kt | 10 +- .../basicFunInterfaceConversion.kt | 4 - .../basicFunInterfaceConversion.sig.kt.txt | 7 - ...mplicitNotNullInDestructuringAssignment.kt | 3 - ...otNullInDestructuringAssignment.sig.kt.txt | 3 +- .../expressions/inlinedBreakContinue.kt | 5 - .../inlinedBreakContinue.sig.kt.txt | 58 -------- .../expressions/multipleThisReferences.kt | 4 - .../multipleThisReferences.sig.kt.txt | 49 ------- .../expressions/objectByNameInsideObject.kt | 4 - .../objectByNameInsideObject.sig.kt.txt | 8 -- .../suspendConversionForExtensionFunction.kt | 2 +- ...dConversionForExtensionFunction.sig.kt.txt | 6 +- .../thisReferenceBeforeClassDeclared.kt | 4 - ...hisReferenceBeforeClassDeclared.sig.kt.txt | 21 --- .../ir/irText/firProblems/AllCandidates.kt | 3 - .../firProblems/AllCandidates.sig.kt.txt | 3 +- .../AnonymousAsReturnOfGenericFunction.kt | 4 - ...nymousAsReturnOfGenericFunction.sig.kt.txt | 26 +--- .../irText/firProblems/AssignmentOperator.kt | 1 + .../firProblems/AssignmentOperator.sig.kt.txt | 6 +- .../firProblems/ClashResolutionDescriptor.kt | 3 - .../ClashResolutionDescriptor.sig.kt.txt | 6 +- ...elegationAndInheritanceFromJava.sig.kt.txt | 5 - .../FakeOverrideInAnonymousWithDelegation.kt | 5 - ...errideInAnonymousWithDelegation.sig.kt.txt | 88 ------------ .../irText/firProblems/FlushFromAnonymous.kt | 4 - .../firProblems/FlushFromAnonymous.sig.kt.txt | 17 +-- .../firProblems/ImplicitReceiverStack.kt | 4 +- ...TypeParameterInClashingAccessor.sig.kt.txt | 8 +- .../coercionToUnitForNestedWhen.kt | 3 - .../coercionToUnitForNestedWhen.sig.kt.txt | 9 +- .../testData/ir/irText/firProblems/kt55458.kt | 2 +- .../ir/irText/firProblems/kt55458.sig.kt.txt | 6 +- .../lambdaInEnumEntryConstructorCall.kt | 12 +- ...ambdaInEnumEntryConstructorCall.sig.kt.txt | 6 - .../localClassUsedBeforeDeclaration.kt | 4 - ...localClassUsedBeforeDeclaration.sig.kt.txt | 65 --------- .../ir/irText/firProblems/localCompanion.kt | 5 +- .../firProblems/localCompanion.sig.kt.txt | 52 +------ .../irText/firProblems/readWriteProperty.kt | 4 - .../firProblems/readWriteProperty.sig.kt.txt | 36 ----- .../reflectGetOnNullableTypeAlias.kt | 3 - .../reflectGetOnNullableTypeAlias.sig.kt.txt | 6 +- .../ir/irText/firProblems/timesInBuilder.kt | 3 - .../firProblems/timesInBuilder.sig.kt.txt | 16 +-- .../ir/irText/lambdas/anonymousFunction.kt | 4 - .../lambdas/anonymousFunction.sig.kt.txt | 13 -- .../ir/irText/singletons/enumEntry.kt | 10 +- .../types/castsInsideCoroutineInference.kt | 3 - .../castsInsideCoroutineInference.sig.kt.txt | 10 +- .../ir/irText/types/definitelyNonNull.kt | 2 +- .../irText/types/definitelyNonNull.sig.kt.txt | 6 +- .../types/definitelyNotNullAsReceiver.kt | 4 - .../definitelyNotNullAsReceiver.sig.kt.txt | 4 - .../types/dontLeaveStubTypesInSetter.kt | 2 +- .../dontLeaveStubTypesInSetter.sig.kt.txt | 6 +- .../irText/types/javaWildcardType.sig.kt.txt | 10 -- .../nullCheckOnInterfaceDelegation.sig.kt.txt | 5 - .../nnStringVsTConstrained.kt | 4 - .../nnStringVsTConstrained.sig.kt.txt | 4 - .../IrMangledNameAndSignatureDumpHandler.kt | 133 ++++++++++++++---- .../test/directives/CodegenTestDirectives.kt | 4 - .../klib/KlibIrTextTestCaseGenerated.java | 5 + .../FirLightTreeJsIrTextTestGenerated.java | 6 + .../test/fir/FirPsiJsIrTextTestGenerated.java | 6 + .../test/ir/ClassicJsIrTextTestGenerated.java | 6 + .../ClassicNativeIrTextTestGenerated.java | 6 + ...FirLightTreeNativeIrTextTestGenerated.java | 6 + .../FirPsiNativeIrTextTestGenerated.java | 6 + 125 files changed, 259 insertions(+), 1376 deletions(-) diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.sig.kt.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.sig.kt.txt index df5b2ffae7b..42ffe43336a 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.sig.kt.txt @@ -7,11 +7,6 @@ class Test1 : IBase { // Public signature: /Test1.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: Test1.$$delegate_0 - // Public signature: /Test1.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: BaseImpl // CHECK JVM_IR: // Mangled name: Test1#bar(){}kotlin.Int // Public signature: /Test1.bar|-6436649210114349217[0] @@ -45,16 +40,6 @@ class Test2 : IBase, IOther { // Public signature: /Test2.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: Test2.$$delegate_0 - // Public signature: /Test2.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: BaseImpl - // CHECK: - // Mangled name: Test2.$$delegate_1 - // Public signature: /Test2.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_1: IOther // CHECK JVM_IR: // Mangled name: Test2#bar(){}kotlin.Int // Public signature: /Test2.bar|-6436649210114349217[0] diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.sig.kt.txt b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.sig.kt.txt index e5256557841..83a47d1bf2c 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.sig.kt.txt @@ -8,11 +8,6 @@ class C : IFooBar { // Public signature debug description: (){} constructor() /* primary */ // CHECK: - // Mangled name: C.$$delegate_0 - // Public signature: /C.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: FooBarImpl - // CHECK: // Mangled name: C#foo(){} // Public signature: /C.foo|-1041209573719867811[0] // Public signature debug description: foo(){} diff --git a/compiler/testData/ir/irText/classes/enum.kt b/compiler/testData/ir/irText/classes/enum.kt index b0d0b25a4aa..38a2ba11939 100644 --- a/compiler/testData/ir/irText/classes/enum.kt +++ b/compiler/testData/ir/irText/classes/enum.kt @@ -1,12 +1,6 @@ // WITH_STDLIB -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57775 - -// KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize (K1), getDeclaringClass (K1), clone (K2) enum class TestEnum1 { TEST1, TEST2 diff --git a/compiler/testData/ir/irText/classes/enumClassModality.kt b/compiler/testData/ir/irText/classes/enumClassModality.kt index f7162150bc2..585f79ff874 100644 --- a/compiler/testData/ir/irText/classes/enumClassModality.kt +++ b/compiler/testData/ir/irText/classes/enumClassModality.kt @@ -1,11 +1,5 @@ -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57775 - -// KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize (K1), getDeclaringClass (K1), clone (K2) enum class TestFinalEnum1 { X1 diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt index 8ce53c03772..b82ad727bed 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt @@ -1,11 +1,5 @@ -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57775 - -// KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize (K1), getDeclaringClass (K1), clone (K2) enum class A { X("asd"), diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt index fc9f4752367..2bd57736256 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt @@ -1,12 +1,6 @@ // WITH_STDLIB -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57775 - -// KT-61141: absent enum fake_overrides: finalize(K1), getDeclaringClass(K1), clone(K2), -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize (K1), getDeclaringClass (K1), clone (K2) enum class Test0(val x: Int) { ZERO; diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt index 6b193d0d9f7..9d4acfabd60 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: JVM -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57788 +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR +// ^ KT-57788: Fix computing mangled names of types with @EnhancedNullability from IR-based declaration descriptors // FILE: implicitNotNullOnDelegatedImplementation.kt interface IFoo { diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.sig.kt.txt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.sig.kt.txt index 69c0171fea1..27ddf4d2094 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.sig.kt.txt @@ -79,11 +79,6 @@ class TestJFoo : IFoo { // Public signature: /TestJFoo.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: TestJFoo.$$delegate_0 - // Public signature: /TestJFoo.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: JFoo // CHECK JVM_IR: // Mangled name: TestJFoo#foo(){}kotlin.String // Public signature: /TestJFoo.foo|485335955883620819[0] @@ -101,11 +96,6 @@ class TestK1 : IFoo { // Public signature: /TestK1.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: TestK1.$$delegate_0 - // Public signature: /TestK1.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: K1 // CHECK JVM_IR: // Mangled name: TestK1#foo(){}kotlin.String // Public signature: /TestK1.foo|485335955883620819[0] @@ -123,11 +113,6 @@ class TestK2 : IFoo { // Public signature: /TestK2.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: TestK2.$$delegate_0 - // Public signature: /TestK2.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: K2 // CHECK JVM_IR: // Mangled name: TestK2#foo(){}kotlin.String // Public signature: /TestK2.foo|485335955883620819[0] @@ -145,11 +130,6 @@ class TestK3 : IFoo { // Public signature: /TestK3.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: TestK3.$$delegate_0 - // Public signature: /TestK3.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: K3 // CHECK JVM_IR: // Mangled name: TestK3#foo(){}kotlin.String // Public signature: /TestK3.foo|485335955883620819[0] @@ -167,11 +147,6 @@ class TestK4 : IFoo { // Public signature: /TestK4.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: TestK4.$$delegate_0 - // Public signature: /TestK4.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: K4 // CHECK JVM_IR: // Mangled name: TestK4#foo(){}kotlin.String // Public signature: /TestK4.foo|485335955883620819[0] diff --git a/compiler/testData/ir/irText/classes/kt43217.kt b/compiler/testData/ir/irText/classes/kt43217.kt index 25264e1e87b..4245bf89e5f 100644 --- a/compiler/testData/ir/irText/classes/kt43217.kt +++ b/compiler/testData/ir/irText/classes/kt43217.kt @@ -1,8 +1,7 @@ // TARGET_BACKEND: JVM -// DUMP_LOCAL_DECLARATION_SIGNATURES -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430, KT-57788 +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR +// ^ KT-57788: Fix computing mangled names of types with @EnhancedNullability from IR-based declaration descriptors // FILE: kt43217.kt class A { diff --git a/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt b/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt index 6797cef5887..abea56620fb 100644 --- a/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt @@ -7,49 +7,9 @@ class A { // Public signature: /A.b|772347207915745207[0] // Public signature debug description: {}b private val b: - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): A{}b. - // Mangled name (compatible mode: true): A.b. - // Mangled name for the signature (compatible mode: false): {}b - // Mangled name for the signature (compatible mode: true): - local class : DoubleExpression { - // CHECK: - // Mangled name (compatible mode: false): A{}b.#(){} - // Mangled name (compatible mode: true): A.b.#(){} - // Mangled name for the signature (compatible mode: false): {}b(){} - // Mangled name for the signature (compatible mode: true): (){} - constructor() /* primary */ - - // CHECK: - // Mangled name (compatible mode: false): A{}b.#isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} - // Mangled name (compatible mode: true): A.b.#isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} - // Mangled name for the signature (compatible mode: false): {}bisEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} - // Mangled name for the signature (compatible mode: true): isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} - @Override - /* fake */ override fun isEqualTo(value: Double): @EnhancedNullability Any - - // CHECK JVM_IR: - // Mangled name (compatible mode: false): A{}b.#isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} - // Mangled name (compatible mode: true): A.b.#isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} - // Mangled name for the signature (compatible mode: false): {}bisEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} - // Mangled name for the signature (compatible mode: true): isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} - /* fake */ override fun isEqualTo(value: @EnhancedNullability Double): @EnhancedNullability Any - - // CHECK JVM_IR: - // Mangled name (compatible mode: false): A{}b.#get(){}kotlin.Double - // Mangled name (compatible mode: true): A.b.#get(){}kotlin.Double - // Mangled name for the signature (compatible mode: false): {}bget(){}kotlin.Double - // Mangled name for the signature (compatible mode: true): get(){}kotlin.Double - override fun get(): Double - - } - - // CHECK JVM_IR: + // CHECK: // Mangled name (compatible mode: false): A#(){}A{}b. // Mangled name (compatible mode: true): A#(){}A.b. - // Mangled name for the signature (compatible mode: false): (){}A{}b. - // Mangled name for the signature (compatible mode: true): (){}A.b. // Public signature: /A.b.|-6508357397455690228[0] // Public signature debug description: (){}A{}b. private get @@ -72,20 +32,20 @@ class C : DoubleExpression { // Public signature debug description: (){} constructor() /* primary */ - // CHECK JVM_IR: + // CHECK: // Mangled name: C#isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} // Public signature: /C.isEqualTo|6549516741996743028[0] // Public signature debug description: isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} @Override /* fake */ override fun isEqualTo(value: Double): @EnhancedNullability Any - // CHECK JVM_IR: + // CHECK: // Mangled name: C#isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} // Public signature: /C.isEqualTo|3976283770497294654[0] // Public signature debug description: isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} /* fake */ override fun isEqualTo(value: @EnhancedNullability Double): @EnhancedNullability Any - // CHECK JVM_IR: + // CHECK: // Mangled name: C#get(){}kotlin.Double // Public signature: /C.get|-8276149070669614990[0] // Public signature debug description: get(){}kotlin.Double diff --git a/compiler/testData/ir/irText/classes/localClasses.kt b/compiler/testData/ir/irText/classes/localClasses.kt index 8eb753612a3..7e04b1d9d5f 100644 --- a/compiler/testData/ir/irText/classes/localClasses.kt +++ b/compiler/testData/ir/irText/classes/localClasses.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 fun outer() { class LocalClass { diff --git a/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt b/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt index 36706a62a13..4ee210c059f 100644 --- a/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt @@ -3,19 +3,4 @@ // Public signature: /outer|1607449560170809066[0] // Public signature debug description: outer(){} fun outer(): Unit - // CHECK: - // Mangled name: #outer(){}.LocalClass - // Mangled name for the signature: outer(){} - local class LocalClass { - // CHECK: - // Mangled name: #outer(){}.LocalClass#(){} - // Mangled name for the signature: outer(){}(){} - constructor() /* primary */ - - // CHECK: - // Mangled name: #outer(){}.LocalClass#foo(){} - // Mangled name for the signature: outer(){}foo(){} - fun foo(): Unit - - } diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt index 8827f7c6c9d..1825107880d 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // WITH_STDLIB -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 interface IFoo { fun foo() diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt index 5ebe9db244f..c45d776b95f 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt @@ -3,27 +3,6 @@ // Public signature: /test1|6005685442305498193[0] // Public signature debug description: {}test1 val test1: Any - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): {}test1. - // Mangled name (compatible mode: true): test1. - // Mangled name for the signature (compatible mode: false): {}test1 - // Mangled name for the signature (compatible mode: true): - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): {}test1. - // Mangled name (compatible mode: true): test1. - // Mangled name for the signature (compatible mode: false): {}test1 - // Mangled name for the signature (compatible mode: true): - local class { - // CHECK: - // Mangled name (compatible mode: false): {}test1.#(){} - // Mangled name (compatible mode: true): test1.#(){} - // Mangled name for the signature (compatible mode: false): {}test1(){} - // Mangled name for the signature (compatible mode: true): (){} - constructor() /* primary */ - - } - // CHECK JVM_IR: // Mangled name: #(){}kotlin.Any // Public signature: /test1.|-6000098324399857556[0] @@ -39,34 +18,6 @@ val test1: Any // Public signature: /test2|2517758057000911509[0] // Public signature debug description: {}test2 val test2: IFoo - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): {}test2. - // Mangled name (compatible mode: true): test2. - // Mangled name for the signature (compatible mode: false): {}test2 - // Mangled name for the signature (compatible mode: true): - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): {}test2. - // Mangled name (compatible mode: true): test2. - // Mangled name for the signature (compatible mode: false): {}test2 - // Mangled name for the signature (compatible mode: true): - local class : IFoo { - // CHECK: - // Mangled name (compatible mode: false): {}test2.#(){} - // Mangled name (compatible mode: true): test2.#(){} - // Mangled name for the signature (compatible mode: false): {}test2(){} - // Mangled name for the signature (compatible mode: true): (){} - constructor() /* primary */ - - // CHECK: - // Mangled name (compatible mode: false): {}test2.#foo(){} - // Mangled name (compatible mode: true): test2.#foo(){} - // Mangled name for the signature (compatible mode: false): {}test2foo(){} - // Mangled name for the signature (compatible mode: true): foo(){} - override fun foo(): Unit - - } - // CHECK JVM_IR: // Mangled name: #(){}IFoo // Public signature: /test2.|8558399082919905120[0] @@ -114,30 +65,6 @@ class Outer { // Public signature: /Outer.test3|-3759735065270951803[0] // Public signature debug description: test3(){} fun test3(): Inner - // CHECK JVM_IR: - // Mangled name: Outer#test3(){}Outer.Inner. - // Mangled name for the signature: test3(){}Outer.Inner - // CHECK JS_IR NATIVE: - // Mangled name: Outer#test3(){}. - // Mangled name for the signature: test3(){} - local class : Inner { - // CHECK JVM_IR: - // Mangled name: Outer#test3(){}Outer.Inner.#(){} - // Mangled name for the signature: test3(){}Outer.Inner(){} - // CHECK JS_IR NATIVE: - // Mangled name: Outer#test3(){}.#(){} - // Mangled name for the signature: test3(){}(){} - constructor() /* primary */ - - // CHECK JVM_IR: - // Mangled name: Outer#test3(){}Outer.Inner.#foo(){} - // Mangled name for the signature: test3(){}Outer.Innerfoo(){} - // CHECK JS_IR NATIVE: - // Mangled name: Outer#test3(){}.#foo(){} - // Mangled name for the signature: test3(){}foo(){} - override fun foo(): Unit - - } } @@ -163,28 +90,4 @@ interface IFoo { // Public signature: /test4|5715080467126173402[0] // Public signature debug description: test4@Outer(){} fun Outer.test4(): Inner - // CHECK JVM_IR: - // Mangled name: #test4@Outer(){}Outer.Inner. - // Mangled name for the signature: test4@Outer(){}Outer.Inner - // CHECK JS_IR NATIVE: - // Mangled name: #test4@Outer(){}. - // Mangled name for the signature: test4@Outer(){} - local class : Inner { - // CHECK JVM_IR: - // Mangled name: #test4@Outer(){}Outer.Inner.#(){} - // Mangled name for the signature: test4@Outer(){}Outer.Inner(){} - // CHECK JS_IR NATIVE: - // Mangled name: #test4@Outer(){}.#(){} - // Mangled name for the signature: test4@Outer(){}(){} - constructor() /* primary */ - - // CHECK JVM_IR: - // Mangled name: #test4@Outer(){}Outer.Inner.#foo(){} - // Mangled name for the signature: test4@Outer(){}Outer.Innerfoo(){} - // CHECK JS_IR NATIVE: - // Mangled name: #test4@Outer(){}.#foo(){} - // Mangled name for the signature: test4@Outer(){}foo(){} - override fun foo(): Unit - - } diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt index 948345ab9ae..c5f9360db6e 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // WITH_STDLIB -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 annotation class Ann diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt index 763b365d2d0..cdf32a59fc7 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt @@ -3,19 +3,6 @@ // Public signature: /test1|6005685442305498193[0] // Public signature debug description: {}test1 val test1: Int /* by */ - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): {}test1##static(){}kotlin.Int - // Mangled name (compatible mode: true): test1$delegate##static(){}kotlin.Int - // Mangled name for the signature (compatible mode: false): {}test1#static(){}kotlin.Int - // Mangled name for the signature (compatible mode: true): #static(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): {}test1##static(){} - // Mangled name (compatible mode: true): test1$delegate##static(){} - // Mangled name for the signature (compatible mode: false): {}test1#static(){} - // Mangled name for the signature (compatible mode: true): #static(){} - local fun (): Int - // CHECK JVM_IR: // Mangled name: #(){}kotlin.Int // Public signature: /test1.|3978508226793108919[0] diff --git a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt index 0a77de3fb97..cda537e0ed2 100644 --- a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt +++ b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt @@ -1,5 +1,5 @@ -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-60136 +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR JS_IR NATIVE +// ^ KT-63724: all signatures match, but @Test5 has different value parameters structure package ann diff --git a/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.sig.kt.txt b/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.sig.kt.txt index 4b91db19678..23a427a6d34 100644 --- a/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.sig.kt.txt @@ -49,11 +49,6 @@ class Delegated : IFoo { // Public signature: /Delegated.|-657369904845510135[0] // Public signature debug description: (IFoo){} constructor(foo: IFoo) /* primary */ - // CHECK: - // Mangled name: Delegated.$$delegate_0 - // Public signature: /Delegated.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: IFoo // CHECK: // Mangled name: Delegated@kotlin.String{}extProp diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/class.kt b/compiler/testData/ir/irText/declarations/contextReceivers/class.kt index e2b35d5935e..0a89feedd9a 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/class.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/class.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 class Outer { val x: Int = 1 diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt index 53f15576d7c..a719c359ba7 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt @@ -7,15 +7,6 @@ class Inner { // Public signature: /Inner.|7428094623108856579[0] // Public signature debug description: !Outer(kotlin.Any){} constructor($context_receiver_0: Outer, arg: Any) /* primary */ - // CHECK JVM_IR: - // Mangled name: Inner.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: Inner.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: Outer // CHECK JVM_IR: // Mangled name: Inner#bar(){}kotlin.Int @@ -38,7 +29,6 @@ class Outer { // Public signature: /Outer.x|-8060530855978347579[0] // Public signature debug description: {}x val x: Int - field // CHECK JVM_IR: // Mangled name: Outer#(){}kotlin.Int // Public signature: /Outer.x.|4966956098150895696[0] @@ -62,11 +52,4 @@ class Outer { // Public signature: /f|-90367846469451219[0] // Public signature debug description: f(Outer){} fun f(outer: Outer): Unit - // CHECK JVM_IR: - // Mangled name: #f(Outer){}##static@Outer(){}Inner - // Mangled name for the signature: f(Outer){}#static@Outer(){}Inner - // CHECK JS_IR NATIVE: - // Mangled name: #f(Outer){}##static@Outer(){} - // Mangled name for the signature: f(Outer){}#static@Outer(){} - local fun Outer.(): Inner diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt index 1e6e7ead0b2..ab4aa7e1f70 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt @@ -29,15 +29,6 @@ class Test { // Public signature: /Test.|4848133296495274545[0] // Public signature debug description: !Context(){} constructor($context_receiver_0: Context) /* primary */ - // CHECK JVM_IR: - // Mangled name: Test.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: Test.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: Context // CHECK: // Mangled name: Test#bar(){} diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.kt b/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.kt index 57bdc924e49..2bd75795632 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 class O(val o: String) diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt index 04b6f95d76e..6d68e0c7854 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt @@ -7,7 +7,6 @@ class O { // Public signature: /O.o|-5332571409865440260[0] // Public signature debug description: {}o val o: String - field // CHECK JVM_IR: // Mangled name: O#(){}kotlin.String // Public signature: /O.o.|2606027183154875572[0] @@ -35,7 +34,6 @@ class OK { // Public signature: /OK.k|2162811783424158931[0] // Public signature debug description: {}k val k: String - field // CHECK JVM_IR: // Mangled name: OK#(){}kotlin.String // Public signature: /OK.k.|-8248201737917988340[0] @@ -51,7 +49,6 @@ class OK { // Public signature: /OK.result|456251868630197251[0] // Public signature debug description: {}result val result: String - field // CHECK JVM_IR: // Mangled name: OK#(){}kotlin.String // Public signature: /OK.result.|8441547134620975366[0] @@ -67,15 +64,6 @@ class OK { // Public signature: /OK.|-804847331171011326[0] // Public signature debug description: !O(kotlin.String){} constructor($context_receiver_0: O, k: String) /* primary */ - // CHECK JVM_IR: - // Mangled name: OK.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: OK.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: O } @@ -88,11 +76,4 @@ class OK { // Public signature: /box|2173511048851971368[0] // Public signature debug description: box(){} fun box(): String - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String##static@O(){}kotlin.String - // Mangled name for the signature: box(){}kotlin.String#static@O(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}##static@O(){} - // Mangled name for the signature: box(){}#static@O(){} - local fun O.(): String diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt index ac46d1d5973..c72de9395c3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt @@ -95,15 +95,6 @@ class Result { // Public signature: /Result.|-1392650824251324893[0] // Public signature debug description: !kotlin.Int(){} constructor($context_receiver_0: Int) /* primary */ - // CHECK JVM_IR: - // Mangled name: Result.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: Result.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: Int } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/function.kt b/compiler/testData/ir/irText/declarations/contextReceivers/function.kt index 15d003a54f6..c47f2ff99ee 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/function.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/function.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 class C { val c = 42 diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt index 978afb5ef21..3c3280de791 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt @@ -7,7 +7,6 @@ class C { // Public signature: /C.c|-4416962153448040627[0] // Public signature debug description: {}c val c: Int - field // CHECK JVM_IR: // Mangled name: C#(){}kotlin.Int // Public signature: /C.c.|-2440337234483931882[0] @@ -31,10 +30,6 @@ class C { // Public signature: /bar|-380723744805794672[0] // Public signature debug description: bar(C){} fun bar(c: C): Unit - // CHECK: - // Mangled name: #bar(C){}##static@C(){} - // Mangled name for the signature: bar(C){}#static@C(){} - local fun C.(): Unit // CHECK: // Mangled name: #foo!C(){} diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt index db1adb298a4..53834f32d5c 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt @@ -7,15 +7,6 @@ class A { // Public signature: /A.|5547349096232763669[0] // Public signature debug description: !1:0(){} constructor($context_receiver_0: T) /* primary */ - // CHECK JVM_IR: - // Mangled name: A.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: A.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: T } @@ -28,15 +19,6 @@ class B

{ // Public signature: /B.|-5453957848603821578[0] // Public signature debug description: !kotlin.collections.Collection<1:0>(){} constructor($context_receiver_0: Collection

) /* primary */ - // CHECK JVM_IR: - // Mangled name: B.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: B.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: Collection

} diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt index 8a287572a2d..2f5272816db 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt @@ -179,15 +179,6 @@ class CounterIterator : Iterator { // Public signature: /CounterIterator.|4731448293962665986[0] // Public signature debug description: !CounterConfig(Counter){} constructor($context_receiver_0: CounterConfig, counter: Counter) /* primary */ - // CHECK JVM_IR: - // Mangled name: CounterIterator.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: CounterIterator.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: CounterConfig // CHECK JVM_IR: // Mangled name: CounterIterator#hasNext(){}kotlin.Boolean diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt index 29096f1642c..d0ed5431f3d 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt @@ -7,24 +7,6 @@ class MyClass { // Public signature: /MyClass.|1062323742830185042[0] // Public signature debug description: !kotlin.Unit!kotlin.Int(){} constructor($context_receiver_0: Unit, $context_receiver_1: Int) /* primary */ - // CHECK JVM_IR: - // Mangled name: MyClass.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf - // CHECK JS_IR NATIVE: - // Mangled name: MyClass.contextReceiverField0 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 - private /* final field */ val contextReceiverField0: Unit - // CHECK JVM_IR: - // Mangled name: MyClass.contextReceiverField1 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField1#jf - // CHECK JS_IR NATIVE: - // Mangled name: MyClass.contextReceiverField1 - // Mangled name for the signature computed from Ir: - // Mangled name for the signature computed from Descriptor: {}contextReceiverField1 - private /* final field */ val contextReceiverField1: Int } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/lazy.kt b/compiler/testData/ir/irText/declarations/contextReceivers/lazy.kt index e54329abcc8..2e92fc8310f 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/lazy.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/lazy.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 interface Lazy diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt index a881f7f3f58..9fa4fdd61af 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt @@ -10,50 +10,6 @@ interface Lazy { // Public signature: /f|-6064829949850642050[0] // Public signature debug description: f(Lazy;Lazy;Lazy<0:0>;Lazy>){0§} fun f(lazy1: Lazy, lazy2: Lazy, lazyT: Lazy, lazyLazyT: Lazy>): Unit - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy(){} - local fun Lazy.(): Unit - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy(){}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy(){}#static@Lazy(){} - local fun Lazy.(): Unit - - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy(){} - local fun Lazy.(): Unit - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy(){}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy(){}#static@Lazy(){} - local fun Lazy.(): Unit - - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy<1:0>(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy<1:0>(){} - local fun Lazy.(): Unit - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy<2:0>(){}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy<2:0>(){}#static@Lazy(){} - local fun Lazy.(): Unit - - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy>(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy>(){} - local fun Lazy>.(): Unit - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy>(){}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy>(){}#static@Lazy(){} - local fun Lazy.(): Unit - - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy(){} - local fun Lazy.(): Unit - // CHECK: - // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy(){}##static@Lazy>(){} - // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy(){}#static@Lazy>(){} - local fun Lazy>.(): Unit // CHECK: // Mangled name: #test1!Lazy!Lazy(){} diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.kt b/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.kt index d87a03e929e..9dd98b72e55 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 class Context diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt index e0b42bc98c8..bd0c37c28b8 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt @@ -35,11 +35,4 @@ fun f(): Any // Public signature: /test|6620506149988718649[0] // Public signature debug description: test(){} fun test(): Unit - // CHECK JVM_IR: - // Mangled name: #test(){}##static@Context(){}kotlin.Int - // Mangled name for the signature: test(){}#static@Context(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: #test(){}##static@Context(){} - // Mangled name for the signature: test(){}#static@Context(){} - local fun Context.(): Int diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/overloading.kt b/compiler/testData/ir/irText/declarations/contextReceivers/overloading.kt index 757fea1e990..e63fdc58cc3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/overloading.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/overloading.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 context(Int, String) fun foo(): Int { diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt index 0e2ce424c05..a17812b7652 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt @@ -23,11 +23,4 @@ fun foo($context_receiver_0: Int, $context_receiver_1: String): Int // Public signature: /test|6620506149988718649[0] // Public signature debug description: test(){} fun test(): Unit - // CHECK JVM_IR: - // Mangled name: #test(){}##static@kotlin.Int(){}kotlin.Int - // Mangled name for the signature: test(){}#static@kotlin.Int(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: #test(){}##static@kotlin.Int(){} - // Mangled name for the signature: test(){}#static@kotlin.Int(){} - local fun Int.(): Int diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.kt b/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.kt index 6ccc55bbcb7..9e903898511 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 context(T) fun useContext(block: (T) -> Unit) { } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt index 2cc410de9f7..10b682d8c7a 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt @@ -3,14 +3,6 @@ // Public signature: /test|6620506149988718649[0] // Public signature debug description: test(){} fun test(): Unit - // CHECK: - // Mangled name: #test(){}##static@kotlin.Int(){} - // Mangled name for the signature: test(){}#static@kotlin.Int(){} - local fun Int.(): Unit - // CHECK: - // Mangled name: #test(){}##static@kotlin.Int(){}##static(kotlin.Int){} - // Mangled name for the signature: test(){}#static@kotlin.Int(){}#static(kotlin.Int){} - local fun (i: Int): Unit // CHECK: // Mangled name: #useContext!0:0(kotlin.Function1<0:0,kotlin.Unit>){0§} diff --git a/compiler/testData/ir/irText/declarations/defaultArguments.kt b/compiler/testData/ir/irText/declarations/defaultArguments.kt index 43b8943b925..0876934ebff 100644 --- a/compiler/testData/ir/irText/declarations/defaultArguments.kt +++ b/compiler/testData/ir/irText/declarations/defaultArguments.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^KT-57434 fun test1(x: Int, y: Int = 0, z: String = "abc") { fun local(xx: Int = x, yy: Int = y, zz: String = z) {} diff --git a/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt b/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt index c4a6596224b..6079edc01b4 100644 --- a/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt @@ -3,8 +3,4 @@ // Public signature: /test1|-2420205866450198550[0] // Public signature debug description: test1(kotlin.Int;kotlin.Int;kotlin.String){} fun test1(x: Int, y: Int, z: String): Unit - // CHECK: - // Mangled name: #test1(kotlin.Int;kotlin.Int;kotlin.String){}#local#static(kotlin.Int;kotlin.Int;kotlin.String){} - // Mangled name for the signature: test1(kotlin.Int;kotlin.Int;kotlin.String){}local#static(kotlin.Int;kotlin.Int;kotlin.String){} - local fun local(xx: Int, yy: Int, zz: String): Unit diff --git a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.sig.kt.txt b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.sig.kt.txt index 0887140c049..3ad403ccd43 100644 --- a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.sig.kt.txt @@ -67,15 +67,6 @@ class Derived : DerivedBase, Base { // Public signature debug description: (){} constructor() /* primary */ // CHECK JVM_IR: - // Mangled name: foo.Derived.$$delegate_0 - // Public signature: foo/Derived.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived.$$delegate_0 - // Public signature: foo/Derived.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: Base - // CHECK JVM_IR: // Mangled name: foo.Derived#foo(kotlin.String){}kotlin.String // Public signature: foo/Derived.foo|-5534735991146511619[0] // Public signature debug description: foo(kotlin.String){}kotlin.String @@ -97,15 +88,6 @@ class Derived1 : DerivedBase, Base { // Public signature debug description: (){} constructor() /* primary */ // CHECK JVM_IR: - // Mangled name: foo.Derived1.$$delegate_0 - // Public signature: foo/Derived1.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived1.$$delegate_0 - // Public signature: foo/Derived1.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: Base - // CHECK JVM_IR: // Mangled name: foo.Derived1#foo(kotlin.String){}kotlin.String // Public signature: foo/Derived1.foo|-5534735991146511619[0] // Public signature debug description: foo(kotlin.String){}kotlin.String diff --git a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.sig.kt.txt b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.sig.kt.txt index 90243f54201..f078d11f901 100644 --- a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.sig.kt.txt @@ -104,24 +104,6 @@ class Derived : DerivedBase, Base, Base2 { // Public signature debug description: (){} constructor() /* primary */ // CHECK JVM_IR: - // Mangled name: foo.Derived.$$delegate_0 - // Public signature: foo/Derived.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived.$$delegate_0 - // Public signature: foo/Derived.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: Base - // CHECK JVM_IR: - // Mangled name: foo.Derived.$$delegate_1 - // Public signature: foo/Derived.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived.$$delegate_1 - // Public signature: foo/Derived.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_1: Base2 - // CHECK JVM_IR: // Mangled name: foo.Derived#bar(kotlin.String){}kotlin.String // Public signature: foo/Derived.bar|2000415168157940991[0] // Public signature debug description: bar(kotlin.String){}kotlin.String @@ -153,24 +135,6 @@ class Derived1 : DerivedBase, Base, Base2 { // Public signature debug description: (){} constructor() /* primary */ // CHECK JVM_IR: - // Mangled name: foo.Derived1.$$delegate_0 - // Public signature: foo/Derived1.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived1.$$delegate_0 - // Public signature: foo/Derived1.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: Base - // CHECK JVM_IR: - // Mangled name: foo.Derived1.$$delegate_1 - // Public signature: foo/Derived1.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived1.$$delegate_1 - // Public signature: foo/Derived1.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_1: Base2 - // CHECK JVM_IR: // Mangled name: foo.Derived1#bar(kotlin.String){}kotlin.String // Public signature: foo/Derived1.bar|2000415168157940991[0] // Public signature debug description: bar(kotlin.String){}kotlin.String @@ -202,24 +166,6 @@ class Derived2 : DerivedBase, Base, Base2 { // Public signature debug description: (){} constructor() /* primary */ // CHECK JVM_IR: - // Mangled name: foo.Derived2.$$delegate_0 - // Public signature: foo/Derived2.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived2.$$delegate_0 - // Public signature: foo/Derived2.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: Base - // CHECK JVM_IR: - // Mangled name: foo.Derived2.$$delegate_1 - // Public signature: foo/Derived2.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - // CHECK JS_IR NATIVE: - // Mangled name: foo.Derived2.$$delegate_1 - // Public signature: foo/Derived2.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_1: Base2 - // CHECK JVM_IR: // Mangled name: foo.Derived2#bar(kotlin.String){}kotlin.String // Public signature: foo/Derived2.bar|2000415168157940991[0] // Public signature debug description: bar(kotlin.String){}kotlin.String diff --git a/compiler/testData/ir/irText/declarations/kt35550.sig.kt.txt b/compiler/testData/ir/irText/declarations/kt35550.sig.kt.txt index 080070ffe77..6ee0e042bbe 100644 --- a/compiler/testData/ir/irText/declarations/kt35550.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt35550.sig.kt.txt @@ -7,11 +7,6 @@ class A : I { // Public signature: /A.|605687824747116295[0] // Public signature debug description: (I){} constructor(i: I) /* primary */ - // CHECK: - // Mangled name: A.$$delegate_0 - // Public signature: /A.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: I // CHECK: // Mangled name: A@0:0{0§}id diff --git a/compiler/testData/ir/irText/declarations/localClassWithOverrides.kt b/compiler/testData/ir/irText/declarations/localClassWithOverrides.kt index eaaa542ba59..c4859d89add 100644 --- a/compiler/testData/ir/irText/declarations/localClassWithOverrides.kt +++ b/compiler/testData/ir/irText/declarations/localClassWithOverrides.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 fun outer() { abstract class ALocal { diff --git a/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt b/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt index f29f41c05fb..4ee210c059f 100644 --- a/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt @@ -3,93 +3,4 @@ // Public signature: /outer|1607449560170809066[0] // Public signature debug description: outer(){} fun outer(): Unit - // CHECK: - // Mangled name: #outer(){}.ALocal - // Mangled name for the signature: outer(){} - local abstract class ALocal { - // CHECK: - // Mangled name: #outer(){}.ALocal#(){} - // Mangled name for the signature: outer(){}(){} - constructor() /* primary */ - - // CHECK: - // Mangled name: #outer(){}.ALocal#afun(){} - // Mangled name for the signature: outer(){}afun(){} - abstract fun afun(): Unit - - // CHECK: - // Mangled name: #outer(){}.ALocal{}aval - // Mangled name for the signature: outer(){}{}aval - abstract val aval: Int - // CHECK JVM_IR: - // Mangled name: #outer(){}.ALocal#(){}kotlin.Int - // Mangled name for the signature: outer(){}(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: #outer(){}.ALocal#(){} - // Mangled name for the signature: outer(){}(){} - abstract get - - // CHECK: - // Mangled name: #outer(){}.ALocal{}avar - // Mangled name for the signature: outer(){}{}avar - abstract var avar: Int - // CHECK JVM_IR: - // Mangled name: #outer(){}.ALocal#(){}kotlin.Int - // Mangled name for the signature: outer(){}(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: #outer(){}.ALocal#(){} - // Mangled name for the signature: outer(){}(){} - abstract get - // CHECK: - // Mangled name: #outer(){}.ALocal#(kotlin.Int){} - // Mangled name for the signature: outer(){}(kotlin.Int){} - abstract set - - } - - // CHECK: - // Mangled name: #outer(){}.Local - // Mangled name for the signature: outer(){} - local class Local : ALocal { - // CHECK: - // Mangled name: #outer(){}.Local{}aval - // Mangled name for the signature: outer(){}{}aval - override val aval: Int - field - // CHECK JVM_IR: - // Mangled name: #outer(){}.Local#(){}kotlin.Int - // Mangled name for the signature: outer(){}(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: #outer(){}.Local#(){} - // Mangled name for the signature: outer(){}(){} - override get - - // CHECK: - // Mangled name: #outer(){}.Local{}avar - // Mangled name for the signature: outer(){}{}avar - override var avar: Int - field - // CHECK JVM_IR: - // Mangled name: #outer(){}.Local#(){}kotlin.Int - // Mangled name for the signature: outer(){}(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: #outer(){}.Local#(){} - // Mangled name for the signature: outer(){}(){} - override get - // CHECK: - // Mangled name: #outer(){}.Local#(kotlin.Int){} - // Mangled name for the signature: outer(){}(kotlin.Int){} - override set - - // CHECK: - // Mangled name: #outer(){}.Local#(){} - // Mangled name for the signature: outer(){}(){} - constructor() /* primary */ - - // CHECK: - // Mangled name: #outer(){}.Local#afun(){} - // Mangled name for the signature: outer(){}afun(){} - override fun afun(): Unit - - } diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectMemberInNotExpectClassFir.sig.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectMemberInNotExpectClassFir.sig.kt.txt index e0e454efe9f..85419d3100f 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectMemberInNotExpectClassFir.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectMemberInNotExpectClassFir.sig.kt.txt @@ -13,21 +13,31 @@ class C2 : C1 { // CHECK JVM_IR: // Mangled name: C2#f(){}kotlin.String // Mangled name for the signature: f(){}kotlin.String + // Public signature: /C2.f|9098388873611041001[0] + // Public signature debug description: f(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: C2#f(){} // Mangled name for the signature: f(){} + // Public signature: /C2.f|5316533450599009716[0] + // Public signature debug description: f(){} /* fake */ override fun f(): String // CHECK: // Mangled name: C2{}p // Mangled name for the signature: {}p + // Public signature: /C2.p|6715504260787941082[0] + // Public signature debug description: {}p /* fake */ override val p: Int // CHECK JVM_IR: // Mangled name: C2#(){}kotlin.Int // Mangled name for the signature: (){}kotlin.Int + // Public signature: /C2.p.|5329635969197638839[0] + // Public signature debug description: (){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: C2#(){} // Mangled name for the signature: (){} + // Public signature: /C2.p.|-1162552463316289847[0] + // Public signature debug description: (){} /* fake */ override get(): Int } diff --git a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.sig.kt.txt b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.sig.kt.txt index 7deaa01423f..2d0b4e016f9 100644 --- a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.sig.kt.txt @@ -8,11 +8,6 @@ class Test : IBase { // Public signature debug description: (IBase<1:0>){} constructor(impl: IBase) /* primary */ // CHECK: - // Mangled name: Test.$$delegate_0 - // Public signature: /Test.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: IBase - // CHECK: // Mangled name: Test#foo(kotlin.Int){} // Public signature: /Test.foo|-104159190164110731[0] // Public signature debug description: foo(kotlin.Int){} diff --git a/compiler/testData/ir/irText/declarations/parameters/localFun.kt b/compiler/testData/ir/irText/declarations/parameters/localFun.kt index 32e8c26d579..a9578792b01 100644 --- a/compiler/testData/ir/irText/declarations/parameters/localFun.kt +++ b/compiler/testData/ir/irText/declarations/parameters/localFun.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57434 fun outer() { fun test1(i: Int, j: T) {} diff --git a/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt b/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt index d576a9f1aec..e752dc5e222 100644 --- a/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt @@ -3,23 +3,4 @@ // Public signature: /outer|-6093606212547620330[0] // Public signature debug description: outer(){0§} fun outer(): Unit - // CHECK: - // Mangled name: #outer(){0§}#test1#static(kotlin.Int;0:0){0§} - // Mangled name for the signature: outer(){0§}test1#static(kotlin.Int;0:0){0§} - local fun test1(i: Int, j: T): Unit - - // CHECK: - // Mangled name: #outer(){0§}#test2#static(kotlin.Int;kotlin.String){} - // Mangled name for the signature: outer(){0§}test2#static(kotlin.Int;kotlin.String){} - local fun test2(i: Int, j: String): Unit - - // CHECK: - // Mangled name: #outer(){0§}#test3#static(kotlin.Array...){} - // Mangled name for the signature: outer(){0§}test3#static(kotlin.Array...){} - local fun test3(vararg args: String): Unit - - // CHECK: - // Mangled name: #outer(){0§}#textExt1#static@kotlin.String(kotlin.Int;1:0){} - // Mangled name for the signature: outer(){0§}textExt1#static@kotlin.String(kotlin.Int;1:0){} - local fun String.textExt1(i: Int, j: TT): Unit diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.kt b/compiler/testData/ir/irText/declarations/provideDelegate/local.kt index 5d8f0f79b87..073f214514c 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.kt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57434 class Delegate(val value: String) { operator fun getValue(thisRef: Any?, property: Any?) = value diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt index 3eecc4f7f3f..8d2292912b9 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt @@ -7,7 +7,6 @@ class Delegate { // Public signature: /Delegate.value|1987073854177347439[0] // Public signature debug description: {}value val value: String - field // CHECK JVM_IR: // Mangled name: Delegate#(){}kotlin.String // Public signature: /Delegate.value.|-7202092821145242726[0] @@ -45,7 +44,6 @@ class DelegateProvider { // Public signature: /DelegateProvider.value|1987073854177347439[0] // Public signature debug description: {}value val value: String - field // CHECK JVM_IR: // Mangled name: DelegateProvider#(){}kotlin.String // Public signature: /DelegateProvider.value.|-7202092821145242726[0] @@ -79,11 +77,4 @@ class DelegateProvider { // Public signature: /foo|-1041209573719867811[0] // Public signature debug description: foo(){} fun foo(): Unit - // CHECK JVM_IR: - // Mangled name: #foo(){}##static(){}kotlin.String - // Mangled name for the signature: foo(){}#static(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #foo(){}##static(){} - // Mangled name for the signature: foo(){}#static(){} - local fun (): String diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt index bb5f76b4b00..65945afe12e 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL // WITH_STDLIB -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57434 class MyClass(val value: String) diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt index c759fe4faa7..8c586eb566a 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt @@ -7,7 +7,6 @@ class MyClass { // Public signature: /MyClass.value|1987073854177347439[0] // Public signature debug description: {}value val value: String - field // CHECK JVM_IR: // Mangled name: MyClass#(){}kotlin.String // Public signature: /MyClass.value.|-7202092821145242726[0] @@ -35,21 +34,6 @@ class MyClass { // Public signature: /box|2173511048851971368[0] // Public signature debug description: box(){} fun box(): String - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String##static(){}kotlin.String - // Mangled name for the signature: box(){}kotlin.String#static(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}##static(){} - // Mangled name for the signature: box(){}#static(){} - local fun (): String - - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String##static(){}kotlin.String - // Mangled name for the signature: box(){}kotlin.String#static(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}##static(){} - // Mangled name for the signature: box(){}#static(){} - local fun (): String // CHECK JVM_IR: // Mangled name: #getValue@kotlin.String(kotlin.Any?;kotlin.Any){}kotlin.String diff --git a/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt b/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt index fb1644ddfd8..188fd404085 100644 --- a/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt +++ b/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt @@ -7,8 +7,10 @@ val test1: ErrorType // Mangled name: #(){} // Mangled name for the signature computed from Ir: (){} // Mangled name for the signature computed from Descriptor: (){} - // Public signature: /test1.|-4817139884021780494[0] - // Public signature debug description: (){} + // Public signature by IR: /test1.|3342025465423582211[0] + // Public signature by IR debug description: (){} + // Public signature by Frontend: /test1.|-4817139884021780494[0] + // Public signature by Frontend debug description: (){} get // CHECK: @@ -20,8 +22,10 @@ val test2: ErrorType // Mangled name: #(){} // Mangled name for the signature computed from Ir: (){} // Mangled name for the signature computed from Descriptor: (){} - // Public signature: /test2.|1859255286326922853[0] - // Public signature debug description: (){} + // Public signature by IR: /test2.|-7934828597056891230[0] + // Public signature by IR debug description: (){} + // Public signature by Frontend: /test2.|1859255286326922853[0] + // Public signature by Frontend debug description: (){} get // CHECK: @@ -33,8 +37,10 @@ val test3: ErrorType // Mangled name: #(){} // Mangled name for the signature computed from Ir: (){} // Mangled name for the signature computed from Descriptor: (){} - // Public signature: /test3.|-2322568342617474229[0] - // Public signature debug description: (){} + // Public signature by IR: /test3.|3662345001344960274[0] + // Public signature by IR debug description: (){} + // Public signature by Frontend: /test3.|-2322568342617474229[0] + // Public signature by Frontend debug description: (){} get // CHECK: @@ -46,7 +52,9 @@ val test4: ErrorType // Mangled name: #(){} // Mangled name for the signature computed from Ir: (){} // Mangled name for the signature computed from Descriptor: (){} - // Public signature: /test4.|-5181690683324812065[0] - // Public signature debug description: (){} + // Public signature by IR: /test4.|-8718941795621950036[0] + // Public signature by IR debug description: (){} + // Public signature by Frontend: /test4.|-5181690683324812065[0] + // Public signature by Frontend debug description: (){} get diff --git a/compiler/testData/ir/irText/expressions/argumentMappedWithError.kt b/compiler/testData/ir/irText/expressions/argumentMappedWithError.kt index 15306a5d73e..3ab8ddb3a8b 100644 --- a/compiler/testData/ir/irText/expressions/argumentMappedWithError.kt +++ b/compiler/testData/ir/irText/expressions/argumentMappedWithError.kt @@ -1,7 +1,7 @@ // FIR_IDENTICAL // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57755 +// ^ KT-57755 : Fix computing a mangled name for the `main` function fun Number.convert(): R = TODO() diff --git a/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt b/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt index bd29eaf65cb..f9ae24d0254 100644 --- a/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt @@ -18,8 +18,10 @@ fun foo(arg: Number): Unit // Mangled name: #main(kotlin.Array){} // Mangled name for the signature computed from Ir: main(kotlin.Array){} // Mangled name for the signature computed from Descriptor: main(kotlin.Array){}%argumentMappedWithError.kt -// Public signature: /main|5561668743171252170[0] -// Public signature debug description: main(kotlin.Array){}%argumentMappedWithError.kt +// Public signature by IR: /main|5976701115139892152[0] +// Public signature by IR debug description: main(kotlin.Array){} +// Public signature by Frontend: /main|5561668743171252170[0] +// Public signature by Frontend debug description: main(kotlin.Array){}%argumentMappedWithError.kt // CHECK JS_IR NATIVE: // Mangled name: #main(kotlin.Array){} // Public signature: /main|5976701115139892152[0] diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt index 6b5a18d4b41..9ba3cecee1d 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt @@ -1,11 +1,5 @@ -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57427, KT-57430 - -// KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize (K1), getDeclaringClass (K1), clone (K2) enum class X { diff --git a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt index 08c1b955c4e..55eb2be084e 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt +++ b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 fun interface Foo { fun invoke(): String diff --git a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt index cdab6979ee5..77ce03b782b 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt @@ -34,11 +34,4 @@ fun foo(f: Foo): String // Public signature: /test|6620506149988718649[0] // Public signature debug description: test(){} fun test(): String - // CHECK JVM_IR: - // Mangled name: #test(){}kotlin.String##static(){}kotlin.String - // Mangled name for the signature: test(){}kotlin.String#static(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #test(){}##static(){} - // Mangled name for the signature: test(){}#static(){} - local fun (): String diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt index e91e1138e9a..5036117f789 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - // FILE: implicitNotNullInDestructuringAssignment.kt // NB extension receiver is nullable diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt index 30601644fbd..9abfd74bb7b 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt @@ -6,8 +6,7 @@ operator fun J?.component1(): Int // CHECK JVM_IR: // Mangled name: #component2@J(){}kotlin.Int -// Mangled name for the signature: component2@J(){}kotlin.Int -// Public signature: [ File 'implicitNotNullInDestructuringAssignment.kt' <- /component2|-623550756830644944[0] ] +// Public signature: [ File '/implicitNotNullInDestructuringAssignment.kt' <- /component2|-623550756830644944[0] ] private operator fun J.component2(): Int // CHECK: diff --git a/compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt b/compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt index dc5baffa8fe..5b6489594e5 100644 --- a/compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt +++ b/compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt @@ -1,13 +1,8 @@ // FIR_IDENTICAL // LANGUAGE: +BreakContinueInInlineLambdas -// DUMP_LOCAL_DECLARATION_SIGNATURES -// TARGET_BACKEND: JVM_IR // IGNORE_ERRORS // WITH_STDLIB -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 - inline fun foo(block: () -> Unit) { block() } inline fun bar(block1: () -> Unit, noinline block2: () -> Unit) { diff --git a/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt b/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt index 03a0be4e4e8..80d2ef767d4 100644 --- a/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt @@ -15,68 +15,10 @@ inline fun foo(block: Function0): Unit // Public signature: /test1|4297044443957252634[0] // Public signature debug description: test1(){} fun test1(): Unit - // CHECK: - // Mangled name: #test1(){}##static(){} - // Mangled name for the signature: test1(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test1(){}##static(){} - // Mangled name for the signature: test1(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test1(){}##static(){} - // Mangled name for the signature: test1(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test1(){}##static(){} - // Mangled name for the signature: test1(){}#static(){} - local fun (): Unit // CHECK: // Mangled name: #test2(){} // Public signature: /test2|4279114864133353152[0] // Public signature debug description: test2(){} fun test2(): Unit - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit - - // CHECK: - // Mangled name: #test2(){}##static(){} - // Mangled name for the signature: test2(){}#static(){} - local fun (): Unit diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.kt b/compiler/testData/ir/irText/expressions/multipleThisReferences.kt index 0e5145394fd..47182e6871c 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.kt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 class Outer { open inner class Inner(val x: Int) diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt index 2566ba45af7..106f1762209 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt @@ -7,7 +7,6 @@ class Host { // Public signature: /Host.y|3625903257357557171[0] // Public signature debug description: {}y val y: Int - field // CHECK JVM_IR: // Mangled name: Host#(){}kotlin.Int // Public signature: /Host.y.|-6745575372101973707[0] @@ -33,53 +32,6 @@ class Host { // Public signature: /Host.test|-3179256530033214921[0] // Public signature debug description: test@Outer(){} fun Outer.test(): Inner - // CHECK JVM_IR: - // Mangled name: Host#test@Outer(){}Outer.Inner. - // Mangled name for the signature: test@Outer(){}Outer.Inner - // CHECK JS_IR NATIVE: - // Mangled name: Host#test@Outer(){}. - // Mangled name for the signature: test@Outer(){} - local class : Inner { - // CHECK JVM_IR: - // Mangled name: Host#test@Outer(){}Outer.Inner.{}xx - // Mangled name for the signature: test@Outer(){}Outer.Inner{}xx - // CHECK JS_IR NATIVE: - // Mangled name: Host#test@Outer(){}.{}xx - // Mangled name for the signature: test@Outer(){}{}xx - val xx: Int - field - // CHECK JVM_IR: - // Mangled name: Host#test@Outer(){}Outer.Inner.#(){}kotlin.Int - // Mangled name for the signature: test@Outer(){}Outer.Inner(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: Host#test@Outer(){}.#(){} - // Mangled name for the signature: test@Outer(){}(){} - get - - // CHECK JVM_IR: - // Mangled name: Host#test@Outer(){}Outer.Inner.#(){} - // Mangled name for the signature: test@Outer(){}Outer.Inner(){} - // CHECK JS_IR NATIVE: - // Mangled name: Host#test@Outer(){}.#(){} - // Mangled name for the signature: test@Outer(){}(){} - constructor() /* primary */ - - // CHECK JVM_IR: - // Mangled name: Host#test@Outer(){}Outer.Inner.{}x - // Mangled name for the signature: test@Outer(){}Outer.Inner{}x - // CHECK JS_IR NATIVE: - // Mangled name: Host#test@Outer(){}.{}x - // Mangled name for the signature: test@Outer(){}{}x - /* fake */ override val x: Int - // CHECK JVM_IR: - // Mangled name: Host#test@Outer(){}Outer.Inner.#(){}kotlin.Int - // Mangled name for the signature: test@Outer(){}Outer.Inner(){}kotlin.Int - // CHECK JS_IR NATIVE: - // Mangled name: Host#test@Outer(){}.#(){} - // Mangled name for the signature: test@Outer(){}(){} - /* fake */ override get(): Int - - } } @@ -96,7 +48,6 @@ class Outer { // Public signature: /Outer.Inner.x|-8060530855978347579[0] // Public signature debug description: {}x val x: Int - field // CHECK JVM_IR: // Mangled name: Outer.Inner#(){}kotlin.Int // Public signature: /Outer.Inner.x.|4966956098150895696[0] diff --git a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt index 4f602d8b3aa..a4ad6181acc 100644 --- a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt +++ b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 open class Base(val f1: () -> Any) diff --git a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt index 84ddc96878f..a3b291fcd07 100644 --- a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt @@ -7,7 +7,6 @@ open class Base { // Public signature: /Base.f1|-3626880138223960403[0] // Public signature debug description: {}f1 val f1: Function0 - field // CHECK JVM_IR: // Mangled name: Base#(){}kotlin.Function0 // Public signature: /Base.f1.|8566118280674785385[0] @@ -35,13 +34,6 @@ object Thing : Base { // Public signature: /Thing.|-5645683436151566731[0] // Public signature debug description: (){} private constructor() /* primary */ - // CHECK JVM_IR: - // Mangled name: Thing#(){}##static(){}kotlin.Any - // Mangled name for the signature: (){}#static(){}kotlin.Any - // CHECK JS_IR NATIVE: - // Mangled name: Thing#(){}##static(){} - // Mangled name for the signature: (){}#static(){} - local fun (): Any // CHECK JVM_IR: // Mangled name: Thing#test1(){}Thing diff --git a/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.kt b/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.kt index b040fc4729c..1f7e701c79e 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.kt +++ b/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.kt @@ -2,7 +2,7 @@ // !LANGUAGE: +SuspendConversion // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57755 +// ^ KT-57755: Fix computing a mangled name for the `main` function fun main() { val foo: String.(suspend () -> Unit) -> Unit = {} diff --git a/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt b/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt index afcfd1b3e59..319060375c2 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt @@ -2,8 +2,10 @@ // Mangled name: #main(){} // Mangled name for the signature computed from Ir: main(){} // Mangled name for the signature computed from Descriptor: main(){}%suspendConversionForExtensionFunction.kt -// Public signature: /main|8952895695315889943[0] -// Public signature debug description: main(){}%suspendConversionForExtensionFunction.kt +// Public signature by IR: /main|-4284757841571462650[0] +// Public signature by IR debug description: main(){} +// Public signature by Frontend: /main|8952895695315889943[0] +// Public signature by Frontend debug description: main(){}%suspendConversionForExtensionFunction.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){} // Public signature: /main|-4284757841571462650[0] diff --git a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt index 8dd43e36472..8e460617ce2 100644 --- a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt +++ b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 fun WithCompanion.test() { val test1 = object : WithCompanion(this) {} diff --git a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt index 084e0adf8df..92009798a47 100644 --- a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt @@ -37,25 +37,4 @@ open class WithCompanion { // Public signature: /test|4153745090133876513[0] // Public signature debug description: test@WithCompanion(){} fun WithCompanion.test(): Unit - // CHECK: - // Mangled name: #test@WithCompanion(){}. - // Mangled name for the signature: test@WithCompanion(){} - local class : WithCompanion { - // CHECK: - // Mangled name: #test@WithCompanion(){}.#(){} - // Mangled name for the signature: test@WithCompanion(){}(){} - constructor() /* primary */ - - } - - // CHECK: - // Mangled name: #test@WithCompanion(){}. - // Mangled name for the signature: test@WithCompanion(){} - local class : WithCompanion { - // CHECK: - // Mangled name: #test@WithCompanion(){}.#(){} - // Mangled name for the signature: test@WithCompanion(){}(){} - constructor() /* primary */ - - } diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.kt b/compiler/testData/ir/irText/firProblems/AllCandidates.kt index 946305cb8db..507274289ef 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.kt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.kt @@ -2,9 +2,6 @@ // WITH_STDLIB // FULL_JDK -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - // FILE: OverloadResolutionResultsImpl.java import java.util.*; diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt index 60302a17d7a..ae1d4c9d477 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt @@ -35,7 +35,6 @@ class ResolvedCall { // CHECK JVM_IR: // Mangled name: #allCandidatesResult(kotlin.collections.Collection){0§}OverloadResolutionResultsImpl<0:0?>? -// Mangled name for the signature: allCandidatesResult(kotlin.collections.Collection){0§}OverloadResolutionResultsImpl<0:0?>? -// Public signature: [ File 'AllCandidates.kt' <- /allCandidatesResult|-4417746287859138452[0] ] +// Public signature: [ File '/AllCandidates.kt' <- /allCandidatesResult|-4417746287859138452[0] ] private fun allCandidatesResult(allCandidates: Collection): OverloadResolutionResultsImpl? diff --git a/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.kt b/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.kt index 57f2190928f..f340f75573e 100644 --- a/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.kt +++ b/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430, KT-57778 interface NestedGroupFragment diff --git a/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt index c93d70e1cea..7757ea04a9a 100644 --- a/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt @@ -7,35 +7,17 @@ interface NestedGroupFragment { // CHECK JVM_IR: // Mangled name: #addMavenOptionsGroupFragment(){}#addOptionsGroup. -// Mangled name for the signature: addMavenOptionsGroupFragment(){}#addOptionsGroup. -// Public signature: [ File 'AnonymousAsReturnOfGenericFunction.kt' <- /addMavenOptionsGroupFragment|1068646653174639665[0] ] +// Public signature: [ File '/AnonymousAsReturnOfGenericFunction.kt' <- /addMavenOptionsGroupFragment|1068646653174639665[0] ] // CHECK JS_IR NATIVE: // Mangled name: #addMavenOptionsGroupFragment(){} -// Mangled name for the signature: addMavenOptionsGroupFragment(){} +// Public signature: [ File '/AnonymousAsReturnOfGenericFunction.kt' <- /addMavenOptionsGroupFragment|-4517906277787800298[0] ] private fun addMavenOptionsGroupFragment(): // CHECK JVM_IR: // Mangled name: #addOptionsGroup(){0§}#addOptionsGroup.<0:0> -// Mangled name for the signature: addOptionsGroup(){0§}#addOptionsGroup.<0:0> -// Public signature: [ File 'AnonymousAsReturnOfGenericFunction.kt' <- /addOptionsGroup|1295014906395670038[0] ] +// Public signature: [ File '/AnonymousAsReturnOfGenericFunction.kt' <- /addOptionsGroup|1295014906395670038[0] ] // CHECK JS_IR NATIVE: // Mangled name: #addOptionsGroup(){0§} -// Mangled name for the signature: addOptionsGroup(){0§} +// Public signature: [ File '/AnonymousAsReturnOfGenericFunction.kt' <- /addOptionsGroup|-317275232107674074[0] ] private fun addOptionsGroup(): - // CHECK JVM_IR: - // Mangled name: #addOptionsGroup(){0§}#addOptionsGroup.<1:0>. - // Mangled name for the signature: addOptionsGroup(){0§}#addOptionsGroup.<1:0> - // CHECK JS_IR NATIVE: - // Mangled name: #addOptionsGroup(){0§}. - // Mangled name for the signature: addOptionsGroup(){0§} - local class : NestedGroupFragment { - // CHECK JVM_IR: - // Mangled name: #addOptionsGroup(){0§}#addOptionsGroup.<2:0>.#(){} - // Mangled name for the signature: addOptionsGroup(){0§}#addOptionsGroup.<2:0>(){} - // CHECK JS_IR NATIVE: - // Mangled name: #addOptionsGroup(){0§}.#(){} - // Mangled name for the signature: addOptionsGroup(){0§}(){} - constructor() /* primary */ - - } diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt index 57bfab73ce6..502faef21b3 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt @@ -1,4 +1,5 @@ // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR +// ^ KT-57755: Fix computing a mangled name for the `main` function package foo class A { diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt index 60074f42406..6a8f2f0688b 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt @@ -93,8 +93,10 @@ fun id(t: T): T // Mangled name: foo#main(){} // Mangled name for the signature computed from Ir: main(){} // Mangled name for the signature computed from Descriptor: main(){}%AssignmentOperator.kt -// Public signature: foo/main|7392120756922895329[0] -// Public signature debug description: main(){}%AssignmentOperator.kt +// Public signature by IR: foo/main|-4284757841571462650[0] +// Public signature by IR debug description: main(){} +// Public signature by Frontend: foo/main|7392120756922895329[0] +// Public signature by Frontend debug description: main(){}%AssignmentOperator.kt // CHECK JS_IR NATIVE: // Mangled name: foo#main(){} // Public signature: foo/main|-4284757841571462650[0] diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt index c047e98fc54..ca44a889099 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt @@ -2,9 +2,6 @@ // FULL_JDK // WITH_STDLIB -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - import java.lang.reflect.Type interface ComponentContainer diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt index a16b32147fb..1baf15e34e9 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt @@ -1,12 +1,10 @@ // CHECK: // Mangled name: {}registrationMap -// Mangled name for the signature: {}registrationMap -// Public signature: [ File 'ClashResolutionDescriptor.kt' <- /registrationMap|8184441143918876435[0] ] +// Public signature: [ File '/ClashResolutionDescriptor.kt' <- /registrationMap|8184441143918876435[0] ] private val registrationMap: HashMap // CHECK JVM_IR: // Mangled name: #(){}java.util.HashMap - // Mangled name for the signature: (){}java.util.HashMap - // Public signature: [ File 'ClashResolutionDescriptor.kt' <- /registrationMap.|3119298927482099509[0] ] + // Public signature: [ File '/ClashResolutionDescriptor.kt' <- /registrationMap.|3119298927482099509[0] ] private get // CHECK: diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.sig.kt.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.sig.kt.txt index c976307485d..bb48414d6ae 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.sig.kt.txt @@ -7,11 +7,6 @@ class Impl : A, B { // Public signature: /Impl.|1084968671839233134[0] // Public signature debug description: (Foo.B){} constructor(b: B) /* primary */ - // CHECK: - // Mangled name: Impl.$$delegate_0 - // Public signature: /Impl.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: B // CHECK JVM_IR: // Mangled name: Impl#add(kotlin.String?){}kotlin.Boolean // Public signature: /Impl.add|-2525808668243873976[0] diff --git a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt index 535e28b55c6..740fc2332a5 100644 --- a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt +++ b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt @@ -1,8 +1,3 @@ -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57430 - class Wrapper { private val dummy = object : Bar {} private val bar = object : Bar by dummy {} diff --git a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt index f54a8284ad9..ce0a42eb612 100644 --- a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt @@ -7,50 +7,9 @@ class Wrapper { // Public signature: /Wrapper.dummy|-4015397354973262001[0] // Public signature debug description: {}dummy private val dummy: - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): Wrapper{}dummy. - // Mangled name (compatible mode: true): Wrapper.dummy. - // Mangled name for the signature (compatible mode: false): {}dummy - // Mangled name for the signature (compatible mode: true): - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): Wrapper{}dummy. - // Mangled name (compatible mode: true): Wrapper.dummy. - // Mangled name for the signature (compatible mode: false): {}dummy - // Mangled name for the signature (compatible mode: true): - local class : Bar { - // CHECK: - // Mangled name (compatible mode: false): Wrapper{}dummy.#(){} - // Mangled name (compatible mode: true): Wrapper.dummy.#(){} - // Mangled name for the signature (compatible mode: false): {}dummy(){} - // Mangled name for the signature (compatible mode: true): (){} - constructor() /* primary */ - - // CHECK: - // Mangled name (compatible mode: false): Wrapper{}dummy.{}foo - // Mangled name (compatible mode: true): Wrapper.dummy.{}foo - // Mangled name for the signature (compatible mode: false): {}dummy{}foo - // Mangled name for the signature (compatible mode: true): {}foo - /* fake */ override val foo: String - // CHECK JVM_IR: - // Mangled name (compatible mode: false): Wrapper{}dummy.#(){}kotlin.String - // Mangled name (compatible mode: true): Wrapper.dummy.#(){}kotlin.String - // Mangled name for the signature (compatible mode: false): {}dummy(){}kotlin.String - // Mangled name for the signature (compatible mode: true): (){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): Wrapper{}dummy.#(){} - // Mangled name (compatible mode: true): Wrapper.dummy.#(){} - // Mangled name for the signature (compatible mode: false): {}dummy(){} - // Mangled name for the signature (compatible mode: true): (){} - /* fake */ override get(): String - - } - // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper#(){}Wrapper{}dummy. // Mangled name (compatible mode: true): Wrapper#(){}Wrapper.dummy. - // Mangled name for the signature (compatible mode: false): (){}Wrapper{}dummy. - // Mangled name for the signature (compatible mode: true): (){}Wrapper.dummy. // Public signature: /Wrapper.dummy.|-1011589390871666922[0] // Public signature debug description: (){}Wrapper{}dummy. // CHECK JS_IR NATIVE: @@ -64,56 +23,9 @@ class Wrapper { // Public signature: /Wrapper.bar|-7864284097863469857[0] // Public signature debug description: {}bar private val bar: - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): Wrapper{}bar. - // Mangled name (compatible mode: true): Wrapper.bar. - // Mangled name for the signature (compatible mode: false): {}bar - // Mangled name for the signature (compatible mode: true): - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): Wrapper{}bar. - // Mangled name (compatible mode: true): Wrapper.bar. - // Mangled name for the signature (compatible mode: false): {}bar - // Mangled name for the signature (compatible mode: true): - local class : Bar { - // CHECK: - // Mangled name (compatible mode: false): Wrapper{}bar.#(){} - // Mangled name (compatible mode: true): Wrapper.bar.#(){} - // Mangled name for the signature (compatible mode: false): {}bar(){} - // Mangled name for the signature (compatible mode: true): (){} - constructor() /* primary */ - // CHECK: - // Mangled name (compatible mode: false): Wrapper{}bar..$$delegate_0 - // Mangled name (compatible mode: true): Wrapper.bar..$$delegate_0 - // Mangled name for the signature (compatible mode: false): {}bar - // Mangled name for the signature (compatible mode: true): - private /* final field */ val $$delegate_0: - - // CHECK: - // Mangled name (compatible mode: false): Wrapper{}bar.{}foo - // Mangled name (compatible mode: true): Wrapper.bar.{}foo - // Mangled name for the signature (compatible mode: false): {}bar{}foo - // Mangled name for the signature (compatible mode: true): {}foo - override val foo: String - // CHECK JVM_IR: - // Mangled name (compatible mode: false): Wrapper{}bar.#(){}kotlin.String - // Mangled name (compatible mode: true): Wrapper.bar.#(){}kotlin.String - // Mangled name for the signature (compatible mode: false): {}bar(){}kotlin.String - // Mangled name for the signature (compatible mode: true): (){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): Wrapper{}bar.#(){} - // Mangled name (compatible mode: true): Wrapper.bar.#(){} - // Mangled name for the signature (compatible mode: false): {}bar(){} - // Mangled name for the signature (compatible mode: true): (){} - override get(): String - - } - // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper#(){}Wrapper{}bar. // Mangled name (compatible mode: true): Wrapper#(){}Wrapper.bar. - // Mangled name for the signature (compatible mode: false): (){}Wrapper{}bar. - // Mangled name for the signature (compatible mode: true): (){}Wrapper.bar. // Public signature: /Wrapper.bar.|-6775654681164748186[0] // Public signature debug description: (){}Wrapper{}bar. // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.kt b/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.kt index 4214bb2df41..5e9498307f2 100644 --- a/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.kt +++ b/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.kt @@ -1,10 +1,6 @@ // TARGET_BACKEND: JVM_IR -// DUMP_LOCAL_DECLARATION_SIGNATURES // SKIP_KLIB_TEST -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 - // FILE: Collector.java public class Collector { diff --git a/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt b/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt index ed6ec8e9345..06cced8f107 100644 --- a/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt @@ -8,26 +8,11 @@ class Serializer { // Public signature debug description: (){} constructor() /* primary */ - // CHECK JVM_IR: + // CHECK: // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector. // Public signature: /Serializer.createMessageCollector|2610567021773551177[0] // Public signature debug description: createMessageCollector(){}Serializer#createMessageCollector. private fun createMessageCollector(): - // CHECK: - // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector.. - // Mangled name for the signature: createMessageCollector(){}Serializer#createMessageCollector. - local class : Collector { - // CHECK: - // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector..#(){} - // Mangled name for the signature: createMessageCollector(){}Serializer#createMessageCollector.(){} - constructor() /* primary */ - - // CHECK: - // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector..#flush(){} - // Mangled name for the signature: createMessageCollector(){}Serializer#createMessageCollector.flush(){} - /* fake */ override fun flush(): Unit - - } // CHECK: // Mangled name: Serializer#serialize(){} diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt index 55c2b6fffec..f50d271c75b 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt @@ -4,8 +4,8 @@ // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57788 +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR JS_IR NATIVE +// ^ KT-57788: Fix computing mangled names of types with @EnhancedNullability from IR-based declaration descriptors // KT-61141: ImplicitReceiverStack & PersistentImplicitReceiverStack miss fake overrides `forEach` & `spliterator` // IGNORE_BACKEND: NATIVE diff --git a/compiler/testData/ir/irText/firProblems/TypeParameterInClashingAccessor.sig.kt.txt b/compiler/testData/ir/irText/firProblems/TypeParameterInClashingAccessor.sig.kt.txt index 9b27baae5ce..8b15a9c7431 100644 --- a/compiler/testData/ir/irText/firProblems/TypeParameterInClashingAccessor.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/TypeParameterInClashingAccessor.sig.kt.txt @@ -41,18 +41,16 @@ open class B { // CHECK: // Mangled name: D -// Public signature: [ File '' <- /D|null[0] ] +// Public signature: [ File '/test.kt' <- /D|null[0] ] private class D : C { // CHECK: // Mangled name: D#(A){} - // Public signature: /D.|-3166999336802030902[0] - // Public signature debug description: (A){} + // Public signature: [ File '/test.kt' <- /D.|-3166999336802030902[0] ] constructor(a: A) /* primary */ // CHECK: // Mangled name: D#getA(){0§}0:0 - // Public signature: /D.getA|6265629995120627543[0] - // Public signature debug description: getA(){0§}0:0 + // Public signature: [ File '/test.kt' <- /D.getA|6265629995120627543[0] ] /* fake */ override fun getA(): T } diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt index cb9bb3a8926..77ff35dca0c 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt @@ -2,9 +2,6 @@ // WITH_STDLIB // FULL_JDK -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - import java.io.Reader import java.io.StringReader diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt index e041f28acf2..db136b01bea 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt @@ -6,18 +6,15 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char): Unit // CHECK JVM_IR: // Mangled name: #nextChar@java.io.Reader(){}kotlin.Char? -// Mangled name for the signature: nextChar@java.io.Reader(){}kotlin.Char? -// Public signature: [ File 'coercionToUnitForNestedWhen.kt' <- /nextChar|8697099457416866690[0] ] +// Public signature: [ File '/coercionToUnitForNestedWhen.kt' <- /nextChar|8697099457416866690[0] ] private fun Reader.nextChar(): Char? // CHECK: // Mangled name: {}BACKSLASH -// Mangled name for the signature: {}BACKSLASH -// Public signature: [ File 'coercionToUnitForNestedWhen.kt' <- /BACKSLASH|9213821134505379379[0] ] +// Public signature: [ File '/coercionToUnitForNestedWhen.kt' <- /BACKSLASH|9213821134505379379[0] ] private const val BACKSLASH: Char // CHECK JVM_IR: // Mangled name: #(){}kotlin.Char - // Mangled name for the signature: (){}kotlin.Char - // Public signature: [ File 'coercionToUnitForNestedWhen.kt' <- /BACKSLASH.|7174062972088453102[0] ] + // Public signature: [ File '/coercionToUnitForNestedWhen.kt' <- /BACKSLASH.|7174062972088453102[0] ] private get diff --git a/compiler/testData/ir/irText/firProblems/kt55458.kt b/compiler/testData/ir/irText/firProblems/kt55458.kt index 7ca59c26584..044729809cc 100644 --- a/compiler/testData/ir/irText/firProblems/kt55458.kt +++ b/compiler/testData/ir/irText/firProblems/kt55458.kt @@ -2,7 +2,7 @@ // IGNORE_BACKEND_K1: JS_IR // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57755 +// ^ KT-57755: Fix computing a mangled name for the `main` function // KT-61141: `println (message: kotlin.Any?)` instead of `println (message: kotlin.Int)` // IGNORE_BACKEND_K1: NATIVE diff --git a/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt b/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt index c69fd051bc9..3ea515f1def 100644 --- a/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt @@ -2,8 +2,10 @@ // Mangled name: #main(){} // Mangled name for the signature computed from Ir: main(){} // Mangled name for the signature computed from Descriptor: main(){}%kt55458.kt -// Public signature: /main|-1793468409000137506[0] -// Public signature debug description: main(){}%kt55458.kt +// Public signature by IR: /main|-4284757841571462650[0] +// Public signature by IR debug description: main(){} +// Public signature by Frontend: /main|-1793468409000137506[0] +// Public signature by Frontend debug description: main(){}%kt55458.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){} // Public signature: /main|-4284757841571462650[0] diff --git a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.kt b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.kt index 5df311129fb..5e09f6fd22f 100644 --- a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.kt +++ b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.kt @@ -1,14 +1,6 @@ // WITH_STDLIB -// DUMP_LOCAL_DECLARATION_SIGNATURES -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 -// KT-50774 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57427 - -// KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone class Wrapper(var baseUrl: String) diff --git a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt index 6dca37d20e3..57cc07b77bc 100644 --- a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt @@ -7,7 +7,6 @@ class Wrapper { // Public signature: /Wrapper.baseUrl|8725729733335673706[0] // Public signature debug description: {}baseUrl var baseUrl: String - field // CHECK JVM_IR: // Mangled name: Wrapper#(){}kotlin.String // Public signature: /Wrapper.baseUrl.|-3814925406424189958[0] @@ -44,11 +43,6 @@ enum class ConfigurationParameter : Enum { // Mangled name: ConfigurationParameter.BASE_URL // Public signature: /ConfigurationParameter.BASE_URL|null[0] BASE_URL - // CHECK: - // Mangled name: ConfigurationParameter##static(kotlin.String;Wrapper){} - // Mangled name for the signature computed from Ir: #static(kotlin.String;Wrapper){} - // Mangled name for the signature computed from Descriptor: (){}#static(kotlin.String;Wrapper){} - local fun (value: String, nc: Wrapper): Unit // CHECK JVM_IR: // Mangled name: ConfigurationParameter#valueOf#static(kotlin.String){}ConfigurationParameter diff --git a/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.kt b/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.kt index 555d8ff1179..2d40243e695 100644 --- a/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.kt +++ b/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 fun box(): String { return object { diff --git a/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt b/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt index b008abcd4e7..3470fe4a33c 100644 --- a/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt @@ -7,69 +7,4 @@ // Public signature: /box|2173511048851971368[0] // Public signature debug description: box(){} fun box(): String - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String. - // Mangled name for the signature: box(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}. - // Mangled name for the signature: box(){} - local class { - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String.{}a - // Mangled name for the signature: box(){}kotlin.String{}a - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}.{}a - // Mangled name for the signature: box(){}{}a - val a: A - field - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String.#(){}#box..A - // Mangled name for the signature: box(){}kotlin.String(){}#box..A - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}.#(){} - // Mangled name for the signature: box(){}(){} - get - - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String..A - // Mangled name for the signature: box(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}..A - // Mangled name for the signature: box(){} - local inner class A { - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String..A{}ok - // Mangled name for the signature: box(){}kotlin.String{}ok - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}..A{}ok - // Mangled name for the signature: box(){}{}ok - val ok: String - field - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String..A#(){}kotlin.String - // Mangled name for the signature: box(){}kotlin.String(){}kotlin.String - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}..A#(){} - // Mangled name for the signature: box(){}(){} - get - - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String..A#(kotlin.String){} - // Mangled name for the signature: box(){}kotlin.String(kotlin.String){} - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}..A#(kotlin.String){} - // Mangled name for the signature: box(){}(kotlin.String){} - constructor(ok: String) /* primary */ - - } - - // CHECK JVM_IR: - // Mangled name: #box(){}kotlin.String.#(){} - // Mangled name for the signature: box(){}kotlin.String(){} - // CHECK JS_IR NATIVE: - // Mangled name: #box(){}.#(){} - // Mangled name for the signature: box(){}(){} - constructor() /* primary */ - - } diff --git a/compiler/testData/ir/irText/firProblems/localCompanion.kt b/compiler/testData/ir/irText/firProblems/localCompanion.kt index f39107e0dad..e6185a295f2 100644 --- a/compiler/testData/ir/irText/firProblems/localCompanion.kt +++ b/compiler/testData/ir/irText/firProblems/localCompanion.kt @@ -1,8 +1,7 @@ // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57755, KT-57430 +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR +// ^ KT-57755: Fix computing a mangled name for the `main` function fun main() { class Foo { diff --git a/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt b/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt index 01875ecafb3..9beb7f3e4fc 100644 --- a/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt @@ -2,57 +2,13 @@ // Mangled name: #main(){} // Mangled name for the signature computed from Ir: main(){} // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt -// Public signature: /main|1798078925369608927[0] -// Public signature debug description: main(){}%localCompanion.kt +// Public signature by IR: /main|-4284757841571462650[0] +// Public signature by IR debug description: main(){} +// Public signature by Frontend: /main|1798078925369608927[0] +// Public signature by Frontend debug description: main(){}%localCompanion.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){} // Public signature: /main|-4284757841571462650[0] // Public signature debug description: main(){} fun main(): Unit - // CHECK JVM_IR: - // Mangled name: #main(){}.Foo - // Mangled name for the signature computed from Ir: main(){} - // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt - // CHECK JS_IR NATIVE: - // Mangled name: #main(){}.Foo - // Mangled name for the signature: main(){} - local class Foo { - // CHECK JVM_IR: - // Mangled name: #main(){}.Foo.Companion - // Mangled name for the signature computed from Ir: main(){} - // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt - // CHECK JS_IR NATIVE: - // Mangled name: #main(){}.Foo.Companion - // Mangled name for the signature: main(){} - local companion object Companion { - // CHECK JVM_IR: - // Mangled name: #main(){}.Foo.Companion#(){} - // Mangled name for the signature computed from Ir: main(){}(){} - // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt(){} - // CHECK JS_IR NATIVE: - // Mangled name: #main(){}.Foo.Companion#(){} - // Mangled name for the signature: main(){}(){} - private constructor() /* primary */ - - // CHECK JVM_IR: - // Mangled name: #main(){}.Foo.Companion#bar(){} - // Mangled name for the signature computed from Ir: main(){}bar(){} - // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.ktbar(){} - // CHECK JS_IR NATIVE: - // Mangled name: #main(){}.Foo.Companion#bar(){} - // Mangled name for the signature: main(){}bar(){} - fun bar(): Unit - - } - - // CHECK JVM_IR: - // Mangled name: #main(){}.Foo#(){} - // Mangled name for the signature computed from Ir: main(){}(){} - // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt(){} - // CHECK JS_IR NATIVE: - // Mangled name: #main(){}.Foo#(){} - // Mangled name for the signature: main(){}(){} - constructor() /* primary */ - - } diff --git a/compiler/testData/ir/irText/firProblems/readWriteProperty.kt b/compiler/testData/ir/irText/firProblems/readWriteProperty.kt index 95a47390ace..c0a9d93007b 100644 --- a/compiler/testData/ir/irText/firProblems/readWriteProperty.kt +++ b/compiler/testData/ir/irText/firProblems/readWriteProperty.kt @@ -1,10 +1,6 @@ // FIR_IDENTICAL // WITH_STDLIB // WITH_REFLECT -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57430 import kotlin.properties.ReadWriteProperty import kotlin.reflect.KClass diff --git a/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt b/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt index 0d0272a899b..54e82040dd9 100644 --- a/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt @@ -7,7 +7,6 @@ class IdeWizard { // Public signature: /IdeWizard.projectTemplate|1011078309052725595[0] // Public signature debug description: {}projectTemplate var projectTemplate: Int? /* by */ - field // CHECK JVM_IR: // Mangled name: IdeWizard#(){}kotlin.Int? // Public signature: /IdeWizard.projectTemplate.|-8817473698570649998[0] @@ -38,38 +37,6 @@ class IdeWizard { // Public signature: /IdeWizard.setting|2630265268614068431[0] // Public signature debug description: setting(SettingReference<0:0,0:1>){0§;1§>} private fun > setting(reference: SettingReference): - // CHECK JVM_IR: - // Mangled name: IdeWizard#setting(SettingReference<1:0,1:1>){0§;1§>}IdeWizard#setting.<1:0,1:1>. - // Mangled name for the signature: setting(SettingReference<1:0,1:1>){0§;1§>}IdeWizard#setting.<1:0,1:1> - // CHECK JS_IR NATIVE: - // Mangled name: IdeWizard#setting(SettingReference<1:0,1:1>){0§;1§>}. - // Mangled name for the signature: setting(SettingReference<1:0,1:1>){0§;1§>} - local class : ReadWriteProperty { - // CHECK JVM_IR: - // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>.#(){} - // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>(){} - // CHECK JS_IR NATIVE: - // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}.#(){} - // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}(){} - constructor() /* primary */ - - // CHECK JVM_IR: - // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>.#getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){}2:0? - // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){}2:0? - // CHECK JS_IR NATIVE: - // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}.#getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){} - // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){} - override operator fun getValue(thisRef: Any?, property: KProperty<*>): V? - - // CHECK JVM_IR: - // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>.#setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} - // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} - // CHECK JS_IR NATIVE: - // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}.#setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} - // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} - override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: V?): Unit - - } } @@ -82,7 +49,6 @@ class SettingReference> { // Public signature: /SettingReference.t|-8767999791664836944[0] // Public signature debug description: {}t var t: T - field // CHECK JVM_IR: // Mangled name: SettingReference#(){}1:1 // Public signature: /SettingReference.t.|3876475218778608787[0] @@ -103,7 +69,6 @@ class SettingReference> { // Public signature: /SettingReference.v|138869847852828796[0] // Public signature debug description: {}v var v: V - field // CHECK JVM_IR: // Mangled name: SettingReference#(){}1:0 // Public signature: /SettingReference.v.|-6358452650346304910[0] @@ -136,7 +101,6 @@ class SettingType { // Public signature: /SettingType.type|-6051055617123801408[0] // Public signature debug description: {}type val type: KClass - field // CHECK JVM_IR: // Mangled name: SettingType#(){}kotlin.reflect.KClass // Public signature: /SettingType.type.|-782685829818054763[0] diff --git a/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.kt b/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.kt index 5e62091ffae..a3e5ba744e0 100644 --- a/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.kt +++ b/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.kt @@ -2,9 +2,6 @@ // SKIP_KLIB_TEST // WITH_REFLECT -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - import kotlin.reflect.KProperty1 private typealias PropAlias = KProperty1? diff --git a/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.sig.kt.txt b/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.sig.kt.txt index f84d14b1be3..4e5c1fbb5bd 100644 --- a/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/reflectGetOnNullableTypeAlias.sig.kt.txt @@ -35,9 +35,7 @@ class Foo { // Public signature debug description: box(){} fun box(): String -// CHECK JVM_IR: -// Mangled name: PropAlias -// Public signature: [ File 'reflectGetOnNullableTypeAlias.kt' <- /PropAlias|null[0] ] -// CHECK JS_IR NATIVE: +// CHECK: // Mangled name: PropAlias +// Public signature: [ File '/reflectGetOnNullableTypeAlias.kt' <- /PropAlias|null[0] ] private typealias PropAlias = KProperty1? diff --git a/compiler/testData/ir/irText/firProblems/timesInBuilder.kt b/compiler/testData/ir/irText/firProblems/timesInBuilder.kt index cdf9901421b..4cb42dd69b3 100644 --- a/compiler/testData/ir/irText/firProblems/timesInBuilder.kt +++ b/compiler/testData/ir/irText/firProblems/timesInBuilder.kt @@ -1,8 +1,5 @@ // WITH_STDLIB -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - private fun test(x: Long) = countIssues { +(spentTime lessEq 2 * 60) diff --git a/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt b/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt index f5fbd0c9abe..cde8faa00dc 100644 --- a/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt @@ -70,13 +70,9 @@ class Expression { } -// CHECK JVM_IR: +// CHECK: // Mangled name: #countIssues(kotlin.Function1){} -// Mangled name for the signature: countIssues(kotlin.Function1){} -// Public signature: [ File 'timesInBuilder.kt' <- /countIssues|-3006686104129982000[0] ] -// CHECK JS_IR NATIVE: -// Mangled name: #countIssues(kotlin.Function1){} -// Mangled name for the signature: countIssues(kotlin.Function1){} +// Public signature: [ File '/timesInBuilder.kt' <- /countIssues|-3006686104129982000[0] ] private fun countIssues(restrictionsBuilder: @ExtensionFunctionType Function1): Unit // CHECK JVM_IR: @@ -119,12 +115,8 @@ infix fun > Column.lessEq(t: T): Expression // Public signature debug description: select@Column(0:0;0:0){0§>} fun > Column.select(t: T, r: T): Expression -// CHECK JVM_IR: +// CHECK: // Mangled name: #test(kotlin.Long){} -// Mangled name for the signature: test(kotlin.Long){} -// Public signature: [ File 'timesInBuilder.kt' <- /test|-2956403500052581138[0] ] -// CHECK JS_IR NATIVE: -// Mangled name: #test(kotlin.Long){} -// Mangled name for the signature: test(kotlin.Long){} +// Public signature: [ File '/timesInBuilder.kt' <- /test|-2956403500052581138[0] ] private fun test(x: Long): Unit diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.kt b/compiler/testData/ir/irText/lambdas/anonymousFunction.kt index 99b78e8cd53..0862c86e342 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.kt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.kt @@ -1,8 +1,4 @@ // FIR_IDENTICAL // WITH_STDLIB -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 val anonymous = fun() { println() } diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt index 05d721d36d2..e72f6e1174d 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt @@ -3,19 +3,6 @@ // Public signature: /anonymous|-1633601112294415930[0] // Public signature debug description: {}anonymous val anonymous: Function0 - field - // CHECK JVM_IR: - // Mangled name (compatible mode: false): {}anonymous##static(){} - // Mangled name (compatible mode: true): anonymous##static(){} - // Mangled name for the signature (compatible mode: false): {}anonymous#static(){} - // Mangled name for the signature (compatible mode: true): #static(){} - // CHECK JS_IR NATIVE: - // Mangled name (compatible mode: false): {}anonymous##static(){} - // Mangled name (compatible mode: true): anonymous##static(){} - // Mangled name for the signature (compatible mode: false): {}anonymous#static(){} - // Mangled name for the signature (compatible mode: true): #static(){} - local fun (): Unit - // CHECK JVM_IR: // Mangled name: #(){}kotlin.Function0 // Public signature: /anonymous.|4047260013555274752[0] diff --git a/compiler/testData/ir/irText/singletons/enumEntry.kt b/compiler/testData/ir/irText/singletons/enumEntry.kt index 40b6b38bc1a..caf78b889bd 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.kt +++ b/compiler/testData/ir/irText/singletons/enumEntry.kt @@ -1,11 +1,5 @@ -// IGNORE_BACKEND: JS_IR -// IGNORE_BACKEND: JS_IR_ES6 - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57775, KT-57430 - -// KT-61141: absent enum fake_overrides: finalize, getDeclaringClass, clone -// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS_IR JS_IR_ES6 NATIVE +// ^ KT-61141: absent enum fake_overrides: finalize (K1), getDeclaringClass (K1), clone (K2) enum class Z { ENTRY { diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt index 29dacd00944..15571b77e17 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt @@ -1,8 +1,5 @@ // WITH_STDLIB -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57778 - import kotlin.experimental.ExperimentalTypeInference @OptIn(ExperimentalTypeInference::class) diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt index 1442451000c..3023d3be3fa 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt @@ -132,20 +132,18 @@ interface SendChannel { // CHECK JVM_IR: // Mangled name: #asChannel@CoroutineScope(Flow<*>){}ReceiveChannel -// Mangled name for the signature: asChannel@CoroutineScope(Flow<*>){}ReceiveChannel -// Public signature: [ File 'castsInsideCoroutineInference.kt' <- /asChannel|-3549601571428075944[0] ] +// Public signature: [ File '/castsInsideCoroutineInference.kt' <- /asChannel|-3549601571428075944[0] ] // CHECK JS_IR NATIVE: // Mangled name: #asChannel@CoroutineScope(Flow<*>){} -// Mangled name for the signature: asChannel@CoroutineScope(Flow<*>){} +// Public signature: [ File '/castsInsideCoroutineInference.kt' <- /asChannel|-2163265367975014424[0] ] private fun CoroutineScope.asChannel(flow: Flow<*>): ReceiveChannel // CHECK JVM_IR: // Mangled name: #asFairChannel@CoroutineScope(Flow<*>){}ReceiveChannel -// Mangled name for the signature: asFairChannel@CoroutineScope(Flow<*>){}ReceiveChannel -// Public signature: [ File 'castsInsideCoroutineInference.kt' <- /asFairChannel|-8739457176543595950[0] ] +// Public signature: [ File '/castsInsideCoroutineInference.kt' <- /asFairChannel|-8739457176543595950[0] ] // CHECK JS_IR NATIVE: // Mangled name: #asFairChannel@CoroutineScope(Flow<*>){} -// Mangled name for the signature: asFairChannel@CoroutineScope(Flow<*>){} +// Public signature: [ File '/castsInsideCoroutineInference.kt' <- /asFairChannel|-1848542361619040771[0] ] private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel // CHECK: diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.kt b/compiler/testData/ir/irText/types/definitelyNonNull.kt index 9e52a3b8688..a2099972ff3 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNull.kt +++ b/compiler/testData/ir/irText/types/definitelyNonNull.kt @@ -2,7 +2,7 @@ //!LANGUAGE: +DefinitelyNonNullableTypes // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57755 +// ^ KT-57755: Fix computing a mangled name for the `main` function fun elvisLike(x: T, y: T & Any): T & Any = x ?: y diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt b/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt index e3627a0dfff..a04c3ee696e 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt +++ b/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt @@ -12,8 +12,10 @@ fun elvisLike(x: T, y: (T & Any)): (T & Any) // Mangled name: #main(){} // Mangled name for the signature computed from Ir: main(){} // Mangled name for the signature computed from Descriptor: main(){}%definitelyNonNull.kt -// Public signature: /main|536315142565162436[0] -// Public signature debug description: main(){}%definitelyNonNull.kt +// Public signature by IR: /main|-4284757841571462650[0] +// Public signature by IR debug description: main(){} +// Public signature by Frontend: /main|536315142565162436[0] +// Public signature by Frontend debug description: main(){}%definitelyNonNull.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){} // Public signature: /main|-4284757841571462650[0] diff --git a/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.kt b/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.kt index e363fd86295..a6f6aaa9d8e 100644 --- a/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.kt +++ b/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.kt @@ -1,9 +1,5 @@ // FIR_IDENTICAL //!LANGUAGE: +DefinitelyNonNullableTypes -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 fun (T & Any).foo() {} fun foo(l: (T & Any) -> Unit) {} diff --git a/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt b/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt index 522c59077a3..dfd4c911332 100644 --- a/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt +++ b/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt @@ -3,10 +3,6 @@ // Public signature: /box|2173511048851971368[0] // Public signature debug description: box(){} fun box(): Unit - // CHECK: - // Mangled name: #box(){}##static(kotlin.String){} - // Mangled name for the signature: box(){}#static(kotlin.String){} - local fun (it: String): Unit // CHECK: // Mangled name: #foo@0:0(){0§} diff --git a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt index 1c76d4292f2..728ad67678a 100644 --- a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt +++ b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt @@ -2,7 +2,7 @@ // WITH_STDLIB // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^KT-57755 +// ^KT-57755: Fix computing a mangled name for the `main` function class Foo(var x: T) diff --git a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt index c43a24a1162..a2b362480b5 100644 --- a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt +++ b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt @@ -44,8 +44,10 @@ fun foo(x: MutableList): Foo // Mangled name: #main(){} // Mangled name for the signature computed from Ir: main(){} // Mangled name for the signature computed from Descriptor: main(){}%dontLeaveStubTypesInSetter.kt -// Public signature: /main|-2535684763027974809[0] -// Public signature debug description: main(){}%dontLeaveStubTypesInSetter.kt +// Public signature by IR: /main|-4284757841571462650[0] +// Public signature by IR debug description: main(){} +// Public signature by Frontend: /main|-2535684763027974809[0] +// Public signature by Frontend debug description: main(){}%dontLeaveStubTypesInSetter.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){} // Public signature: /main|-4284757841571462650[0] diff --git a/compiler/testData/ir/irText/types/javaWildcardType.sig.kt.txt b/compiler/testData/ir/irText/types/javaWildcardType.sig.kt.txt index 9d0fc8bd8b9..d6d22495793 100644 --- a/compiler/testData/ir/irText/types/javaWildcardType.sig.kt.txt +++ b/compiler/testData/ir/irText/types/javaWildcardType.sig.kt.txt @@ -7,16 +7,6 @@ class C : J, K { // Public signature: /C.|-2567074436149559695[0] // Public signature debug description: (J;K){} constructor(j: J, k: K) /* primary */ - // CHECK: - // Mangled name: C.$$delegate_0 - // Public signature: /C.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: J - // CHECK: - // Mangled name: C.$$delegate_1 - // Public signature: /C.$$delegate_1|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_1: K // CHECK JVM_IR: // Mangled name: C#jf1(){}kotlin.collections.MutableCollection? // Public signature: /C.jf1|-387990976967063904[0] diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnInterfaceDelegation.sig.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnInterfaceDelegation.sig.kt.txt index e0111565bf4..e16acba016e 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnInterfaceDelegation.sig.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnInterfaceDelegation.sig.kt.txt @@ -11,11 +11,6 @@ class Delegated : IFoo { // Public signature: /Delegated.|-5645683436151566731[0] // Public signature debug description: (){} constructor() /* primary */ - // CHECK: - // Mangled name: Delegated.$$delegate_0 - // Public signature: /Delegated.$$delegate_0|-7286425919675154353[0] - // Public signature debug description: - private /* final field */ val $$delegate_0: Derived // CHECK JVM_IR: // Mangled name: Delegated#foo(){}kotlin.String // Public signature: /Delegated.foo|485335955883620819[0] diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt index 5fa160bbea3..8b647101fcf 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.kt @@ -1,9 +1,5 @@ // TARGET_BACKEND: JVM // FIR_IDENTICAL -// DUMP_LOCAL_DECLARATION_SIGNATURES - -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57428 // FILE: nnStringVsTConstrained.kt fun useTConstrained(xs: Array, fn: () -> T) = fn() diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt index 6fe90180ef3..9e313a50196 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt @@ -3,10 +3,6 @@ // Public signature: /testWithNullCheck|7420857220126640924[0] // Public signature debug description: testWithNullCheck(kotlin.Array){} fun testWithNullCheck(xs: Array): Unit - // CHECK JVM_IR: - // Mangled name: #testWithNullCheck(kotlin.Array){}##static(){}kotlin.String - // Mangled name for the signature: testWithNullCheck(kotlin.Array){}#static(){}kotlin.String - local fun (): String // CHECK JVM_IR: // Mangled name: #useTConstrained(kotlin.Array<0:0>;kotlin.Function0<0:0>){0§}0:0 diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt index a294b579d1a..b8e30779716 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.test.backend.handlers import com.intellij.rt.execution.junit.FileComparisonFailure import org.jetbrains.kotlin.ir.util.parents +import org.jetbrains.kotlin.backend.common.serialization.signature.PublicIdSignatureComputer import org.jetbrains.kotlin.backend.jvm.JvmSymbols import org.jetbrains.kotlin.backend.jvm.ir.hasPlatformDependent import org.jetbrains.kotlin.builtins.StandardNames @@ -20,6 +21,7 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.interpreter.intrinsicConstEvaluationAnnotation +import org.jetbrains.kotlin.ir.overrides.isEffectivelyPrivate import org.jetbrains.kotlin.ir.types.classOrNull import org.jetbrains.kotlin.ir.types.isUnit import org.jetbrains.kotlin.ir.util.* @@ -29,8 +31,8 @@ import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.StandardClassIds import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.backend.codegenSuppressionChecker +import org.jetbrains.kotlin.test.backend.handlers.ComputedSignature.ComputedBy import org.jetbrains.kotlin.test.backend.ir.IrBackendInput -import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_LOCAL_DECLARATION_SIGNATURES import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_SIGNATURES import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.MUTE_SIGNATURE_COMPARISON_K2 import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.SKIP_SIGNATURE_DUMP @@ -58,7 +60,6 @@ private const val CHECK_MARKER = "// CHECK" * Other useful directives: * - [MUTE_SIGNATURE_COMPARISON_K2] can be used for muting the comparison result on the K2 frontend. The comparison will * still be performed, and if it succeeds, the test will fail with a message reminding you to unmute it. - * - [DUMP_LOCAL_DECLARATION_SIGNATURES] enables printing signatures for local functions and classes. * * Since mangled names and signatures may be different depending on the backend, in order to reduce the number * of expectation files, this handler uses `// CHECK` blocks to compare the dump with an expectation in a smarter way than @@ -143,10 +144,7 @@ class IrMangledNameAndSignatureDumpHandler( ), printFilePath = false, printFakeOverridesStrategy = FakeOverridesStrategy.ALL_EXCEPT_ANY, - bodyPrintingStrategy = if (DUMP_LOCAL_DECLARATION_SIGNATURES in module.directives) - BodyPrintingStrategy.PRINT_ONLY_LOCAL_CLASSES_AND_FUNCTIONS - else - BodyPrintingStrategy.NO_BODIES, + bodyPrintingStrategy = BodyPrintingStrategy.NO_BODIES, printUnitReturnType = true, stableOrder = true, ), @@ -192,6 +190,8 @@ class IrMangledNameAndSignatureDumpHandler( it.dispatchReceiverParameter?.type?.classOrNull == irBuiltIns.enumClass && it.name in HIDDEN_ENUM_METHOD_NAMES } + private val signatureComposer = PublicIdSignatureComputer(irMangler) + private fun Printer.printCheckMarkerForNewDeclaration() { printlnCheckMarker( when (targetBackend) { @@ -207,42 +207,54 @@ class IrMangledNameAndSignatureDumpHandler( val symbol = declaration.symbol + // Can dump mangled names and signatures (both computed by the FE) only if + // this is effectively a non-private declaration. + val canDumpMangledNameAndSignaturesComputedByFrontend = + (declaration as? IrDeclarationWithVisibility)?.isEffectivelyPrivate() != true + + val signatures = mutableListOf() val fullMangledNames = mutableListOf() val signatureMangledNames = mutableListOf() - irMangler.addFullMangledNameTo(fullMangledNames, declaration) - irMangler.addSignatureMangledNameTo(signatureMangledNames, declaration) - descriptorMangler.addSignatureMangledNameTo(signatureMangledNames, symbol.descriptor) - ((declaration as? IrMetadataSourceOwner)?.metadata as? FirMetadataSource)?.fir?.let { - firMangler?.addSignatureMangledNameTo( - signatureMangledNames, - it + signatureComposer.inFile(declaration.fileOrNull?.symbol) { + addSignatureTo( + signatures, + signatureComposer.computeSignature(declaration), + ComputedBy.IR, + isPublic = true ) } - fun IdSignature.print(name: String) { - val commentPrefix = "// " - // N.B. We do use IdSignatureRenderer.LEGACY because it renders public signatures with hashes which are - // computed from mangled names. So no real need in testing IdSignatureRenderer.DEFAULT which renders mangled names - // instead of hashes. - println(commentPrefix, name, ": ", render(IdSignatureRenderer.LEGACY)) - asPublic()?.description?.let { - println(commentPrefix, name, " debug description: ", it) + irMangler.addFullMangledNameTo(fullMangledNames, declaration) + irMangler.addSignatureMangledNameTo(signatureMangledNames, declaration) + + if (canDumpMangledNameAndSignaturesComputedByFrontend) { + addSignatureTo(signatures, symbol.signature, ComputedBy.FE, isPublic = true) + addSignatureTo(signatures, symbol.privateSignature, ComputedBy.FE, isPublic = false) + + descriptorMangler.addSignatureMangledNameTo(signatureMangledNames, symbol.descriptor) + + ((declaration as? IrMetadataSourceOwner)?.metadata as? FirMetadataSource)?.fir?.let { + firMangler?.addSignatureMangledNameTo( + signatureMangledNames, + it + ) } } fun printActualMangledNamesAndSignatures() { printMangledNames(fullMangledNames, prefix = "Mangled name") - // Signature mangled names computed from descriptors, IR and FIR must be all equal to the signature description, which - // we already print (see the IdSignature.print function above). - // If this is not the case, print them separately. - if (signatureMangledNames.any { it.value != symbol.signature?.asPublic()?.description.orEmpty() }) { - printMangledNames(signatureMangledNames, prefix = "Mangled name for the signature") + if (canDumpMangledNameAndSignaturesComputedByFrontend) { + // Signature mangled names computed from descriptors, IR and FIR of declarations that are not + // effectively private must be all equal to the signature description, which we already print + // (see the printSignatures() function below). If this is not the case, print them separately. + if (signatureMangledNames.any { it.value != symbol.signature?.asPublic()?.description.orEmpty() }) { + printMangledNames(signatureMangledNames, prefix = "Mangled name for the signature") + } } - symbol.signature?.print("Public signature") - symbol.privateSignature?.print("Private signature") + printSignatures(signatures) } var printedActualMangledNameAndSignature = false @@ -281,6 +293,13 @@ class IrMangledNameAndSignatureDumpHandler( if (element !is IrDeclaration) return true if (element is IrAnonymousInitializer) return false + // Don't print synthetic property-less fields for delegates and context receivers. Ex: + // class Foo { + // private /* final field */ val contextReceiverField0: ContextReceiverType + // private /* final field */ val $$delegate_0: BaseClassType + // } + if (element is IrField && element.origin.isSynthetic) return false + // Don't print fake overrides of Java fields if (element is IrProperty && element.isFakeOverride && @@ -342,6 +361,19 @@ private val EXCLUDED_ANNOTATIONS = setOf( private val HIDDEN_ENUM_METHOD_NAMES = setOf(Name.identifier("finalize"), Name.identifier("getDeclaringClass")) +private data class ComputedSignature( + val computedBy: ComputedBy, + val isPublic: Boolean, + val value: String, + val description: String? +) { + enum class ComputedBy(private val humanReadableDescription: String) { + FE("Frontend"), IR("IR"); + + override fun toString() = humanReadableDescription + } +} + private data class ComputedMangledName( val manglerName: String, val compatibleMode: Boolean, @@ -381,6 +413,32 @@ private inline fun Iterable.printAligned(printer: Printer, map { prefix(it) to it.value }.aligned().forEach(printer::println) } +private fun Printer.printSignatures(computedSignatures: List) { + val (publicSignatures, privateSignatures) = computedSignatures.partition { it.isPublic } + printSignatures(publicSignatures, "Public signature") + printSignatures(privateSignatures, "Private signature") +} + +private fun Printer.printSignatures(signatures: List, prefix: String) { + val distinctSignatures = signatures.distinctBy { it.value to it.description } + when (distinctSignatures.size) { + 0 -> Unit + 1 -> printSignature(distinctSignatures.single(), prefix) + else -> { + distinctSignatures.forEach { + printSignature(it, "$prefix by ${it.computedBy}") + } + } + } +} + +private fun Printer.printSignature(computedSignature: ComputedSignature, prefix: String) { + println("// $prefix: ${computedSignature.value}") + computedSignature.description?.let { + println("// $prefix debug description: $it") + } +} + private fun Printer.printMangledNames(computedMangledNames: List, prefix: String) { val distinctNames = computedMangledNames.distinctBy { it.value } @@ -447,6 +505,25 @@ private fun addMangledNameTo( } } +private fun addSignatureTo( + collector: MutableList, + signature: IdSignature?, + origin: ComputedBy, + isPublic: Boolean, +) { + if (signature != null) { + // N.B. We do use IdSignatureRenderer.LEGACY because it renders public signatures with hashes which are + // computed from mangled names. So no real need in testing IdSignatureRenderer.DEFAULT which renders mangled names + // instead of hashes. + collector += ComputedSignature( + origin, + isPublic, + value = signature.render(IdSignatureRenderer.LEGACY), + description = signature.asPublic()?.description + ) + } +} + private fun > Mangler.addSignatureMangledNameTo( collector: MutableList, declaration: Declaration diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt index 1416450f9c4..da789d74afe 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt @@ -162,10 +162,6 @@ object CodegenTestDirectives : SimpleDirectivesContainer() { """.trimIndent() ) - val DUMP_LOCAL_DECLARATION_SIGNATURES by directive( - description = "For tests with $DUMP_SIGNATURES, also dumps signatures and mangled names for local functions and classes" - ) - val SKIP_SIGNATURE_DUMP by directive( description = "Disables dumping signatures and mangled names of declarations to the ${IrMangledNameAndSignatureDumpHandler.DUMP_EXTENSION} file" ) diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index bb37413e952..28a93a310d2 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -1303,6 +1303,11 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { runTest("compiler/testData/ir/irText/expressions/interfaceThisRef.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java index 949bc94673e..c4a596a01a8 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirLightTreeJsIrTextTestGenerated.java @@ -1480,6 +1480,12 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java index 114c201b0c2..c86d98680ca 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirPsiJsIrTextTestGenerated.java @@ -1480,6 +1480,12 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest { runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java index a9477b3ca8e..a9817880125 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/ClassicJsIrTextTestGenerated.java @@ -1480,6 +1480,12 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest { runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java index 554f4b1366c..23ba90f7d64 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/ClassicNativeIrTextTestGenerated.java @@ -1480,6 +1480,12 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java index 546e0577635..d2b6d7c6c30 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirLightTreeNativeIrTextTestGenerated.java @@ -1480,6 +1480,12 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java index 479f409ffbe..7355a2b2512 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/irtext/FirPsiNativeIrTextTestGenerated.java @@ -1480,6 +1480,12 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } + @Test + @TestMetadata("inlinedBreakContinue.kt") + public void testInlinedBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/inlinedBreakContinue.kt"); + } + @Test @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception {