Generic sort

John Rose john.r.rose at
Sun Sep 14 03:09:09 UTC 2014

On Sep 13, 2014, at 6:39 PM, Brian Goetz <brian.goetz at> wrote:

>> can throw a CCE where Complex is a value type. This seems to imply we
>> need byte code instructions: vinstanceof and vcheckcast.
>> This seems strange, what am I missing?
> Some bytecodes need to be v-ified (xreturn, xload), but others (dup) need not because they are intrinsically polymorphic.  In the middle are those that take type descriptors as operands (checkcast); if we expand the set of type descriptors to include q-types, you need not v-ify the bytecode, you can just expand the range of operands.

Yes; there may be bytecodes that work directly with the Q-types which would be preferable to boxing and then asking L-type questions.

But I think there is great conceptual power in the "box first" approach.

— John

More information about the valhalla-dev mailing list