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

Remove misleading CodeBuilder.loadConstant(Opcode, ConstantDesc)

XMLWordPrintable

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

      The API `CodeBuilder.loadConstant(Opcode, ConstantDesc)` seems like a relic from the old `constantInstruction(Opcode, ConstantDesc)` back when there were no factories for specific individual instructions. It makes little sense to specify the type of Opcode when the `loadConstant(ConstantDesc)` automatically handles it. Worse, this is actually confusing combined with the shortcut API. Users who really wish to specify opcode should use the individual factories to create Instruction instances instead.

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

              Created:
              Updated:
              Resolved: