RFR: 8338623: StackCounter adding extraneous slots for receiver invoke instructions
Adam Sotona
asotona at openjdk.org
Tue Aug 20 11:31:49 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.
Looks good to me.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20637#pullrequestreview-2247735326
More information about the core-libs-dev
mailing list