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
@@ -11584,6 +11584,69 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/directInvokeOptimization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DirectInvokeOptimization extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInDirectInvokeOptimization() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/directInvokeOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("boundInnerContructorRef.kt")
public void testBoundInnerContructorRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundInnerContructorRef.kt");
}
@TestMetadata("boundMemberRef.kt")
public void testBoundMemberRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/boundMemberRef.kt");
}
@TestMetadata("capturingLambda.kt")
public void testCapturingLambda() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/capturingLambda.kt");
}
@TestMetadata("contructorRef.kt")
public void testContructorRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/contructorRef.kt");
}
@TestMetadata("nestedLambdas.kt")
public void testNestedLambdas() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/nestedLambdas.kt");
}
@TestMetadata("simpleAnonymousFun.kt")
public void testSimpleAnonymousFun() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/simpleAnonymousFun.kt");
}
@TestMetadata("simpleFunRef.kt")
public void testSimpleFunRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/simpleFunRef.kt");
}
@TestMetadata("simpleLambda.kt")
public void testSimpleLambda() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/simpleLambda.kt");
}
@TestMetadata("unboundInnerContructorRef.kt")
public void testUnboundInnerContructorRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/unboundInnerContructorRef.kt");
}
@TestMetadata("unboundMemberRef.kt")
public void testUnboundMemberRef() throws Exception {
runTest("compiler/testData/codegen/box/directInvokeOptimization/unboundMemberRef.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/elvis")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)