Skip to content

Commit f0aae81

Browse files
Xin LiuPaul Hohensee
Xin Liu
authored and
Paul Hohensee
committed
8259020: null-check of g1 write_ref_field_pre_entry is not necessary
Reviewed-by: kbarrett, ayang, phh
1 parent e6f9926 commit f0aae81

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/hotspot/share/gc/g1/g1BarrierSetRuntime.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,8 @@ void G1BarrierSetRuntime::write_ref_array_post_entry(HeapWord* dst, size_t lengt
4545
}
4646

4747
// G1 pre write barrier slowpath
48-
JRT_LEAF(void, G1BarrierSetRuntime::write_ref_field_pre_entry(oopDesc* orig, JavaThread *thread))
49-
if (orig == NULL) {
50-
assert(false, "should be optimized out");
51-
return;
52-
}
48+
JRT_LEAF(void, G1BarrierSetRuntime::write_ref_field_pre_entry(oopDesc* orig, JavaThread* thread))
49+
assert(orig != nullptr, "should be optimized out");
5350
assert(oopDesc::is_oop(orig, true /* ignore mark word */), "Error");
5451
// store the original value that was in the field reference
5552
SATBMarkQueue& queue = G1ThreadLocalData::satb_mark_queue(thread);

0 commit comments

Comments
 (0)