[JS IR] Fix state machine control flow

- exception loop unwinding: make sure exception state is reset after try block is finished
 - break/continue of suspended loops
This commit is contained in:
Roman Artemev
2019-11-18 15:13:09 +03:00
committed by romanart
parent 18d0b477b6
commit c459b2ca6e
11 changed files with 288 additions and 41 deletions
@@ -6772,6 +6772,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt", "kotlin.coroutines");
}
@TestMetadata("doubleBreak.kt")
public void testDoubleBreak_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("doubleBreak.kt")
public void testDoubleBreak_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt", "kotlin.coroutines");
}
@TestMetadata("finallyCatch.kt")
public void testFinallyCatch_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/finallyCatch.kt", "kotlin.coroutines.experimental");
@@ -6887,6 +6897,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt", "kotlin.coroutines");
}
@TestMetadata("throwFromFinally.kt")
public void testThrowFromFinally_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/throwFromFinally.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("throwFromFinally.kt")
public void testThrowFromFinally_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/throwFromFinally.kt", "kotlin.coroutines");
}
@TestMetadata("throwInTryWithHandleResult.kt")
public void testThrowInTryWithHandleResult_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt", "kotlin.coroutines.experimental");