RFR: 8312235: [JVMCI] ConstantPool should not force eager resolution [v2]

Doug Simon dnsimon at openjdk.org
Wed Jul 26 15:43:42 UTC 2023

On Wed, 26 Jul 2023 13:53:04 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>>   avoid bootstrap method invocation by lookupBootstrapMethodInfo
> src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 707:
>> 705:     obj = cp->find_cached_constant_at(index, found_it, CHECK_NULL);
>> 706:     if (!found_it) {
>> 707:       return nullptr;
> Should there be some sort of exception or error checking here or in the caller? If the constant can't be found it either isn't resolved or the index is invalid, correct?

The error checking is already done by the call to `getTagAt` in `HotSpotConstantPool.lookupConstant(int cpi, boolean resolve)`.
I'll add more javadoc to clarify when a null is returned.


PR Review Comment: https://git.openjdk.org/jdk/pull/14927#discussion_r1275162660

More information about the graal-dev mailing list