src/hotspot/share/gc/g1/g1FullGCOopClosures.hpp
changeset 49607 acffe6ff3ae7
parent 47885 5caa1d5f74c1
child 49827 a4672513d6e3
--- a/src/hotspot/share/gc/g1/g1FullGCOopClosures.hpp	Mon Mar 26 16:51:43 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1FullGCOopClosures.hpp	Mon Mar 26 16:51:43 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,43 +79,16 @@
   void do_cld_nv(ClassLoaderData* cld);
 };
 
-class G1AdjustClosure : public OopClosure {
+class G1AdjustClosure : public ExtendedOopClosure {
+  template <class T> static inline void adjust_pointer(T* p);
 public:
-  template <class T> static inline oop adjust_pointer(T* p);
-  virtual void do_oop(oop* p);
-  virtual void do_oop(narrowOop* p);
-};
-
-class G1AdjustAndRebuildClosure : public ExtendedOopClosure {
-  uint _worker_id;
-  size_t _compaction_delta;
-  G1CollectedHeap* _g1h;
-
-  inline size_t calculate_compaction_delta(oop current, oop forwardee);
-  template <class T> inline T* add_compaction_delta(T* p);
-
-public:
-  G1AdjustAndRebuildClosure(uint worker_id);
-
-  void update_compaction_delta(oop obj);
-
-  template <class T> inline void add_reference(T* from_field, oop reference, uint worker_id);
-  template <class T> void do_oop_nv(T* p);
+  template <class T> void do_oop_nv(T* p) { adjust_pointer(p); }
   virtual void do_oop(oop* p);
   virtual void do_oop(narrowOop* p);
 
   virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; }
 };
 
-class G1AdjustObjectClosure {
-  G1AdjustAndRebuildClosure* _closure;
-
-public:
-  G1AdjustObjectClosure(G1AdjustAndRebuildClosure* cl) : _closure(cl) { }
-
-  inline int adjust_object(oop obj);
-};
-
 class G1VerifyOopClosure: public OopClosure {
 private:
   G1CollectedHeap* _g1h;