changeset 54909:f855ec13aa25 jdk-13+15

8220664: Simplify ShenandoahUpdateHeapRefsClosure Reviewed-by: shade
author rkennke
date Wed, 27 Mar 2019 22:25:03 +0100
parents 30067047ed88
children 00fda51e28cf
files src/hotspot/share/gc/shenandoah/shenandoahOopClosures.hpp src/hotspot/share/gc/shenandoah/shenandoahOopClosures.inline.hpp
diffstat 2 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }