Bounds checks with unsafe array access

John Rose john.r.rose at
Wed Sep 10 19:49:13 UTC 2014

On Sep 10, 2014, at 5:41 AM, Vitaly Davidovich <vitalyd at> wrote:

> I think there's a fundamental problem in trying to "convey" things to the compiler.  Clearly, it can't be some metadata approach since compiler can't just trust user blindly.  The only way I know to convey things is through code shape.

> One thing that bothers me is that even fields marked final aren't really treated as such by compiler because it's paranoid of things like reflection.  If there was some way to reassure it that final fields aren't modified behind its back, then more type info can be captured at init time (e.g. array is not null and length is captured as a constant).
Yup.  See

Actually, this is worth tracking more carefully.  So I created:

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-compiler-dev mailing list