Redundant integer conversion

Issue #246 resolved
Jesper Öqvist created an issue

ExtendJ 8.0.1-244-gcf8e8d9 Java SE 8

ExtendJ generates redundant integer conversions, like i2c in this test:

public class Test {
  public static void main(String[] args) {
    char c = 1234;
  }
}

Expected result: the above test should generate the following bytecode:

         0: sipush        1234
         3: istore_1
         4: return

Actual result: an unnecessary i2c instruction is generated:

         0: sipush        1234
         3: i2c
         4: istore_1
         5: return

Comments (2)

  1. Log in to comment