Make redundant null check optimization independent of boxing optimization algorithm.

Run DCE after each single redundant null check optimization pass.
This commit is contained in:
Dmitry Petrov
2017-02-06 20:01:54 +03:00
parent eda43c8b45
commit 3fc106572e
20 changed files with 454 additions and 141 deletions
@@ -12368,6 +12368,21 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/nullCheckOptimization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NullCheckOptimization extends AbstractJsCodegenBoxTest {
public void testAllFilesPresentInNullCheckOptimization() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("kt7774.kt")
public void testKt7774() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/objectIntrinsics")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)