-
Bug
-
Resolution: Fixed
-
P4
-
11, 17, 21, 22
-
b22
From JVMS description of "ldc"/"ldc_w" opcode:
```
If the run-time constant pool entry is a numeric constant of type int or float, then the value of that numeric constant is pushed onto the operand stack as an int or float, respectively.
```
That is, we cannot use ldc to load a two-slot constant. We need to use ldc2_w for that. Unfortunately, javac always emits ldc/ldc_w for all dynamic constants, regardless of their type. This can lead to verifier errors.
```
If the run-time constant pool entry is a numeric constant of type int or float, then the value of that numeric constant is pushed onto the operand stack as an int or float, respectively.
```
That is, we cannot use ldc to load a two-slot constant. We need to use ldc2_w for that. Unfortunately, javac always emits ldc/ldc_w for all dynamic constants, regardless of their type. This can lead to verifier errors.