RFR: 8318837: javac generates wrong ldc instruction for dynamic constant loads
Vicente Romero
vromero at openjdk.org
Thu Oct 26 03:23:29 UTC 2023
On Wed, 25 Oct 2023 23:49:45 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> > side: given that you are in the neighborhood :) does it make sense to fold the cases for: `ldc2w` and `ldc2` at: `Code::emitop2`?
>
> I can - but, I realized when I wrote the patch that the naming of the constants is wrong. The JVMS only knows about these instructions:
>
> * [ldc](https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-6.html#jvms-6.5.ldc)
>
> * [ldc_w](https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-6.html#jvms-6.5.ldc_w)
>
> * [ldc2_w](https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-6.html#jvms-6.5.ldc2_w)
>
>
> While javac has `ldc`, `ldc2` and `ldc2_w`. So, I suspect javac's `ldc2` is really `ldc_w`. Should this be renamed too?
as you please but then you probably should also rename `ldc1` to plain `ldc`
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16367#issuecomment-1780352724
More information about the compiler-dev
mailing list