Skip to content

Commit

Permalink
8301225: Replace NULL with nullptr in share/gc/shenandoah/
Browse files Browse the repository at this point in the history
Reviewed-by: wkemper, kdnilsen, rkennke
  • Loading branch information
jdksjolen committed Feb 15, 2023
1 parent 26b111d commit 0c96584
Show file tree
Hide file tree
Showing 60 changed files with 533 additions and 533 deletions.
16 changes: 8 additions & 8 deletions src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp
Expand Up @@ -50,11 +50,11 @@ void ShenandoahLoadReferenceBarrierStub::emit_code(LIR_Assembler* ce) {
}

ShenandoahBarrierSetC1::ShenandoahBarrierSetC1() :
_pre_barrier_c1_runtime_code_blob(NULL),
_load_reference_barrier_strong_rt_code_blob(NULL),
_load_reference_barrier_strong_native_rt_code_blob(NULL),
_load_reference_barrier_weak_rt_code_blob(NULL),
_load_reference_barrier_phantom_rt_code_blob(NULL) {}
_pre_barrier_c1_runtime_code_blob(nullptr),
_load_reference_barrier_strong_rt_code_blob(nullptr),
_load_reference_barrier_strong_native_rt_code_blob(nullptr),
_load_reference_barrier_weak_rt_code_blob(nullptr),
_load_reference_barrier_phantom_rt_code_blob(nullptr) {}

void ShenandoahBarrierSetC1::pre_barrier(LIRGenerator* gen, CodeEmitInfo* info, DecoratorSet decorators, LIR_Opr addr_opr, LIR_Opr pre_val) {
// First we test whether marking is in progress.
Expand Down Expand Up @@ -97,7 +97,7 @@ void ShenandoahBarrierSetC1::pre_barrier(LIRGenerator* gen, CodeEmitInfo* info,
assert(addr_opr->is_register(), "must be");
addr_opr = LIR_OprFact::address(new LIR_Address(addr_opr, T_OBJECT));
}
slow = new ShenandoahPreBarrierStub(addr_opr, pre_val, pre_val_patch_code, info ? new CodeEmitInfo(info) : NULL);
slow = new ShenandoahPreBarrierStub(addr_opr, pre_val, pre_val_patch_code, info ? new CodeEmitInfo(info) : nullptr);
} else {
assert(addr_opr == LIR_OprFact::illegalOpr, "sanity");
assert(pre_val->is_register(), "must be");
Expand Down Expand Up @@ -246,7 +246,7 @@ class C1ShenandoahPreBarrierCodeGenClosure : public StubAssemblerCodeGenClosure
virtual OopMapSet* generate_code(StubAssembler* sasm) {
ShenandoahBarrierSetAssembler* bs = (ShenandoahBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
bs->generate_c1_pre_barrier_runtime_stub(sasm);
return NULL;
return nullptr;
}
};

Expand All @@ -260,7 +260,7 @@ class C1ShenandoahLoadReferenceBarrierCodeGenClosure : public StubAssemblerCodeG
virtual OopMapSet* generate_code(StubAssembler* sasm) {
ShenandoahBarrierSetAssembler* bs = (ShenandoahBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
bs->generate_c1_load_reference_barrier_runtime_stub(sasm, _decorators);
return NULL;
return nullptr;
}
};

Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.hpp
Expand Up @@ -53,7 +53,7 @@ class ShenandoahPreBarrierStub: public CodeStub {
// previous value is assumed to have already been loaded into pre_val.
ShenandoahPreBarrierStub(LIR_Opr pre_val) :
_do_load(false), _addr(LIR_OprFact::illegalOpr), _pre_val(pre_val),
_patch_code(lir_patch_none), _info(NULL)
_patch_code(lir_patch_none), _info(nullptr)
{
assert(_pre_val->is_register(), "should be a register");
}
Expand All @@ -69,7 +69,7 @@ class ShenandoahPreBarrierStub: public CodeStub {
if (_do_load) {
// don't pass in the code emit info since it's processed in the fast
// path
if (_info != NULL)
if (_info != nullptr)
visitor->do_slow_case(_info);
else
visitor->do_slow_case();
Expand Down Expand Up @@ -142,7 +142,7 @@ class LIR_OpShenandoahCompareAndSwap : public LIR_Op {
public:
LIR_OpShenandoahCompareAndSwap(LIR_Opr addr, LIR_Opr cmp_value, LIR_Opr new_value,
LIR_Opr t1, LIR_Opr t2, LIR_Opr result)
: LIR_Op(lir_none, result, NULL) // no info
: LIR_Op(lir_none, result, nullptr) // no info
, _addr(addr)
, _cmp_value(cmp_value)
, _new_value(new_value)
Expand Down Expand Up @@ -205,27 +205,27 @@ class ShenandoahBarrierSetC1 : public BarrierSetC1 {
ShenandoahBarrierSetC1();

CodeBlob* pre_barrier_c1_runtime_code_blob() {
assert(_pre_barrier_c1_runtime_code_blob != NULL, "");
assert(_pre_barrier_c1_runtime_code_blob != nullptr, "");
return _pre_barrier_c1_runtime_code_blob;
}

CodeBlob* load_reference_barrier_strong_rt_code_blob() {
assert(_load_reference_barrier_strong_rt_code_blob != NULL, "");
assert(_load_reference_barrier_strong_rt_code_blob != nullptr, "");
return _load_reference_barrier_strong_rt_code_blob;
}

CodeBlob* load_reference_barrier_strong_native_rt_code_blob() {
assert(_load_reference_barrier_strong_native_rt_code_blob != NULL, "");
assert(_load_reference_barrier_strong_native_rt_code_blob != nullptr, "");
return _load_reference_barrier_strong_native_rt_code_blob;
}

CodeBlob* load_reference_barrier_weak_rt_code_blob() {
assert(_load_reference_barrier_weak_rt_code_blob != NULL, "");
assert(_load_reference_barrier_weak_rt_code_blob != nullptr, "");
return _load_reference_barrier_weak_rt_code_blob;
}

CodeBlob* load_reference_barrier_phantom_rt_code_blob() {
assert(_load_reference_barrier_phantom_rt_code_blob != NULL, "");
assert(_load_reference_barrier_phantom_rt_code_blob != nullptr, "");
return _load_reference_barrier_phantom_rt_code_blob;
}

Expand Down

1 comment on commit 0c96584

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.