JDK-8349743 : [JVMCI] change MetaAccessProvider.getArrayBaseOffset to return long
Type:Enhancement
Component:hotspot
Sub-Component:compiler
Affected Version:25
Priority:P4
Status:Closed
Resolution:Withdrawn
Submitted:2025-02-10
Updated:2025-03-12
Resolved:2025-03-12
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
For consistency with JDK-8344168, array base offsets in JVMCI should be converted from int to long.
Comments
Actually JVMCI should stay aligned with Unsafe.arrayBaseOffset0 which has not changed:
* https://github.com/openjdk/jdk/blob/a21fa463c4f8d067c18c09a072f3cdfa772aea5e/src/java.base/share/classes/jdk/internal/misc/Unsafe.java#L3853
* https://github.com/openjdk/jdk/blob/a21fa463c4f8d067c18c09a072f3cdfa772aea5e/src/hotspot/share/prims/unsafe.cpp#L608
12-03-2025
Confirmed that JDK-8344168 will not be backed out. [~dnsimon] there are quite many Graal changes to adapt to this JVMCI change. Do we have other justification than just aligning with Unsafe, which I think is initially for a better C2 optimization? The implementation in [CompilerToVM](https://github.com/openjdk/jdk/blob/a21fa463c4f8d067c18c09a072f3cdfa772aea5e/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp#L2503) will return int anyway.