Skip to content

Commit 4f16161

Browse files
committed
8309044: Replace NULL with nullptr, final sweep of hotspot code
Reviewed-by: stefank, dholmes, kvn, amitkumar
1 parent 8823626 commit 4f16161

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+114
-114
lines changed

src/hotspot/cpu/aarch64/jvmciCodeInstaller_aarch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong forei
122122
}
123123

124124
void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, methodHandle& method, jint pc_offset, JVMCI_TRAPS) {
125-
NativeCall* call = NULL;
125+
NativeCall* call = nullptr;
126126
switch (_next_call_type) {
127127
case INLINE_INVOKE:
128128
return;
@@ -155,7 +155,7 @@ void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, methodHandle& metho
155155
if (Continuations::enabled()) {
156156
// Check for proper post_call_nop
157157
NativePostCallNop* nop = nativePostCallNop_at(call->next_instruction_address());
158-
if (nop == NULL) {
158+
if (nop == nullptr) {
159159
JVMCI_ERROR("missing post call nop at offset %d", pc_offset);
160160
} else {
161161
_instructions->relocate(call->next_instruction_address(), relocInfo::post_call_nop_type);

src/hotspot/cpu/ppc/macroAssembler_ppc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ class MacroAssembler: public Assembler {
732732

733733
// Load/Store klass oop from klass field. Compress.
734734
void load_klass(Register dst, Register src);
735-
void load_klass_check_null(Register dst, Register src, Label* is_null = NULL);
735+
void load_klass_check_null(Register dst, Register src, Label* is_null = nullptr);
736736
void store_klass(Register dst_oop, Register klass, Register tmp = R0);
737737
void store_klass_gap(Register dst_oop, Register val = noreg); // Will store 0 if val not specified.
738738

src/hotspot/cpu/ppc/stubGenerator_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4697,7 +4697,7 @@ class StubGenerator: public StubCodeGenerator {
46974697
StubRoutines::_call_stub_entry = generate_call_stub(StubRoutines::_call_stub_return_address);
46984698
StubRoutines::_catch_exception_entry = generate_catch_exception();
46994699

4700-
if (UnsafeCopyMemory::_table == NULL) {
4700+
if (UnsafeCopyMemory::_table == nullptr) {
47014701
UnsafeCopyMemory::create_table(8);
47024702
}
47034703

src/hotspot/cpu/ppc/templateTable_ppc_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2294,7 +2294,7 @@ void TemplateTable::load_invokedynamic_entry(Register method) {
22942294
__ load_resolved_indy_entry(cache, index);
22952295
__ ld_ptr(method, array_base_offset + in_bytes(ResolvedIndyEntry::method_offset()), cache);
22962296

2297-
// The invokedynamic is unresolved iff method is NULL
2297+
// The invokedynamic is unresolved iff method is null
22982298
__ cmpdi(CCR0, method, 0);
22992299
__ bne(CCR0, resolved);
23002300

src/hotspot/cpu/riscv/codeBuffer_riscv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static bool emit_shared_trampolines(CodeBuffer* cb, CodeBuffer::SharedTrampoline
7171

7272
assert(requests->number_of_entries() >= 1, "at least one");
7373
const int total_requested_size = MacroAssembler::max_trampoline_stub_size() * requests->number_of_entries();
74-
if (cb->stubs()->maybe_expand_to_ensure_remaining(total_requested_size) && cb->blob() == NULL) {
74+
if (cb->stubs()->maybe_expand_to_ensure_remaining(total_requested_size) && cb->blob() == nullptr) {
7575
return false;
7676
}
7777

src/hotspot/cpu/riscv/gc/shared/barrierSetAssembler_riscv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,5 +371,5 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register
371371

372372
// Make sure klass is 'reasonable', which is not zero.
373373
__ load_klass(obj, obj, tmp1); // get klass
374-
__ beqz(obj, error); // if klass is NULL it is broken
374+
__ beqz(obj, error); // if klass is null it is broken
375375
}

src/hotspot/cpu/riscv/stubGenerator_riscv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4011,7 +4011,7 @@ class StubGenerator: public StubCodeGenerator {
40114011

40124012
StubRoutines::_forward_exception_entry = generate_forward_exception();
40134013

4014-
if (UnsafeCopyMemory::_table == NULL) {
4014+
if (UnsafeCopyMemory::_table == nullptr) {
40154015
UnsafeCopyMemory::create_table(8);
40164016
}
40174017

@@ -4069,7 +4069,7 @@ class StubGenerator: public StubCodeGenerator {
40694069
generate_arraycopy_stubs();
40704070

40714071
BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
4072-
if (bs_nm != NULL) {
4072+
if (bs_nm != nullptr) {
40734073
StubRoutines::riscv::_method_entry_barrier = generate_method_entry_barrier();
40744074
}
40754075

src/hotspot/cpu/x86/gc/shared/barrierSetAssembler_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,5 +486,5 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register
486486
// make sure klass is 'reasonable', which is not zero.
487487
__ load_klass(obj, obj, tmp1); // get klass
488488
__ testptr(obj, obj);
489-
__ jcc(Assembler::zero, error); // if klass is NULL it is broken
489+
__ jcc(Assembler::zero, error); // if klass is null it is broken
490490
}

src/hotspot/cpu/x86/interp_masm_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void InterpreterMacroAssembler::call_VM_base(Register oop_result,
300300
cmpptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
301301
jcc(Assembler::equal, L);
302302
stop("InterpreterMacroAssembler::call_VM_base:"
303-
" last_sp != nullptr");
303+
" last_sp isn't null");
304304
bind(L);
305305
}
306306
#endif /* ASSERT */

src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &, methodHandle& method, j
188188
if (Continuations::enabled()) {
189189
// Check for proper post_call_nop
190190
NativePostCallNop* nop = nativePostCallNop_at(call->next_instruction_address());
191-
if (nop == NULL) {
191+
if (nop == nullptr) {
192192
JVMCI_ERROR("missing post call nop at offset %d", pc_offset);
193193
} else {
194194
_instructions->relocate(call->next_instruction_address(), relocInfo::post_call_nop_type);

0 commit comments

Comments
 (0)