On Tue, 7 Feb 2023 12:14:40 GMT, Maurizio Cimadamore <mcimadam...@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

Reply via email to