Unsigned Integers

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jan 4 11:33:05 UTC 2021


On 01/01/2021 20:52, Mark Raynsford wrote:
> I have no doubt whatsoever that Java will sprout all kinds of new
> numeric types (unsigned, complex, etc) when Valhalla is ready, but it's
> not ready yet. Unsigned types won't happen as part of Panama.

This is the correct answer.

Valhalla will give us new ammo to define the data types we need to 
interact with C in a more natural way.

As for bound checks, we are aware of some of the limitations of the 
current system, and the fact that it might not work correctly with 
negative addresses - that said, there's just a lot of constraints to 
work with, as not all bound checks routines are optimized in the same 
way (for instance, it matters as to whether the bound check is done 
using long or ints, at the moment, which causes complexity in the 
implementation). So, doing the "right" thing in the implementation would 
almost surely result in a big performance regression. None of these 
problems are unsolvable, but we will tackle this particular issue when 
we have a clearer picture of how unrolling optimizations involving long 
loops will work (this work is currently in progress).

Cheers
Maurizio




More information about the panama-dev mailing list