IR text tests: Don't dump signature mangled names for IR-based descriptors

^KT-57788
This commit is contained in:
Dmitriy Dolovov
2023-12-13 12:19:01 +01:00
committed by Space Team
parent 07aad38c69
commit cbf21acede
11 changed files with 9 additions and 62 deletions
@@ -1,8 +1,5 @@
// TARGET_BACKEND: JVM
// 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 {
fun foo(): String
-3
View File
@@ -1,8 +1,5 @@
// TARGET_BACKEND: JVM
// 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 {
private val b =
@@ -1,13 +1,7 @@
// TARGET_BACKEND: JVM
// WITH_STDLIB
// FULL_JDK
// JVM_TARGET: 1.8
// IGNORE_BACKEND: JS_IR
// 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
interface SymbolOwner<E : SymbolOwner<E>>
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.fir.backend.FirMangler
import org.jetbrains.kotlin.fir.backend.FirMetadataSource
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
import org.jetbrains.kotlin.ir.IrBuiltIns
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
@@ -226,14 +227,13 @@ class IrMangledNameAndSignatureDumpHandler(
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
)
}
val firDeclaration: FirDeclaration? = ((declaration as? IrMetadataSourceOwner)?.metadata as? FirMetadataSource)?.fir
if (firDeclaration != null) {
// Dump only FIR-based signature mangled names if there is FIR available. In this mode no descriptors are used
// for computing signature mangled names.
firMangler?.addSignatureMangledNameTo(signatureMangledNames, firDeclaration)
} else
descriptorMangler.addSignatureMangledNameTo(signatureMangledNames, symbol.descriptor)
}
fun printActualMangledNamesAndSignatures() {
@@ -2124,11 +2124,6 @@ public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase {
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.kt");
@@ -2386,12 +2386,6 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrT
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@Test
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@Test
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {
@@ -2386,12 +2386,6 @@ public class FirPsiJsIrTextTestGenerated extends AbstractFirPsiJsIrTextTest {
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@Test
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@Test
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {
@@ -2386,12 +2386,6 @@ public class ClassicJsIrTextTestGenerated extends AbstractClassicJsIrTextTest {
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@Test
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@Test
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {
@@ -2392,12 +2392,6 @@ public class ClassicNativeIrTextTestGenerated extends AbstractClassicNativeIrTex
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@Test
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@Test
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {
@@ -2392,12 +2392,6 @@ public class FirLightTreeNativeIrTextTestGenerated extends AbstractFirLightTreeN
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@Test
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@Test
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {
@@ -2392,12 +2392,6 @@ public class FirPsiNativeIrTextTestGenerated extends AbstractFirPsiNativeIrTextT
runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt");
}
@Test
@TestMetadata("ImplicitReceiverStack.kt")
public void testImplicitReceiverStack() throws Exception {
runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt");
}
@Test
@TestMetadata("inapplicableCollectionSet.kt")
public void testInapplicableCollectionSet() throws Exception {