mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
8038628: Remove unused Closure::abort()
Reviewed-by: coleenp, jmasa
This commit is contained in:
parent
1fdc7cd78f
commit
f2de069dc2
2 changed files with 2 additions and 18 deletions
|
@ -472,9 +472,6 @@ HeapRegion::object_iterate_mem_careful(MemRegion mr,
|
||||||
} else if (!g1h->is_obj_dead(obj)) {
|
} else if (!g1h->is_obj_dead(obj)) {
|
||||||
cl->do_object(obj);
|
cl->do_object(obj);
|
||||||
}
|
}
|
||||||
if (cl->abort()) return cur;
|
|
||||||
// The check above must occur before the operation below, since an
|
|
||||||
// abort might invalidate the "size" operation.
|
|
||||||
cur += obj->size();
|
cur += obj->size();
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
#include "runtime/prefetch.hpp"
|
#include "runtime/prefetch.hpp"
|
||||||
#include "utilities/top.hpp"
|
#include "utilities/top.hpp"
|
||||||
|
|
||||||
// The following classes are C++ `closures` for iterating over objects, roots and spaces
|
|
||||||
|
|
||||||
class CodeBlob;
|
class CodeBlob;
|
||||||
class nmethod;
|
class nmethod;
|
||||||
class ReferenceProcessor;
|
class ReferenceProcessor;
|
||||||
|
@ -39,22 +37,11 @@ class DataLayout;
|
||||||
class KlassClosure;
|
class KlassClosure;
|
||||||
class ClassLoaderData;
|
class ClassLoaderData;
|
||||||
|
|
||||||
// Closure provides abortability.
|
// The following classes are C++ `closures` for iterating over objects, roots and spaces
|
||||||
|
|
||||||
class Closure : public StackObj {
|
class Closure : public StackObj { };
|
||||||
protected:
|
|
||||||
bool _abort;
|
|
||||||
void set_abort() { _abort = true; }
|
|
||||||
public:
|
|
||||||
Closure() : _abort(false) {}
|
|
||||||
// A subtype can use this mechanism to indicate to some iterator mapping
|
|
||||||
// functions that the iteration should cease.
|
|
||||||
bool abort() { return _abort; }
|
|
||||||
void clear_abort() { _abort = false; }
|
|
||||||
};
|
|
||||||
|
|
||||||
// OopClosure is used for iterating through references to Java objects.
|
// OopClosure is used for iterating through references to Java objects.
|
||||||
|
|
||||||
class OopClosure : public Closure {
|
class OopClosure : public Closure {
|
||||||
public:
|
public:
|
||||||
virtual void do_oop(oop* o) = 0;
|
virtual void do_oop(oop* o) = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue