Coroutines: Fix RedundantLocalsEliminationMethodTransformer

- Take control flow into account when collecting usage information
- Don't remove stores to local variables
This commit is contained in:
Steven Schäfer
2020-06-25 16:04:11 +02:00
committed by Ilmir Usmanov
parent 3113281e2d
commit 5cdf053c8e
9 changed files with 155 additions and 146 deletions
@@ -7031,6 +7031,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt", "kotlin.coroutines");
}
@TestMetadata("inlineUnitFunction.kt")
public void testInlineUnitFunction() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/inlineUnitFunction.kt");
}
@TestMetadata("interfaceDelegation.kt")
public void testInterfaceDelegation() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/interfaceDelegation.kt");
@@ -7041,6 +7041,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt", "kotlin.coroutines");
}
@TestMetadata("inlineUnitFunction.kt")
public void testInlineUnitFunction() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/inlineUnitFunction.kt");
}
@TestMetadata("interfaceDelegation.kt")
public void testInterfaceDelegation() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/interfaceDelegation.kt");
@@ -7041,6 +7041,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt", "kotlin.coroutines");
}
@TestMetadata("inlineUnitFunction.kt")
public void testInlineUnitFunction() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/inlineUnitFunction.kt");
}
@TestMetadata("interfaceDelegation.kt")
public void testInterfaceDelegation() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/interfaceDelegation.kt");