summaryrefslogtreecommitdiffstats
path: root/runtime/indirect_reference_table.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-05-07 15:43:14 -0700
committerMathieu Chartier <mathieuc@google.com>2014-05-13 14:45:54 -0700
commiteb8167a4f4d27fce0530f6724ab8032610cd146b (patch)
treebcfeaf13ad78f2dd68466bbd0e20c71944f7e854 /runtime/indirect_reference_table.cc
parent6fb66a2bc4e1c0b7931101153e58714991237af7 (diff)
downloadart-eb8167a4f4d27fce0530f6724ab8032610cd146b.zip
art-eb8167a4f4d27fce0530f6724ab8032610cd146b.tar.gz
art-eb8167a4f4d27fce0530f6724ab8032610cd146b.tar.bz2
Add Handle/HandleScope and delete SirtRef.
Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
Diffstat (limited to 'runtime/indirect_reference_table.cc')
-rw-r--r--runtime/indirect_reference_table.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
index b81e43a..432481b 100644
--- a/runtime/indirect_reference_table.cc
+++ b/runtime/indirect_reference_table.cc
@@ -66,7 +66,7 @@ IndirectReferenceTable::IndirectReferenceTable(size_t initialCount,
size_t maxCount, IndirectRefKind desiredKind) {
CHECK_GT(initialCount, 0U);
CHECK_LE(initialCount, maxCount);
- CHECK_NE(desiredKind, kSirtOrInvalid);
+ CHECK_NE(desiredKind, kHandleScopeOrInvalid);
std::string error_str;
const size_t initial_bytes = initialCount * sizeof(const mirror::Object*);
@@ -184,9 +184,9 @@ bool IndirectReferenceTable::Remove(uint32_t cookie, IndirectRef iref) {
int idx = ExtractIndex(iref);
- if (GetIndirectRefKind(iref) == kSirtOrInvalid &&
- Thread::Current()->SirtContains(reinterpret_cast<jobject>(iref))) {
- LOG(WARNING) << "Attempt to remove local SIRT entry from IRT, ignoring";
+ if (GetIndirectRefKind(iref) == kHandleScopeOrInvalid &&
+ Thread::Current()->HandleScopeContains(reinterpret_cast<jobject>(iref))) {
+ LOG(WARNING) << "Attempt to remove local handle scope entry from IRT, ignoring";
return true;
}