summaryrefslogtreecommitdiff
path: root/runtime/indirect_reference_table-inl.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-12-08 13:52:00 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-12-08 13:52:00 +0000
commit50bf901b19ccbd0f2759b09a11b4f27e61ac0c02 (patch)
tree445d74cae806f32c99e9286725c9102041427154 /runtime/indirect_reference_table-inl.h
parentfe85442aa7e04c39f76854b7ddfb358360b423ed (diff)
parent849d09a81907f16d8ccc6019b8baf86a304b730c (diff)
Split local reference table out of `IndirectReferenceTable`. am: 849d09a819
Original change: https://android-review.googlesource.com/c/platform/art/+/2309329 Change-Id: I391aa1f8d8cafa0785c4ff3944f7d4e7875fd958 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'runtime/indirect_reference_table-inl.h')
-rw-r--r--runtime/indirect_reference_table-inl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/indirect_reference_table-inl.h b/runtime/indirect_reference_table-inl.h
index 6ea035b22d..23df2c8901 100644
--- a/runtime/indirect_reference_table-inl.h
+++ b/runtime/indirect_reference_table-inl.h
@@ -37,7 +37,7 @@ inline bool IndirectReferenceTable::IsValidReference(IndirectRef iref,
/*out*/std::string* error_msg) const {
DCHECK(iref != nullptr);
DCHECK_EQ(GetIndirectRefKind(iref), kind_);
- const uint32_t top_index = segment_state_.top_index;
+ const uint32_t top_index = top_index_;
uint32_t idx = ExtractIndex(iref);
if (UNLIKELY(idx >= top_index)) {
*error_msg = android::base::StringPrintf("deleted reference at index %u in a table of size %u",
@@ -82,7 +82,7 @@ template<ReadBarrierOption kReadBarrierOption>
inline ObjPtr<mirror::Object> IndirectReferenceTable::Get(IndirectRef iref) const {
DCHECK_EQ(GetIndirectRefKind(iref), kind_);
uint32_t idx = ExtractIndex(iref);
- DCHECK_LT(idx, segment_state_.top_index);
+ DCHECK_LT(idx, top_index_);
DCHECK_EQ(DecodeSerial(reinterpret_cast<uintptr_t>(iref)), table_[idx].GetSerial());
DCHECK(!table_[idx].GetReference()->IsNull());
ObjPtr<mirror::Object> obj = table_[idx].GetReference()->Read<kReadBarrierOption>();
@@ -93,7 +93,7 @@ inline ObjPtr<mirror::Object> IndirectReferenceTable::Get(IndirectRef iref) cons
inline void IndirectReferenceTable::Update(IndirectRef iref, ObjPtr<mirror::Object> obj) {
DCHECK_EQ(GetIndirectRefKind(iref), kind_);
uint32_t idx = ExtractIndex(iref);
- DCHECK_LT(idx, segment_state_.top_index);
+ DCHECK_LT(idx, top_index_);
DCHECK_EQ(DecodeSerial(reinterpret_cast<uintptr_t>(iref)), table_[idx].GetSerial());
DCHECK(!table_[idx].GetReference()->IsNull());
table_[idx].SetReference(obj);