RFR: 8338623: StackCounter adding extraneous slots for receiver invoke instructions

Chen Liang liach at openjdk.org
Tue Aug 20 14:46:54 UTC 2024


On Tue, 20 Aug 2024 04:53:18 GMT, Chen Liang <liach at openjdk.org> wrote:

> StackCounter was adding return type slots before deducting receiver slot, so code like
> 
> int b() { return this.hashCode(); }
> 
> will be counted as having a max stack of 2. Avoid this problem by only calling `addStackSlot` once for each instruction.

Integrating as this is more serious and affects subsequent fixes.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20637#issuecomment-2299035354


More information about the core-libs-dev mailing list