improved postProcess

collect (and cache) reachable instructions for local declarations
after processing all parent instructions
This commit is contained in:
Svetlana Isakova
2014-02-28 18:03:18 +04:00
parent fbbfb95861
commit b7f7063bf4
5 changed files with 93 additions and 7 deletions
@@ -31,7 +31,7 @@ import org.jetbrains.jet.cfg.AbstractControlFlowTest;
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/cfg")
@InnerTestClasses({ControlFlowTestGenerated.Arrays.class, ControlFlowTestGenerated.Basic.class, ControlFlowTestGenerated.ControlStructures.class, ControlFlowTestGenerated.Conventions.class, ControlFlowTestGenerated.DeadCode.class, ControlFlowTestGenerated.Declarations.class, ControlFlowTestGenerated.Expressions.class, ControlFlowTestGenerated.TailCalls.class})
@InnerTestClasses({ControlFlowTestGenerated.Arrays.class, ControlFlowTestGenerated.Basic.class, ControlFlowTestGenerated.Bugs.class, ControlFlowTestGenerated.ControlStructures.class, ControlFlowTestGenerated.Conventions.class, ControlFlowTestGenerated.DeadCode.class, ControlFlowTestGenerated.Declarations.class, ControlFlowTestGenerated.Expressions.class, ControlFlowTestGenerated.TailCalls.class})
public class ControlFlowTestGenerated extends AbstractControlFlowTest {
public void testAllFilesPresentInCfg() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), true);
@@ -93,6 +93,19 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
}
@TestMetadata("compiler/testData/cfg/bugs")
public static class Bugs extends AbstractControlFlowTest {
public void testAllFilesPresentInBugs() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("jumpToOuterScope.kt")
public void testJumpToOuterScope() throws Exception {
doTest("compiler/testData/cfg/bugs/jumpToOuterScope.kt");
}
}
@TestMetadata("compiler/testData/cfg/controlStructures")
public static class ControlStructures extends AbstractControlFlowTest {
public void testAllFilesPresentInControlStructures() throws Exception {
@@ -416,6 +429,7 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
suite.addTestSuite(ControlFlowTestGenerated.class);
suite.addTestSuite(Arrays.class);
suite.addTestSuite(Basic.class);
suite.addTestSuite(Bugs.class);
suite.addTestSuite(ControlStructures.class);
suite.addTestSuite(Conventions.class);
suite.addTestSuite(DeadCode.class);