8349945: Implement strict static fields (proposed JVM feature)#1443
8349945: Implement strict static fields (proposed JVM feature)#1443matias9927 wants to merge 14 commits intoopenjdk:lworldfrom
Conversation
|
👋 Welcome back matsaave! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@matias9927 this pull request can not be integrated into git checkout strict_static_8349945
git fetch https://git.openjdk.org/valhalla.git lworld
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge lworld"
git push |
| InstanceKlass* ik = InstanceKlass::cast(klass); | ||
| fieldDescriptor fd; | ||
| if (ik->find_local_field_from_offset((int)sfoffset, true, &fd)) { | ||
| // Note: The Unsafe API takes an OFFSET, but the InstanceKlass wants the INDEX. |
There was a problem hiding this comment.
Is the index available for MethodHandles::init_field_MemberName? Should we pass it there?
A counterargument may be that this only happens in the class initializer so the overhead shouldn't be that hefty.
This patch enables and implements fields with the ACC_STATIC and ACC_STRICT modifiers. To enforce strictness on static fields, the reads and writes on the field are tracked dynamically to ensure that the field is written before being read and written to before .
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1443/head:pull/1443$ git checkout pull/1443Update a local copy of the PR:
$ git checkout pull/1443$ git pull https://git.openjdk.org/valhalla.git pull/1443/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1443View PR using the GUI difftool:
$ git pr show -t 1443Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1443.diff