RFR JDK-8193325: StackFrameInfo::getByteCodeIndex returns wrong value if bci > 32767
Mandy Chung
mandy.chung at oracle.com
Mon Aug 12 22:55:20 UTC 2019
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.
Mandy
More information about the core-libs-dev
mailing list