8222403: Shenandoah: Remove ShenandoahAlwaysTrueClosure, use AlwaysTrueClosure instead
authorzgu
Fri, 12 Apr 2019 09:55:30 -0400
changeset 54524 33fda525ad41
parent 54523 5df03f58d25b
child 54525 5ae4d3f46537
8222403: Shenandoah: Remove ShenandoahAlwaysTrueClosure, use AlwaysTrueClosure instead Reviewed-by: shade
src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp
src/hotspot/share/gc/shenandoah/shenandoahStringDedup.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp	Fri Apr 12 09:30:17 2019 -0400
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp	Fri Apr 12 09:55:30 2019 -0400
@@ -115,11 +115,6 @@
 };
 #endif
 
-class ShenandoahAlwaysTrueClosure : public BoolObjectClosure {
-public:
-  bool do_object_b(oop p) { return true; }
-};
-
 class ShenandoahForwardedIsAliveClosure: public BoolObjectClosure {
 private:
   ShenandoahMarkingContext* const _mark_context;
--- a/src/hotspot/share/gc/shenandoah/shenandoahStringDedup.cpp	Fri Apr 12 09:30:17 2019 -0400
+++ b/src/hotspot/share/gc/shenandoah/shenandoahStringDedup.cpp	Fri Apr 12 09:55:30 2019 -0400
@@ -92,7 +92,7 @@
 void ShenandoahStringDedup::oops_do_slow(OopClosure* cl) {
   assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
   assert(is_enabled(), "String deduplication not enabled");
-  ShenandoahAlwaysTrueClosure always_true;
+  AlwaysTrueClosure always_true;
   StringDedupUnlinkOrOopsDoClosure sd_cl(&always_true, cl);
   StringDedupQueue::unlink_or_oops_do(&sd_cl);
   StringDedupTable::unlink_or_oops_do(&sd_cl, 0);