JVM IR: fix flags of $default methods in multi-file facades

Do not change origin of multifile class bridges to something else
because, as it turns out, there are numerous origin-specific checks in
the codegen that start to behave differently for multifile bridges.
Instead of the method-targeted origin MULTIFILE_BRIDGE, use new class
origin JVM_MULTIFILE_CLASS to detect whether a declaration is a
multifile bridge.

 #KT-40198 Fixed
 #KT-43145 Fixed
This commit is contained in:
Alexander Udalov
2020-11-04 17:54:11 +01:00
parent d326d6a693
commit 500b1cfbd3
19 changed files with 210 additions and 76 deletions
@@ -700,15 +700,20 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("functionInMultifileClass.kt")
public void testFunctionInMultifileClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/functionInMultifileClass.kt");
}
@TestMetadata("functionInMultifileClassWithInheritedParts.kt")
public void testFunctionInMultifileClassWithInheritedParts() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/functionInMultifileClassWithInheritedParts.kt");
}
@TestMetadata("internalNameMangling.kt")
public void testInternalNameMangling() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/internalNameMangling.kt");
}
@TestMetadata("privateFunctionInMultifilePart.kt")
public void testPrivateFunctionInMultifilePart() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/privateFunctionInMultifilePart.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/deprecated")
@@ -670,15 +670,20 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("functionInMultifileClass.kt")
public void testFunctionInMultifileClass() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/functionInMultifileClass.kt");
}
@TestMetadata("functionInMultifileClassWithInheritedParts.kt")
public void testFunctionInMultifileClassWithInheritedParts() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/functionInMultifileClassWithInheritedParts.kt");
}
@TestMetadata("internalNameMangling.kt")
public void testInternalNameMangling() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/internalNameMangling.kt");
}
@TestMetadata("privateFunctionInMultifilePart.kt")
public void testPrivateFunctionInMultifilePart() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/defaultArguments/privateFunctionInMultifilePart.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/deprecated")