On Dec 12, 2017, at 5:24 PM, David Holmes <david.hol...@oracle.com> wrote:
> 
> as per getByteCodeIndex() it needs to be able to store "-1" to indicate 
> no-bci?

Yes, that's the essential requirement, to encode a "none" value.

FWIW, one natural way to do that here would be to make the int field
@Stable and have the accessor return one less than the stored field value.

Then, by the rules of @Stable, the field starts out at the logical value
of -1, and can transition to a valid BCI if patched to a non-zero value
in the range 1..(2^16).

Making it "final" and initialized to -1 is not too terrible either, although
that creates some tech. debt we need to discharge when upgrading
finals to be trustable.

— John

Reply via email to