RFR: 8315637: JDK-8314249 broke libgraal
Ioi Lam
iklam at openjdk.org
Wed Sep 6 21:35:39 UTC 2023
On Wed, 6 Sep 2023 20:41:29 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> Please review this change in JVMCI. The actual functional change is essentially the same as the patch provided by @dougxc in [JDK-8315637](https://bugs.openjdk.org/browse/JDK-8315637) -- convert the `rawIndex` to `cpci` only if the bytecode is INVOKE{VIRTUAL,SPECIAL,STATIC,INTERFACE}.
>>
>> The rest of the changes is to rename the parameters from `rawIndex` to `which`, so we know the correct type of index is passed. I also added a test case.
>>
>> (This code should be much simpler after [JDK-8301993](https://bugs.openjdk.org/browse/JDK-8301993) is complete: we won't have `cpci` anymore and all `which` can be replaced with `rawInex`).
>
> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotConstantPool.java line 407:
>
>> 405: * @return name as {@link String}
>> 406: */
>> 407: private String getNameOf(int rawIndex, int opcode) {
>
> This method, and `getSignatureOf()` seem to be unused but is it possible that they could have use in the future?
These were private methods that had a single caller. All they did was to forward the call to CompilerToVM, so I removed them so that I didn't need to worry about renaming their parameters.
In the future, after we get rid of `which` and `cpci`, maybe we can refactor the code to have better organization, and possibly bring back these methods.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15575#discussion_r1317857213
More information about the hotspot-compiler-dev
mailing list