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/runtime.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index 9b6f545b05..c3f1a706f8 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -68,6 +68,10 @@ class JitCodeCache; class JitOptions; } // namespace jit +namespace jni { +class SmallLrtAllocator; +} // namespace jni + namespace mirror { class Array; class ClassLoader; @@ -107,7 +111,6 @@ class Plugin; struct RuntimeArgumentMap; class RuntimeCallbacks; class SignalCatcher; -class SmallIrtAllocator; class StackOverflowHandler; class SuspensionHandler; class ThreadList; @@ -370,8 +373,8 @@ class Runtime { return class_linker_; } - SmallIrtAllocator* GetSmallIrtAllocator() const { - return small_irt_allocator_; + jni::SmallLrtAllocator* GetSmallLrtAllocator() const { + return small_lrt_allocator_; } jni::JniIdManager* GetJniIdManager() const { @@ -1319,7 +1322,7 @@ class Runtime { SignalCatcher* signal_catcher_; - SmallIrtAllocator* small_irt_allocator_; + jni::SmallLrtAllocator* small_lrt_allocator_; std::unique_ptr jni_id_manager_; -- cgit v1.2.3-59-g8ed1b