RFR (L) 8037210: Get rid of char-based descriptions 'J' of basic types
John Rose
john.r.rose at oracle.com
Tue Mar 18 21:35:59 UTC 2014
On Mar 18, 2014, at 1:36 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
> Why are we not using an Enum instead of an "untyped" byte?
Byte is moderately typed, in the sense (which I rely on during development) that you can't assign an int or char to a byte w/o a cast.
That's why it is not just a plain int.
But those values (L_TYPE etc.) are used a lot as numbers, and specifically as low-level array indexes, and also comparisons (x < V_TYPE).
To turn them into enums, we'd have to add lots of calls to '.ordinal()' to turn them right back to numbers. That dilutes (completely IMO) the value they have as enums to raise the level of the code.
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20140318/c318e656/attachment.html>
More information about the mlvm-dev
mailing list