-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Bsm refactor #24878
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: master
Are you sure you want to change the base?
Bsm refactor #24878
Conversation
👋 Welcome back jsjolen! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@jdksjolen The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
/contributor add rose00 |
@jdksjolen Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
/contributor add @rose00 |
@jdksjolen |
31afffc
to
03f26e0
Compare
7b8c50e
to
063f607
Compare
#if INCLUDE_CDS | ||
void ResolvedIndyEntry::remove_unshareable_info() { | ||
u2 saved_resolved_references_index = _resolved_references_index; | ||
u2 saved_cpool_index = _cpool_index; | ||
memset(this, 0, sizeof(*this)); | ||
_resolved_references_index = saved_resolved_references_index; | ||
_cpool_index = saved_cpool_index; | ||
_method = nullptr; // resolution sets this pointer; the rest is static | ||
_flags &= ~(1 << resolution_failed_shift); | ||
} |
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.
This needs to be double checked.
@jdksjolen this pull request can not be integrated into git checkout bsm-refactor
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
24b3f1e
to
a36bff7
Compare
Hi,
This is the first commit in #23250 (hash 616f941 ) with some small changes.
Change to
BootstrapMethods
attribute storageThis refactoring changes how we store and access the
BootstrapMethods
attribute in the constant pool.As a reminder, the BSMs attribute has the following format[0]:
Note that each entry in the
bootstraps_methods
array may have a different size, as they may have a differentnum_bootstrap_arguments
. That means that in order to access then
th element in thebootstraps_methods
array you need to know at what byte offset thatn
th element starts. The way we can do that is to have a supplementary array consisting ofu4
s which indicate at which byte offset each entry starts. This PR changes where we store that array.We used to have one single array, called
operands
, which stored both the offsets and BSM attribute together, one after the other. It looked a bit like this:This PR splits them into two:
_bsm_attribute_entries
for storing the actual entries, and_bsm_attribute_offsets
for storing the offsets of each entry into that array.It looks like this:
Add
BootstrapMethodAttributeEntry
Instead of having many BSM attribute specific methods in the ConstantPool class, we introduce the BSMAE class and use that instead. You ask the constant pool for a particular
BSMAE
and you use that to get out the arguments, arg count, etc.The other stuff
There's some other stuff in here, still figuring that out.
[0] https://docs.oracle.com/javase/specs/jvms/se24/html/jvms-4.html#jvms-4.7.23
Progress
Warnings
Contributors
<[email protected]>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24878/head:pull/24878
$ git checkout pull/24878
Update a local copy of the PR:
$ git checkout pull/24878
$ git pull https://git.openjdk.org/jdk.git pull/24878/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24878
View PR using the GUI difftool:
$ git pr show -t 24878
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24878.diff