RFR: 8314249: Refactor handling of invokedynamic in JVMCI ConstantPool [v2]
Ioi Lam
iklam at openjdk.org
Wed Aug 16 19:34:32 UTC 2023
> This PR is part of the clean up JVMCI to track [JDK-8301993](https://bugs.openjdk.org/browse/JDK-8301993), where the constant pool cache is being removed (as of now, only method references use the CpCache).
>
> 1. `rawIndexToConstantPoolIndex()` is used only for the `invokedynamic` bytecode. It should be renamed to `indyIndexConstantPoolIndex()`
>
> 2. `rawIndexToConstantPoolCacheIndex()` should not be called for the `invokedynamic` bytecode, which doesn't use cpCache entries after [JDK-8301995](https://bugs.openjdk.org/browse/JDK-8301995).
>
> 3. Some `cpi` parameters should be renamed to `rawIndex` or `which`
>
> 4. Added a test case for `ConstantPool.lookupAppendix()`, which was not tested in the JDK repo.
>
> I added comments about the 4 types of indices used in HotSpotConstantPool.java: `cpi`, `rawIndex`, `cpci` and `which`. The latter two types will be removed after [JDK-8301993](https://bugs.openjdk.org/browse/JDK-8301993) is complete.
>
> Note that there are still some incorrect use of `cpi` in the implementation and test cases. Those will be cleaned up in [JDK-8314172](https://bugs.openjdk.org/browse/JDK-8314172)
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
@dougxc comments - fixed typos
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15297/files
- new: https://git.openjdk.org/jdk/pull/15297/files/337895c6..e09f65fc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15297&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15297&range=00-01
Stats: 6 lines in 3 files changed: 1 ins; 0 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/15297.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15297/head:pull/15297
PR: https://git.openjdk.org/jdk/pull/15297
More information about the hotspot-compiler-dev
mailing list