JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs
This commit is contained in:
committed by
teamcityserver
parent
bfb1a06f3d
commit
851980e36f
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+63
@@ -10353,6 +10353,69 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/directInvokeOptimization")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DirectInvokeOptimization extends AbstractIrJsCodegenBoxES6Test {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDirectInvokeOptimization() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/directInvokeOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, 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)
|
||||
|
||||
Generated
+63
@@ -9759,6 +9759,69 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/directInvokeOptimization")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DirectInvokeOptimization extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDirectInvokeOptimization() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/directInvokeOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, 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)
|
||||
|
||||
Generated
+63
@@ -9759,6 +9759,69 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/directInvokeOptimization")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DirectInvokeOptimization extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDirectInvokeOptimization() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/directInvokeOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, 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)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+63
@@ -4642,6 +4642,69 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/directInvokeOptimization")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DirectInvokeOptimization extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDirectInvokeOptimization() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/directInvokeOptimization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, 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)
|
||||
|
||||
Reference in New Issue
Block a user