8151539: Remove duplicate AlwaysTrueClosures

Reviewed-by: tschatzl, mgerdin, kbarrett, drwhite
This commit is contained in:
Stefan Karlsson 2016-03-15 10:11:02 +01:00
parent 3fa2f0cd11
commit 673bfac8ba
9 changed files with 27 additions and 52 deletions

View file

@ -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 {