-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8301497: Replace NULL with nullptr in cpu/s390 #12325
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
Conversation
👋 Welcome back jsjolen! A progress list of the required criteria for merging this PR into |
@jdksjolen The following label 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 list. If you would like to change these labels, use the /label pull request command. |
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.
Reviewed and found a decent chunk of things to fix.
@@ -121,9 +121,9 @@ int AbstractInterpreter::size_activation(int max_stack, | |||
// | |||
// Parameters: | |||
// | |||
// interpreter_frame != NULL: | |||
// interpreter_frame != null: |
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.
nullptr
src/hotspot/cpu/s390/frame_s390.cpp
Outdated
@@ -111,7 +111,7 @@ bool frame::safe_for_sender(JavaThread *thread) { | |||
} | |||
|
|||
// At this point, there still is a chance that fp_safe is false. | |||
// In particular, (fp == NULL) might be true. So let's check and | |||
// In particular, (fp == null) might be true. So let's check and |
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.
nullptr
@@ -404,7 +404,7 @@ void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value | |||
__ z_braz(Lnot_weak); | |||
__ verify_oop(value, FILE_AND_LINE); | |||
DecoratorSet decorators = IN_NATIVE | ON_PHANTOM_OOP_REF; | |||
g1_write_barrier_pre(masm, decorators, (const Address*)NULL, value, noreg, tmp1, tmp2, true); | |||
g1_write_barrier_pre(masm, decorators, (const Address*)nullptr, value, noreg, tmp1, tmp2, true); |
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.
unnecessary cast?
@@ -275,7 +275,7 @@ void InterpreterMacroAssembler::check_and_handle_earlyret(Register scratch_reg) | |||
Register jvmti_thread_state = Z_ARG2; | |||
Register tmp = Z_ARG3; | |||
load_and_test_long(jvmti_thread_state, Address(Z_thread, JavaThread::jvmti_thread_state_offset())); | |||
z_bre(L); // if (thread->jvmti_thread_state() == NULL) exit; | |||
z_bre(L); // if (thread->jvmti_thread_state() == null) exit; |
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.
nullptr
@@ -981,7 +981,7 @@ void InterpreterMacroAssembler::lock_object(Register monitor, Register object) { | |||
// // We stored the monitor address into the object's mark word. | |||
// } else if (THREAD->is_lock_owned((address)displaced_header)) | |||
// // Simple recursive case. | |||
// monitor->lock()->set_displaced_header(NULL); | |||
// monitor->lock()->set_displaced_header(null); |
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.
nullptr
// z_ijava_state->oop_temp = NULL; | ||
// z_ijava_state->oop_temp = null; | ||
__ store_const(Address(fp, oop_tmp_offset), 0); | ||
|
||
// Initialize z_ijava_state->mdx. | ||
Register Rmdp = Z_bcp; | ||
// native_call: assert that mdo == NULL | ||
// native_call: assert that mdo == null |
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.
nullptr
// tos = 0: obj == null or obj is not an instanceof the specified klass | ||
// tos = 1: obj != null and obj is an instanceof the specified 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.
nullptr
@@ -4140,7 +4140,7 @@ void TemplateTable::monitorenter() { | |||
__ bind(exit); | |||
} | |||
|
|||
// Rfree_slot != NULL -> found one | |||
// Rfree_slot != null -> found 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.
nullptr
@@ -82,7 +82,7 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) { | |||
assert(VtableStub::receiver_location() == Z_R2->as_VMReg(), "receiver expected in Z_ARG1"); | |||
|
|||
const Register rcvr_klass = Z_R1_scratch; | |||
address npe_addr = __ pc(); // npe == NULL ptr exception | |||
address npe_addr = __ pc(); // npe == null ptr exception |
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 reads a bit strange.
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.
Read this as "npe means null pointer exception" or however you would like to spell it.
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 it's saying "NPE is short for null pointer exception"?
@@ -195,7 +195,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) { | |||
|
|||
// Get receiver klass. | |||
// Must do an explicit check if offset too large or implicit checks are disabled. | |||
address npe_addr = __ pc(); // npe == NULL ptr exception | |||
address npe_addr = __ pc(); // npe == null ptr exception |
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 reads a bit strange
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.
Read this as "npe means null pointer exception" or however you would like to spell it.
@jdksjolen this pull request can not be integrated into git checkout JDK-8301497
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Don't close yet. |
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.
I have tested release & fast debug build. Tier1 test on fastdebug as well. PR seems clean.
Thank you so much for the changes.
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!
@jdksjolen 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 68 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 |
Thanks! /integrate |
Going to push as commit 54f7b6c.
Your commit was automatically rebased without conflicts. |
@jdksjolen Pushed as commit 54f7b6c. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi, this PR changes all occurrences of NULL to nullptr for the subdirectory cpu/s390. Unfortunately the script that does the change isn't perfect, and so we
need to comb through these manually to make sure nothing has gone wrong. I also review these changes but things slip past my eyes sometimes.
Here are some typical things to look out for:
An example of this:
Note how
nullptr
participates in a code expression here, we really are talking about the specific valuenullptr
.Thanks!
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/12325/head:pull/12325
$ git checkout pull/12325
Update a local copy of the PR:
$ git checkout pull/12325
$ git pull https://git.openjdk.org/jdk.git pull/12325/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12325
View PR using the GUI difftool:
$ git pr show -t 12325
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12325.diff
Webrev
Link to Webrev Comment