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

Fix instruction name and API spec inconsistencies in CodeBuilder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • core-libs
    • None

      In java.lang.classfile.CodeBuilder, there are a few inconsistencies in spec and implementation: exceptionCatch claims to accept null but doesn't; receiverSlot claims to throw IAE for instance methods; CodeAttribute.labelToBci claims to return -1 but throws IAE.

      There's also some confusion around instruction-named factories: if_nonnull and if_null don't match ifnonnull and ifnull instruction mnemonic; some instructions aren't listed because they share factories or are deprecated.

      We should clarify these problems in specification and update implementation/specification as fit.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: