On Mon, 30 Nov 2026 14:05:23 GMT, Adam Sotona <[email protected]> wrote:
> `DirectCodeBuilder` stores target bytecode offsets directly in `Label` > instances created by `BufferedCodeBuilder`. > With `ShortJumpsOption.FIX_SHORT_JUMPS`, it rewrites out-of-range short jumps > to equivalent instructions. > When this requires a second pass, the new builder reuses the same buffered > labels and can mistake offsets left over from the first pass for valid > targets. > > The fix clears the offsets of deferred labels owned by `BufferedCodeBuilder` > before the second pass. > > `ShortJumpsFixTest` now exercises this buffered transform chain and verifies > the generated bytecode in addition to checking the expected opcode sequence. > > Please review. > > Thank you, > Adam > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Thank you for the review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/34124#issuecomment-7309915012
