KT-17110 Rewrite branches targeting other branches

- Rewrite branches targeting other branches to target directly the
final destination to avoid runtime performance penalties.

Fix of https://youtrack.jetbrains.com/issue/KT-17110
This commit is contained in:
Mikaël Peltier
2018-02-09 15:40:04 +01:00
committed by Dmitry Petrov
parent c9624ce0f9
commit 9fb0f59813
8 changed files with 133 additions and 8 deletions
@@ -1069,6 +1069,21 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/controlStructures")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ControlStructures extends AbstractBytecodeTextTest {
public void testAllFilesPresentInControlStructures() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("kt17110.kt")
public void testKt17110() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/controlStructures/kt17110.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)