summaryrefslogtreecommitdiff
path: root/src/reference_table.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2013-01-24 12:42:14 -0800
committer Ian Rogers <irogers@google.com> 2013-01-30 16:48:31 -0800
commit2dd0e2cea360bc9206eb88ecc40d259e796c239d (patch)
tree9d619dc9508cbe73e4793bf6f08cbc761abfb48a /src/reference_table.h
parentac21b797b3a425975d656d6b84a7b24401d35f42 (diff)
Directory restructuring of object.h
Break object.h into constituent files. Reduce number of #includes in other GC header files. Introduce -inl.h files to avoid mirror files #include-ing each other. Check invariants of verifier RegTypes for all constructors. Change-Id: Iecf1171c02910ac152d52947330ef456df4043bc
Diffstat (limited to 'src/reference_table.h')
-rw-r--r--src/reference_table.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/reference_table.h b/src/reference_table.h
index f398eb2a44..5abb5c7b46 100644
--- a/src/reference_table.h
+++ b/src/reference_table.h
@@ -22,11 +22,13 @@
#include <string>
#include <vector>
-#include "heap.h"
+#include "locks.h"
+#include "root_visitor.h"
namespace art {
-
+namespace mirror {
class Object;
+} // namespace mirror
// Maintain a table of references. Used for JNI monitor references and
// JNI pinned array references.
@@ -37,18 +39,18 @@ class ReferenceTable {
ReferenceTable(const char* name, size_t initial_size, size_t max_size);
~ReferenceTable();
- void Add(const Object* obj);
+ void Add(const mirror::Object* obj);
- void Remove(const Object* obj);
+ void Remove(const mirror::Object* obj);
size_t Size() const;
void Dump(std::ostream& os) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void VisitRoots(Heap::RootVisitor* visitor, void* arg);
+ void VisitRoots(RootVisitor* visitor, void* arg);
private:
- typedef std::vector<const Object*> Table;
+ typedef std::vector<const mirror::Object*> Table;
static void Dump(std::ostream& os, const Table& entries)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
friend class IndirectReferenceTable; // For Dump.