JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs

This commit is contained in:
Dmitry Petrov
2021-04-26 17:17:25 +03:00
committed by teamcityserver
parent bfb1a06f3d
commit 851980e36f
124 changed files with 1340 additions and 324 deletions
@@ -14171,6 +14171,76 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/directInvokeOptimization")
@TestDataPath("$PROJECT_ROOT")
public class DirectInvokeOptimization {
@Test
public void testAllFilesPresentInDirectInvokeOptimization() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/directInvokeOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("boundInnerContructorRef.kt")
public void testBoundInnerContructorRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundInnerContructorRef.kt");
}
@Test
@TestMetadata("boundMemberRef.kt")
public void testBoundMemberRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
}
@Test
@TestMetadata("capturingLambda.kt")
public void testCapturingLambda() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/capturingLambda.kt");
}
@Test
@TestMetadata("contructorRef.kt")
public void testContructorRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/contructorRef.kt");
}
@Test
@TestMetadata("nestedLambdas.kt")
public void testNestedLambdas() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/nestedLambdas.kt");
}
@Test
@TestMetadata("simpleAnonymousFun.kt")
public void testSimpleAnonymousFun() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/simpleAnonymousFun.kt");
}
@Test
@TestMetadata("simpleFunRef.kt")
public void testSimpleFunRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/simpleFunRef.kt");
}
@Test
@TestMetadata("simpleLambda.kt")
public void testSimpleLambda() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/simpleLambda.kt");
}
@Test
@TestMetadata("unboundInnerContructorRef.kt")
public void testUnboundInnerContructorRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/unboundInnerContructorRef.kt");
}
@Test
@TestMetadata("unboundMemberRef.kt")
public void testUnboundMemberRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/unboundMemberRef.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/elvis")
@TestDataPath("$PROJECT_ROOT")