Don't use 'iinc' instruction on byte/short/char variables

Android run-time verifier complains when there's any possibility that a
byte/short/char local variable could contain a value not fitting into the
type's limits.
This commit is contained in:
Alexander Udalov
2013-06-25 18:11:17 +04:00
parent db41329e67
commit 356c32893b
5 changed files with 112 additions and 82 deletions
@@ -3339,6 +3339,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest("compiler/testData/codegen/box/primitiveTypes/ea35963.kt");
}
@TestMetadata("incrementByteCharShort.kt")
public void testIncrementByteCharShort() throws Exception {
doTest("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt");
}
@TestMetadata("intLiteralIsNotNull.kt")
public void testIntLiteralIsNotNull() throws Exception {
doTest("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt");