mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
8151539
: Remove duplicate AlwaysTrueClosures
Reviewed-by: tschatzl, mgerdin, kbarrett, drwhite
This commit is contained in:
parent
3fa2f0cd11
commit
673bfac8ba
9 changed files with 27 additions and 52 deletions
|
@ -213,6 +213,16 @@ class BoolObjectClosure : public Closure {
|
|||
virtual bool do_object_b(oop obj) = 0;
|
||||
};
|
||||
|
||||
class AlwaysTrueClosure: public BoolObjectClosure {
|
||||
public:
|
||||
bool do_object_b(oop p) { return true; }
|
||||
};
|
||||
|
||||
class AlwaysFalseClosure : public BoolObjectClosure {
|
||||
public:
|
||||
bool do_object_b(oop p) { return false; }
|
||||
};
|
||||
|
||||
// Applies an oop closure to all ref fields in objects iterated over in an
|
||||
// object iteration.
|
||||
class ObjectToOopClosure: public ObjectClosure {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue