On 13/08/2019 8:55 am, Mandy Chung wrote:
On 8/12/19 3:28 PM, David Holmes wrote:
Hi Mandy,

On 13/08/2019 6:24 am, Mandy Chung wrote:
Having a second thought, I'm keeping @Stable bci field while zero indicates an invalid BCI that makes it obvious that this field will be updated.  VM will set StackFrameInfo::bci to value+1.

I don't know this code but why have the VM set the value one too many and then have the Java code subtract one again. ???

I keep it as @Stable field be initialized once by VM and it means that 0 indicates an invalid bci.   It could be made as final field but initialized in the constructor to -1 and then set by VM.  I opt for webrev.03 to make it clear it's initialized later by the VM once.

I see, so the zero is a constraint of it being @Stable. So we offset by 1 at both ends so that we return -1 when not set. Otherwise we'd need to special-case for zero.

Okay I get it. Thanks. Not a review though as I do not know this code.

David

Mandy

Reply via email to