RFR: 8315771: [JVMCI] Resolution of bootstrap methods with int[] static arguments [v5]

Sacha Coppey duke at openjdk.org
Wed Sep 13 14:39:46 UTC 2023


On Wed, 13 Sep 2023 14:18:10 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> The assertion is [here](https://github.com/openjdk/jdk/blob/bd477810b176696e0fd043f5594663ebcf9884cf/src/hotspot/share/oops/constantPool.hpp#L621-L625). I don't think we can throw exception there. I could check the size in `jvmciCompilerToVM.bootstrapArgumentIndexAt`, but it would require a bit of code duplication to obtain it.
>
> Ok. You should just add a note in the javadoc that the result is undefined if `index` is out of bounds. This is all internal API so I assume we can guarantee the value is correct?

Yes, it is only used in `CachedBSMArgs.get`, which will throw an `ArrayIndexOutOfBoundsException` before we arrive there.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15588#discussion_r1324617085


More information about the hotspot-compiler-dev mailing list