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

Revisit j.l.classfile.CodeBuilder API surface

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 23
    • None
    • core-libs

    Description

      j.l.classfile.CodeBuilder API consist of >230 methods.
      The majority of the API methods may be split into three main categories:
      - methods building low level bytecode instructions according to JVMS chapter 6.5 (aaload, aastore, aconst_null...)
      - methods reconstructing individual subtypes of j.l.classfile.Instruction from given arguments (loadInstruction, storeInstruction, incrementInstruction, branchInstruction...)
      - methods modeling high level code blocks (block, ifThen, ifThenElse, trying...)

      Existing ClassFile API use cases proved the concept one big CodeBuilder is comfortable. However there are some redundancies, glitches in the naming conventions, some frequently used methods are hard to find and some methods have low practical use.

      This enhancement would like to revisit j.l.classfile.CodeBuilder API methods, remove redundancies, fix naming conventions, highlight the most frequently used methods and remove methods with low practical use.

      Attachments

        Issue Links

          Activity

            People

              asotona Adam Sotona
              asotona Adam Sotona
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: