6866190: Remove SIMPLE_STACK code from TaskQueue
authortonyp
Wed, 07 Oct 2009 19:01:55 -0400
changeset 4028 be6959017765
parent 4027 1c62fbaf6b68
child 4029 224b03eb54d0
child 4030 4c471254865e
6866190: Remove SIMPLE_STACK code from TaskQueue Summary: What the title says. We don't use SIMPLE_STACK any more. Reviewed-by: ysr
hotspot/src/share/vm/utilities/taskqueue.hpp
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp	Wed Oct 07 09:48:42 2009 -0400
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp	Wed Oct 07 19:01:55 2009 -0400
@@ -465,19 +465,7 @@
 #endif
 };
 
-#define SIMPLE_STACK 0
-
 template<class E> inline bool GenericTaskQueue<E>::push(E t) {
-#if SIMPLE_STACK
-  uint localBot = _bottom;
-  if (_bottom < max_elems()) {
-    _elems[localBot] = t;
-    _bottom = localBot + 1;
-    return true;
-  } else {
-    return false;
-  }
-#else
   uint localBot = _bottom;
   assert((localBot >= 0) && (localBot < N), "_bottom out of range.");
   idx_t top = _age.top();
@@ -490,18 +478,9 @@
   } else {
     return push_slow(t, dirty_n_elems);
   }
-#endif
 }
 
 template<class E> inline bool GenericTaskQueue<E>::pop_local(E& t) {
-#if SIMPLE_STACK
-  uint localBot = _bottom;
-  assert(localBot > 0, "precondition.");
-  localBot--;
-  t = _elems[localBot];
-  _bottom = localBot;
-  return true;
-#else
   uint localBot = _bottom;
   // This value cannot be N-1.  That can only occur as a result of
   // the assignment to bottom in this method.  If it does, this method
@@ -529,7 +508,6 @@
     // path.
     return pop_local_slow(localBot, _age.get());
   }
-#endif
 }
 
 typedef oop Task;