JVM IR: Avoid IrComposite in ReturnableBlockLowering (KT-53202)
This commit is contained in:
committed by
Alexander Udalov
parent
c974ff8965
commit
03aee58585
+6
@@ -16005,6 +16005,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ class ReturnableBlockTransformer(val context: CommonBackendContext, val containe
|
||||
newStatements
|
||||
)
|
||||
|
||||
return builder.irComposite(expression, expression.origin) {
|
||||
return builder.irBlock(expression, expression.origin) {
|
||||
+variable
|
||||
+loop
|
||||
+irGet(variable)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
fun box(): String {
|
||||
val a = ""
|
||||
|
||||
val c = fun(): String {
|
||||
if (a != "") return "Fail"
|
||||
return "OK"
|
||||
}.invoke()
|
||||
|
||||
return c
|
||||
}
|
||||
+6
@@ -15819,6 +15819,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
|
||||
+6
@@ -16005,6 +16005,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
|
||||
+5
@@ -13030,6 +13030,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/nestedLambdas.kt");
|
||||
|
||||
+6
@@ -12209,6 +12209,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
|
||||
+6
@@ -12251,6 +12251,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
|
||||
+5
@@ -10880,6 +10880,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/nestedLambdas.kt");
|
||||
|
||||
+6
@@ -13255,6 +13255,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_funLiteral.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt53202_returns.kt")
|
||||
public void testKt53202_returns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/directInvokeOptimization/kt53202_returns.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedLambdas.kt")
|
||||
public void testNestedLambdas() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user