Remove variables with empty ranges from local vars table

As their ranges may intersect after dead code elimination that leads to VerifyError
This commit is contained in:
Denis Zharkov
2015-06-03 15:02:54 +03:00
parent 310babefdf
commit 9802931a90
9 changed files with 54 additions and 2 deletions
@@ -2180,6 +2180,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/deadCodeElimination")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DeadCodeElimination extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInDeadCodeElimination() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("intersectingVariableRange.kt")
public void testIntersectingVariableRange() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt");
doTest(fileName);
}
@TestMetadata("intersectingVariableRangeInFinally.kt")
public void testIntersectingVariableRangeInFinally() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/defaultArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)