RFR: 8296956: [JVMCI] HotSpotResolvedJavaFieldImpl.getIndex returns wrong value
Tobias Hartmann
thartmann at openjdk.org
Tue Nov 15 10:56:33 UTC 2022
On Mon, 14 Nov 2022 19:37:20 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> This PR fixes a bug related to `HotSpotResolvedJavaFieldImpl.index`. Its value is passed into the `HotSpotResolvedJavaFieldImpl` constructor as an `int`, and is returned by `getIndex()` as an `int` but it was stored as a `short`. This meant that unsigned 16-bit values were not handled correctly.
>
> Also included are some related JVMCI cleanups:
> * added and fixed doc related to `ResolvedJavaField.getOffset()`
> * replaced assertions with always-enabled checks
Looks good to me otherwise.
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java line 270:
> 268: opcode == Bytecodes.INVOKEVIRTUAL ||
> 269: opcode == Bytecodes.INVOKESPECIAL ||
> 270: opcode == Bytecodes.INVOKESTATIC) {
Indentation looks a bit off.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11142
More information about the hotspot-dev
mailing list