Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6610567

Please give us back the jsr bytecode

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 6
    • specification
    • vm
    • x86
    • linux

      A DESCRIPTION OF THE REQUEST :
      In Java SE 6, the bytecodes jsr and jsr_w are no longer allowed.

      Even though they are no longer used by javac, compilers for other languages than Java might need jsr, jsr_w and ret. So please restore support for the bytecodes jsr, jsr_w and ret.


      JUSTIFICATION :
      Nowadays it's common to compile other languages than Java to JVM byte code, and in some cases it might be useful to compile a whole program into a single JVM method, since the Java invoke method style is incompatible with the language you want to compile. Procedures/functions/methods can then be implemented using the jsr (or jsr_w) and ret bytecodes.

      Some say that the new invokedynamic bytecode will solve this. It will certainly be a good solution for some languages, such as Python and Ruby. But I'm not sure that it will work smoothly for languages that are even more different, such as Haskell or Prolog.

      This RFE is connected to RFE #4262078 about increasing the maximum method size. Both are needed in order to provide good support for compiling other languages to JVM bytecode.

            abuckley Alex Buckley
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: