From 849d09a81907f16d8ccc6019b8baf86a304b730c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 21 Nov 2022 16:50:32 +0100 Subject: Split local reference table out of `IndirectReferenceTable`. In preparation for rewriting the representation of local JNI references, split their implementation out of the shared `IndirectReferenceTable` which shall be used only for global and weak global references going forward. Make the new `LocalReferenceTable` always resizable (remove the enum `ResizableCapacity`) and rename the memory mappings for LRT to "local ref table". Remove `IndirectReferenceTable` code that was needed only for local references, make these tables non-resizable. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 172332525 Change-Id: I87f02c93694577d1b577c4114fa86c2cd23b4c97 --- runtime/reference_table.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/reference_table.h') diff --git a/runtime/reference_table.h b/runtime/reference_table.h index 2ffd866ce7..b204533c36 100644 --- a/runtime/reference_table.h +++ b/runtime/reference_table.h @@ -28,6 +28,9 @@ #include "obj_ptr.h" namespace art { +namespace jni { +class LocalReferenceTable; +} // namespace jni namespace mirror { class Object; } // namespace mirror @@ -61,6 +64,7 @@ class ReferenceTable { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::alloc_tracker_lock_); friend class IndirectReferenceTable; // For Dump. + friend class jni::LocalReferenceTable; // For Dump. std::string name_; Table entries_; -- cgit v1.2.3-59-g8ed1b