-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
8336275: Move common Method and Constructor fields to Executable #20188
Conversation
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
@liach This change is no longer ready for integration - check the PR body for details. |
s/Field/Constructor I was a bit confused about executable fields for a moment. :) |
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.
Hotspot changes look good. Core-libs do too but I will leave that for libs folk to approve
/reviewers 2 |
@dholmes-ora |
/reviewers 2 reviewer |
Just noted that I removed some abstract flags from |
…executable-inline
@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
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.
Catching up on reviews, core libs changes look fine. Since Executable is sealed with Constructor and Executable on its permits lists, moving methods up and down the hierarchy (as long as there are concrete methods on Constructor and Method) is fine.
Can anyone review the associated csr? |
Handle java_lang_reflect_Constructor::create(TRAPS) { | ||
assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); | ||
Klass* k = vmClasses::reflect_Constructor_klass(); | ||
InstanceKlass* ik = InstanceKlass::cast(k); |
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 doesn't need a cast because vmClasses returns InstanceKlass.
#define METHOD_FIELDS_DO(macro) \ | ||
macro(_name_offset, k, vmSymbols::name_name(), string_signature, false); \ | ||
macro(_returnType_offset, k, vmSymbols::returnType_name(), class_signature, false); \ | ||
macro(_annotation_default_offset, k, vmSymbols::annotation_default_name(), byte_array_signature, false); |
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.
Can you re-align these since you modified them?
|
||
void java_lang_reflect_Constructor::set_parameter_types(oop constructor, oop value) { | ||
constructor->obj_field_put(_parameterTypes_offset, value); | ||
Klass* klass = vmClasses::reflect_Method_klass(); |
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 also does not need a cast, vmClasses::reflect_Method_klass() returns an InstanceKlass.
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.
The hotspot code looks okay, but I have a couple of small cleanup requests in the changes.
The new model here may no longer be valid now that deconstructors and patterns are being added. May revisit only if we are sure of the new model of deconstructors. |
Move fields common to Method and Field to executable, which simplifies implementation. Removed useless transient modifiers as Method and Field were never serializable.
Note to core-libs reviewers: Please review the associated CSR on trivial removal of
abstract
modifier as well.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20188/head:pull/20188
$ git checkout pull/20188
Update a local copy of the PR:
$ git checkout pull/20188
$ git pull https://git.openjdk.org/jdk.git pull/20188/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20188
View PR using the GUI difftool:
$ git pr show -t 20188
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20188.diff
Webrev
Link to Webrev Comment