src/share/vm/utilities/taskqueue.hpp

changeset 1460
1ee412f7fec9
parent 1459
2c03ce058f55
child 1719
5f1f51edaff6
     1.1 --- a/src/share/vm/utilities/taskqueue.hpp	Wed Oct 07 09:48:42 2009 -0400
     1.2 +++ b/src/share/vm/utilities/taskqueue.hpp	Wed Oct 07 19:01:55 2009 -0400
     1.3 @@ -465,19 +465,7 @@
     1.4  #endif
     1.5  };
     1.6  
     1.7 -#define SIMPLE_STACK 0
     1.8 -
     1.9  template<class E> inline bool GenericTaskQueue<E>::push(E t) {
    1.10 -#if SIMPLE_STACK
    1.11 -  uint localBot = _bottom;
    1.12 -  if (_bottom < max_elems()) {
    1.13 -    _elems[localBot] = t;
    1.14 -    _bottom = localBot + 1;
    1.15 -    return true;
    1.16 -  } else {
    1.17 -    return false;
    1.18 -  }
    1.19 -#else
    1.20    uint localBot = _bottom;
    1.21    assert((localBot >= 0) && (localBot < N), "_bottom out of range.");
    1.22    idx_t top = _age.top();
    1.23 @@ -490,18 +478,9 @@
    1.24    } else {
    1.25      return push_slow(t, dirty_n_elems);
    1.26    }
    1.27 -#endif
    1.28  }
    1.29  
    1.30  template<class E> inline bool GenericTaskQueue<E>::pop_local(E& t) {
    1.31 -#if SIMPLE_STACK
    1.32 -  uint localBot = _bottom;
    1.33 -  assert(localBot > 0, "precondition.");
    1.34 -  localBot--;
    1.35 -  t = _elems[localBot];
    1.36 -  _bottom = localBot;
    1.37 -  return true;
    1.38 -#else
    1.39    uint localBot = _bottom;
    1.40    // This value cannot be N-1.  That can only occur as a result of
    1.41    // the assignment to bottom in this method.  If it does, this method
    1.42 @@ -529,7 +508,6 @@
    1.43      // path.
    1.44      return pop_local_slow(localBot, _age.get());
    1.45    }
    1.46 -#endif
    1.47  }
    1.48  
    1.49  typedef oop Task;

mercurial