-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8314684: Add overview docs to loaderConstraints.cpp #15372
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
8314684: Add overview docs to loaderConstraints.cpp #15372
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
Webrevs
|
calvinccheung
left a comment
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.
Looks good. Just noticed some typos.
| // | ||
| // Management of LoaderConstraints | ||
| // | ||
| // When the SyswtemDictionary decides that loader_x and loader_y must resolve the name N to the same class: |
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.
Typo: SyswtemDictionary should be SystemDictionary
| // we assign _klass_<m> = K; | ||
| // | ||
| // if _klass_<m> is non-null, when a loader loader_<m><n> tries to resolve the name N to a class K, | ||
| // where _klass_<m> != K, a LinkageError is thrown, and the resolution fails; |
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.
Suggestion: '.' instead of ';'
| // both loader_x and loader_y; | ||
| // | ||
| // Otherwise if LoaderConstraint_x exists but LoaderConstraint_y doesn't exist, add loader_y to LoaderConstraint_x; | ||
| // (and vice versa); |
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.
Suggestion: s/and/or
Also, I think the parentheses could be removed.
|
@iklam This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 17 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
dholmes-ora
left a comment
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.
Well it reads really well and is informative, but is it correct? Hard to evaluate. It would be clearer if the commentary tied into the code more so that I knew where to see each of the things mentioned, and also understand how the different types (LoaderConstraint, ConstraintSet) fit in that description.
Thanks.
I added ConstraintSet to the comments. I also added references to the I have skipped some details to avoid being verbose. For example, |
| // | ||
| // Otherwise if both LoaderConstraints have different values for _klass, a LinkageError is thrown. | ||
| // | ||
| // Otherwise the two LoaderConstraints are merged into one. |
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.
So I looked in LoaderConstraintTable::add_entry to see how this algorithm applied and I could not figure out what condition is actually left (regarding pp1 and pp2) when we get to the merge case at L396 ???
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.
Never mind I see it now: pp1 != pp2 and neither is null.
dholmes-ora
left a comment
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.
Thanks for the update.
Looks good - very useful.
|
Thanks for the review @calvinccheung and @dholmes-ora |
|
Going to push as commit 752a438.
Your commit was automatically rebased without conflicts. |
I added some documentation to make it easier to understand loaderConstraints.cpp. Please review and check if my description is actually correct. Thanks!
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15372/head:pull/15372$ git checkout pull/15372Update a local copy of the PR:
$ git checkout pull/15372$ git pull https://git.openjdk.org/jdk.git pull/15372/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15372View PR using the GUI difftool:
$ git pr show -t 15372Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15372.diff
Webrev
Link to Webrev Comment