Integrated: 8318837: javac generates wrong ldc instruction for dynamic constant loads
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Oct 27 13:50:42 UTC 2023
On Wed, 25 Oct 2023 17:39:24 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This PR fixes how javac loads dynamic variable symbols in `Gen` - currently, either a `ldc` or `ldc_w` is emitted. This is problematic, as, depending on the type of the dynamic constant, in some cases `ldc2_w` might be required (e.g. if the type of the constant is either `long` or `double`).
>
> I've updated the existing compiler condy test to check which `ldc` opcode is emitted for the various constants. I've also verified that the updated test fails w/o the changes in this patch.
This pull request has now been integrated.
Changeset: 2915d74a
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/2915d74a10c63cdca22d0055ebde67ef316a341b
Stats: 41 lines in 3 files changed: 12 ins; 13 del; 16 mod
8318837: javac generates wrong ldc instruction for dynamic constant loads
Reviewed-by: vromero, jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/16367
More information about the compiler-dev
mailing list