summaryrefslogtreecommitdiff
path: root/test/files/run/t8601.flags
Commit message (Collapse)AuthorAgeFilesLines
* Remove GenASM, merge remaining common code snippetsSimon Ochsenreither2015-10-271-1/+1
| | | | | | | | With GenBCode being the default and only supported backend for Java 8, we can get rid of GenASM. This commit also fixes/migrates/moves to pending/deletes tests which depended on GenASM before.
* Warn when combining settings for the old optimizer with -YGenBCodeLukas Rytz2015-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some unnecessary flags files - neg/t4425.flags - run/blame_eye_triple_eee-double.flags - run/blame_eye_triple_eee-float.flags Force tests that use -optimize to GenASM - neg/sealed-final-neg.flags - pos/inline-access-levels.flags - pos/inliner2.flags - pos/sealed-final.flags - pos/t3420.flags - pos/t8410.flags - run/constant-optimization.flags - run/dead-code-elimination.flags - run/elidable-opt.flags - run/finalvar.flags - run/icode-reader-dead-code.scala - run/optimizer-array-load.flags - run/synchronized.flags - run/t3509.flags - run/t3569.flags - run/t4285.flags - run/t4935.flags - run/t5789.scala - run/t6188.flags - run/t7459b-optimize.flags - run/t7582.flags - run/t7582b.flags - run/t8601.flags - run/t8601b.flags - run/t8601c.flags - run/t8601d.flags - run/t8601e.flags - run/t9003.flags Move some tests to the new optimizer - run/classfile-format-51.scala - run/classfile-format-52.scala - run/run-bug4840.flags - run/t2106.flags - run/t6102.flags
* SI-8601 Don't treat int/long division, or arraylength, as dead-codeJason Zaugg2014-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `{i, l}div` and `{i, l}rem` throw an `ArithmeticException` if the divisor is 0. `arraylength` throws a `NullPointerException` on a null reference. JVM Spec: > The only integer operations that can throw an exception are the > integer divide instructions (idiv and ldiv) and the integer > remainder instructions (irem and lrem), which throw an > ArithmeticException if the divisor is zero. > The Java virtual machine's floating-point operators do not throw > runtime exceptions > If the arrayref is null, the arraylength instruction throws a > NullPointerException. I checked the other primitives in `ICode` to see if anything else should be considered as live code. Pure: // jvm : {i, l, f, d}neg case class Negation(kind: TypeKind) extends Primitive // jvm : if{eq, ne, lt, ge, le, gt}, if{null, nonnull} // if_icmp{eq, ne, lt, ge, le, gt}, if_acmp{eq,ne} case class Test(op: TestOp, kind: TypeKind, zero: Boolean) extends Primitive // jvm : lcmp, {f, d}cmp{l, g} case class Comparison(op: ComparisonOp, kind: TypeKind) extends Primitive Impure: {i, l}{div, rem}, otherwise pure // jvm : {i, l, f, d}{add, sub, mul, div, rem} case class Arithmetic(op: ArithmeticOp, kind: TypeKind) extends Primitive Pure (overflow is silent, NaN.toInt is defined): // jvm : {i, l}{and, or, xor} case class Logical(op: LogicalOp, kind: TypeKind) extends Primitive // jvm : {i, l}{shl, ushl, shr} case class Shift(op: ShiftOp, kind: TypeKind) extends Primitive // jvm : i2{l, f, d}, l2{i, f, d}, f2{i, l, d}, d2{i, l, f}, i2{b, c, s} case class Conversion(src: TypeKind, dst: TypeKind) extends Primitive Impure! May NPE! // jvm : arraylength case class ArrayLength(kind: TypeKind) extends Primitive Pure (we know that StringBuilder.{<init>, append, toString} are pure and `append` is null safe.) // jvm : It should call the appropiate 'append' method on StringBuffer case class StringConcat(el: TypeKind) extends Primitive // jvm: it should create a new StringBuffer case object StartConcat extends Primitive // jvm: convert StringBuffer to a String case object EndConcat extends Primitive
* Revert "SI-8601 Don't treat int/long division, or arraylength, as dead-code"Adriaan Moors2014-05-191-1/+0
| | | | This reverts commit ee611cd76c29fedd416162e482c7ab3f15b831ca.
* SI-8601 Don't treat int/long division, or arraylength, as dead-codeJason Zaugg2014-05-181-0/+1
`{i, l}div` and `{i, l}rem` throw an `ArithmeticException` if the divisor is 0. `arraylength` throws a `NullPointerException` on a null reference. JVM Spec: > The only integer operations that can throw an exception are the > integer divide instructions (idiv and ldiv) and the integer > remainder instructions (irem and lrem), which throw an > ArithmeticException if the divisor is zero. > The Java virtual machine's floating-point operators do not throw > runtime exceptions > If the arrayref is null, the arraylength instruction throws a > NullPointerException. I checked the other primitives in `ICode` to see if anything else should be considered as live code. Pure: // jvm : {i, l, f, d}neg case class Negation(kind: TypeKind) extends Primitive // jvm : if{eq, ne, lt, ge, le, gt}, if{null, nonnull} // if_icmp{eq, ne, lt, ge, le, gt}, if_acmp{eq,ne} case class Test(op: TestOp, kind: TypeKind, zero: Boolean) extends Primitive // jvm : lcmp, {f, d}cmp{l, g} case class Comparison(op: ComparisonOp, kind: TypeKind) extends Primitive Impure: {i, l}{div, rem}, otherwise pure // jvm : {i, l, f, d}{add, sub, mul, div, rem} case class Arithmetic(op: ArithmeticOp, kind: TypeKind) extends Primitive Pure (overflow is silent, NaN.toInt is defined): // jvm : {i, l}{and, or, xor} case class Logical(op: LogicalOp, kind: TypeKind) extends Primitive // jvm : {i, l}{shl, ushl, shr} case class Shift(op: ShiftOp, kind: TypeKind) extends Primitive // jvm : i2{l, f, d}, l2{i, f, d}, f2{i, l, d}, d2{i, l, f}, i2{b, c, s} case class Conversion(src: TypeKind, dst: TypeKind) extends Primitive Impure! May NPE! // jvm : arraylength case class ArrayLength(kind: TypeKind) extends Primitive Pure (we know that StringBuilder.{<init>, append, toString} are pure and `append` is null safe.) // jvm : It should call the appropiate 'append' method on StringBuffer case class StringConcat(el: TypeKind) extends Primitive // jvm: it should create a new StringBuffer case object StartConcat extends Primitive // jvm: convert StringBuffer to a String case object EndConcat extends Primitive