RFR: 8265480: add basic JVMCI support for JEP 309: Dynamic Class-File Constants [v2]
Paul Sandoz
psandoz at openjdk.java.net
Wed Apr 21 21:47:23 UTC 2021
On Wed, 21 Apr 2021 20:45:10 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 659:
>>
>>> 657: }
>>> 658:
>>> 659: JVMCIObject result = JVMCIENV->call_PrimitiveConstant_forTypeChar(type2char(bt2), raw_value, JVMCI_CHECK_NULL);
>>
>> Given the above switch is total this part is unreachable? Did you mean for it to occur after the `if (!is_reference_type(bt)) ` block?
>
> No - it should not be there at all: https://github.com/openjdk/jdk/pull/3578/commits/b70c7b1a64d51fce23edde860f04749e8e49d34f
> Thanks for spotting.
Oops, i think i need glasses, the switch has break statements that results in processing of the `raw_value`:
```c++
switch (bt2) {
case T_BOOLEAN: raw_value = value.z; break;
...
-------------
PR: https://git.openjdk.java.net/jdk/pull/3578
More information about the hotspot-compiler-dev
mailing list