mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6866190: Remove SIMPLE_STACK code from TaskQueue
What the title says. We don't use SIMPLE_STACK any more. Reviewed-by: ysr
This commit is contained in:
parent
9681f68f38
commit
a67426faf8
1 changed files with 0 additions and 22 deletions
|
@ -465,19 +465,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SIMPLE_STACK 0
|
|
||||||
|
|
||||||
template<class E> inline bool GenericTaskQueue<E>::push(E t) {
|
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;
|
uint localBot = _bottom;
|
||||||
assert((localBot >= 0) && (localBot < N), "_bottom out of range.");
|
assert((localBot >= 0) && (localBot < N), "_bottom out of range.");
|
||||||
idx_t top = _age.top();
|
idx_t top = _age.top();
|
||||||
|
@ -490,18 +478,9 @@ template<class E> inline bool GenericTaskQueue<E>::push(E t) {
|
||||||
} else {
|
} else {
|
||||||
return push_slow(t, dirty_n_elems);
|
return push_slow(t, dirty_n_elems);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class E> inline bool GenericTaskQueue<E>::pop_local(E& t) {
|
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;
|
uint localBot = _bottom;
|
||||||
// This value cannot be N-1. That can only occur as a result of
|
// 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
|
// the assignment to bottom in this method. If it does, this method
|
||||||
|
@ -529,7 +508,6 @@ template<class E> inline bool GenericTaskQueue<E>::pop_local(E& t) {
|
||||||
// path.
|
// path.
|
||||||
return pop_local_slow(localBot, _age.get());
|
return pop_local_slow(localBot, _age.get());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef oop Task;
|
typedef oop Task;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue