Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

@graalvmbot graalvmbot commented Nov 14, 2025

This PR migrates all usages of AnnotatedElement APIs, such as getAnnotation, getAnnotations, getDeclaredAnnotations, and parameter annotation retrieval, from the JVMCI type hierarchy and user code. The APIs in AnnotationValueSupport and AnnotationUtil centered around AnnotationValue and now provide equivalent functionality, better aligned to both HotSpot and non-HotSpot environments. This resolves the major design limitation where reflection-based annotation APIs only worked reliably when JVMCI was running on HotSpot.

In compiler code, annotation queries use AnnotationValueSupport and are thus limited to annotations represented as AnnotationValue objects. Annotation elements are accessed by name (e.g. annotation.getInt("count")).

In SVM code, annotation queries make use of AnnotationUtil to obtain Annotation objects and thus have access to typed element accessors (e.g. annotation.count()).

Required LabsJDK PR: graalvm/labs-openjdk#17

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 14, 2025
@graalvmbot graalvmbot force-pushed the ds/GR-69713 branch 2 times, most recently from 19fd621 to a7d4171 Compare November 18, 2025 09:33
@graalvmbot graalvmbot force-pushed the ds/GR-69713 branch 3 times, most recently from 0909ab7 to bf57db1 Compare November 18, 2025 16:53
@graalvmbot graalvmbot merged commit b224dfa into master Nov 19, 2025
13 checks passed
@graalvmbot graalvmbot deleted the ds/GR-69713 branch November 19, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants