-
Notifications
You must be signed in to change notification settings - Fork 109
8349945: Implement strict static fields (proposed JVM feature) #1443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: lworld
Are you sure you want to change the base?
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 |
src/hotspot/share/prims/unsafe.cpp
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1443/head:pull/1443
$ git checkout pull/1443
Update a local copy of the PR:
$ git checkout pull/1443
$ git pull https://git.openjdk.org/valhalla.git pull/1443/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1443
View PR using the GUI difftool:
$ git pr show -t 1443
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1443.diff