Refined redundant null check optimization

This commit is contained in:
Denis Zharkov
2014-12-31 16:19:21 +03:00
parent 5675d2b26b
commit 6f94ebb9d6
10 changed files with 139 additions and 5 deletions
@@ -309,6 +309,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("arrayConstructor.kt")
public void testArrayConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/arrayConstructor.kt");
doTest(fileName);
}
@TestMetadata("boxing.kt")
public void testBoxing() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/boxing.kt");
@@ -326,6 +332,24 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/lastReturn.kt");
doTest(fileName);
}
@TestMetadata("literal.kt")
public void testLiteral() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/literal.kt");
doTest(fileName);
}
@TestMetadata("simpleConstructor.kt")
public void testSimpleConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructor.kt");
doTest(fileName);
}
@TestMetadata("simpleConstructorNotRedundant.kt")
public void testSimpleConstructorNotRedundant() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructorNotRedundant.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/directInvoke")