diff options
author | 2023-01-30 14:29:11 +0000 | |
---|---|---|
committer | 2023-02-01 09:52:45 +0000 | |
commit | 0f6af5e3b51a7f5905d09a98ec8d531541666015 (patch) | |
tree | 7ed720cc521bb7f6e3b092cf6900a34d050c3aba /runtime/handle_scope.h | |
parent | d04ed700190056ecd367ee41e6b7f3b87dc7f901 (diff) |
Reland "Write classes in runtime-generated app image."
This reverts commit 24b3d648ff6c2c200003f55ac63fc910d7bfd40f.
Bug: 260557058
Reason for revert:
- Encode class loader context in image, and check it at load time.
- Set nterp entrypoint to methods that can.
Test: test.py
Test: atest com.android.bluetooth.opp.BluetoothOppObexServerSessionTest#onPut_withUnsupportedMimeTypeInHeader_returnsHttpBadRequest
Change-Id: Ibf4a8604c4a226d1acc021103668e211446bb53c
Diffstat (limited to 'runtime/handle_scope.h')
-rw-r--r-- | runtime/handle_scope.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/handle_scope.h b/runtime/handle_scope.h index 89127e4cf3..a43e889111 100644 --- a/runtime/handle_scope.h +++ b/runtime/handle_scope.h @@ -56,6 +56,9 @@ class PACKED(4) BaseHandleScope { template <typename Visitor> ALWAYS_INLINE void VisitRoots(Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); + template <typename Visitor> + ALWAYS_INLINE void VisitHandles(Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); + // Link to previous BaseHandleScope or null. BaseHandleScope* GetLink() const { return link_; @@ -148,6 +151,9 @@ class PACKED(4) HandleScope : public BaseHandleScope { template <typename Visitor> ALWAYS_INLINE void VisitRoots(Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); + template <typename Visitor> + ALWAYS_INLINE void VisitHandles(Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); + protected: // Return backing storage used for references. ALWAYS_INLINE StackReference<mirror::Object>* GetReferences() const { @@ -261,6 +267,9 @@ class VariableSizedHandleScope : public BaseHandleScope { template <typename Visitor> void VisitRoots(Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); + template <typename Visitor> + ALWAYS_INLINE void VisitHandles(Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); + private: static constexpr size_t kLocalScopeSize = 64u; static constexpr size_t kSizeOfReferencesPerScope = |