RFR: 8294982: Implementation of Classfile API [v12]
Adam Sotona
asotona at openjdk.org
Tue Feb 7 12:48:51 UTC 2023
On Tue, 7 Feb 2023 12:14:40 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> On the contrary, it has been deduplicated. Opcode is referencing numeric constants stored in Classfile.
>
> sure, but my question is - once you have a nice enum that is 1-1 with the opcodes - why would a client want to use the low-level opcode bytes? Shouldn't the API only deal with Opcodes? (and, in the rare occurrence where a client wants to really know the int value of an opcode, they can do e.g. `PUTSTATIC.bytecode()`)
It is the question of co-location of all numeric constants in one place in Classfile (or not).
I would agree with your proposal if the architectural decision is to decentralise the numeric constants and reduce Classfile footprint.
-------------
PR: https://git.openjdk.org/jdk/pull/10982
More information about the build-dev
mailing list