8220664: Simplify ShenandoahUpdateHeapRefsClosure jdk-13+15
authorrkennke
Wed, 27 Mar 2019 22:25:03 +0100
changeset 54414 f855ec13aa25
parent 54413 30067047ed88
child 54415 00fda51e28cf
8220664: Simplify ShenandoahUpdateHeapRefsClosure Reviewed-by: shade
src/hotspot/share/gc/shenandoah/shenandoahOopClosures.hpp
src/hotspot/share/gc/shenandoah/shenandoahOopClosures.inline.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahOopClosures.hpp	Wed Apr 03 11:30:23 2019 -0400
+++ b/src/hotspot/share/gc/shenandoah/shenandoahOopClosures.hpp	Wed Mar 27 22:25:03 2019 +0100
@@ -184,24 +184,16 @@
   virtual bool do_metadata()        { return true; }
 };
 
-class ShenandoahUpdateHeapRefsSuperClosure : public BasicOopIterateClosure {
+class ShenandoahUpdateHeapRefsClosure : public BasicOopIterateClosure {
 private:
   ShenandoahHeap* _heap;
-public:
-  ShenandoahUpdateHeapRefsSuperClosure() :
-    _heap(ShenandoahHeap::heap()) {}
 
   template <class T>
-  void work(T *p);
-};
-
-class ShenandoahUpdateHeapRefsClosure : public ShenandoahUpdateHeapRefsSuperClosure {
-private:
-  template <class T>
-  inline  void do_oop_work(T* p)    { work<T>(p); }
+  void do_oop_work(T* p);
 
 public:
-  ShenandoahUpdateHeapRefsClosure() : ShenandoahUpdateHeapRefsSuperClosure() {}
+  ShenandoahUpdateHeapRefsClosure() :
+    _heap(ShenandoahHeap::heap()) {}
 
   virtual void do_oop(narrowOop* p) { do_oop_work(p); }
   virtual void do_oop(oop* p)       { do_oop_work(p); }
--- a/src/hotspot/share/gc/shenandoah/shenandoahOopClosures.inline.hpp	Wed Apr 03 11:30:23 2019 -0400
+++ b/src/hotspot/share/gc/shenandoah/shenandoahOopClosures.inline.hpp	Wed Mar 27 22:25:03 2019 +0100
@@ -34,7 +34,7 @@
 }
 
 template <class T>
-inline void ShenandoahUpdateHeapRefsSuperClosure::work(T* p) {
+inline void ShenandoahUpdateHeapRefsClosure::do_oop_work(T* p) {
   _heap->maybe_update_with_forwarded(p);
 }