JVM IR: Check that we generate callable references in tests
This commit is contained in:
committed by
Alexander Udalov
parent
2acfb3a41f
commit
8014712569
+6
@@ -15975,6 +15975,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// The direct invoke optimization silently broke several tests. This test exists to
|
||||||
|
// ensure that we don't end up optimizing the indirect invokes that are present in the tests.
|
||||||
|
private fun id(x: String) = x
|
||||||
|
|
||||||
|
fun box() = { "O" }.let { it() } + ::id.let { it("K") }
|
||||||
|
|
||||||
|
// CHECK_BYTECODE_TEXT
|
||||||
|
// 2 Function[^.\n]*\.invoke
|
||||||
+6
@@ -15789,6 +15789,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
|
|||||||
+6
@@ -15975,6 +15975,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
|
|||||||
+5
@@ -13005,6 +13005,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/capturingLambda.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/capturingLambda.kt");
|
||||||
|
|||||||
+6
@@ -12179,6 +12179,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
|
|||||||
+6
@@ -12221,6 +12221,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
|
|||||||
+5
@@ -10855,6 +10855,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/capturingLambda.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/capturingLambda.kt");
|
||||||
|
|||||||
+6
@@ -13225,6 +13225,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("canary.kt")
|
||||||
|
public void testCanary() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/directInvokeOptimization/canary.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("capturingLambda.kt")
|
@TestMetadata("capturingLambda.kt")
|
||||||
public void testCapturingLambda() throws Exception {
|
public void testCapturingLambda() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user