RFR: 8296958: [JVMCI] add API for retrieving ConstantValue attributes

Doug Simon dnsimon at openjdk.org
Mon Nov 14 20:29:05 UTC 2022


In order to properly initialize classes in a native image at run time, Native Image needs to capture the value of [`ConstantValue` attributes](https://docs.oracle.com/javase/specs/jvms/se19/html/jvms-4.html#jvms-4.7.2) at image build time. This PR adds `ResolvedJavaField.getConstantValue()` for this purpose.

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

Commit messages:
 - added ResolvedJavaField.getConstantValue

Changes: https://git.openjdk.org/jdk/pull/11144/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11144&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296958
  Stats: 204 lines in 9 files changed: 198 ins; 5 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/11144.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11144/head:pull/11144

PR: https://git.openjdk.org/jdk/pull/11144


More information about the hotspot-compiler-dev mailing list