Type-specific Java bytecode instructions have single-character prefixes to specify the type that the instruction relates to.
Taken from Wikipedia's entry on Java bytecode
In each case, the prefix choice makes sense, consisting of the first letter of the type (except boolean, which doesn't have an instruction prefix). The object reference prefix, however, does not seem logical, seeing as both o
and r
(the two first-letters) are free. Instead, object reference instructions use a
as their prefix.
Why are object reference bytecode instructions prefixed with a
, rather than the seemingly more appropriate o
or r
?
That table is questionable. There is no byte code instruction dealing with boolean
thus there is no instruction name starting with “z”. The “z” might come from type signatures where Z
stands for boolean
but that’s not the same as for type signatures J
stands for long
and L
starts a class name. So there’s no consistency there. For instructions “a” might stand for address as astore
instructions are able to store return addresses into a local variable too. Maybe, at an earlier time more of these a… instructions were able to deal with addresses other than objects and that has been limited later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With