diff options
author | 2022-11-21 16:50:32 +0100 | |
---|---|---|
committer | 2022-12-08 13:28:57 +0000 | |
commit | 849d09a81907f16d8ccc6019b8baf86a304b730c (patch) | |
tree | 9f85c789e9ac154a3363bcd7a5c0230e8b5fee3d /runtime/thread.cc | |
parent | 01b7cad2a160e9d192eb7ddd5303255ab4c15278 (diff) |
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
Diffstat (limited to 'runtime/thread.cc')
-rw-r--r-- | runtime/thread.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc index a8b0e17c69..751bd09e24 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -2768,9 +2768,9 @@ ObjPtr<mirror::Object> Thread::DecodeJObject(jobject obj) const { bool expect_null = false; // The "kinds" below are sorted by the frequency we expect to encounter them. if (kind == kLocal) { - IndirectReferenceTable& locals = tlsPtr_.jni_env->locals_; + jni::LocalReferenceTable& locals = tlsPtr_.jni_env->locals_; // Local references do not need a read barrier. - result = locals.Get<kWithoutReadBarrier>(ref); + result = locals.Get(ref); } else if (kind == kJniTransition) { // The `jclass` for a static method points to the CompressedReference<> in the // `ArtMethod::declaring_class_`. Other `jobject` arguments point to spilled stack |