diff options
author | 2024-11-19 15:58:39 +0000 | |
---|---|---|
committer | 2024-11-21 09:59:40 +0000 | |
commit | 303e0cbc6816e301f22eda7d4233d97482eb1cfa (patch) | |
tree | 42a0442457ee19b58de8bdd6abb9bf3421704726 /runtime/verifier/method_verifier.h | |
parent | 70cb3b60e2b62ce2ca604032570618987f590e2f (diff) |
verifier: Use `ArenaAllocator` in verifier...
... instead of `ScopedArenaAllocator`. We do not use nested
`ScopedArenaAllocator`s, so we can use the `ArenaAllocator`
which guarantees zero-initialization of allcated memory and
avoid an unnecessary `std::fill_n()`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: I04539c95ebf651a3e3b260a0c069ad6ee1eb1e5a
Diffstat (limited to 'runtime/verifier/method_verifier.h')
-rw-r--r-- | runtime/verifier/method_verifier.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h index 5b1f2e0750..74cc6e358e 100644 --- a/runtime/verifier/method_verifier.h +++ b/runtime/verifier/method_verifier.h @@ -24,8 +24,8 @@ #include <android-base/logging.h> #include "base/arena_allocator.h" +#include "base/arena_containers.h" #include "base/macros.h" -#include "base/scoped_arena_containers.h" #include "base/value_object.h" #include "dex/code_item_accessors.h" #include "dex/dex_file_types.h" @@ -66,7 +66,7 @@ class VerifierDeps; // execution of that instruction. class PcToRegisterLineTable { public: - explicit PcToRegisterLineTable(ScopedArenaAllocator& allocator); + explicit PcToRegisterLineTable(ArenaAllocator& allocator); ~PcToRegisterLineTable(); // Initialize the RegisterTable. Every instruction address can have a different set of information @@ -75,7 +75,7 @@ class PcToRegisterLineTable { void Init(InstructionFlags* flags, uint32_t insns_size, uint16_t registers_size, - ScopedArenaAllocator& allocator, + ArenaAllocator& allocator, RegTypeCache* reg_types, uint32_t interesting_dex_pc); @@ -88,7 +88,7 @@ class PcToRegisterLineTable { } private: - ScopedArenaVector<RegisterLineArenaUniquePtr> register_lines_; + ArenaVector<RegisterLineArenaUniquePtr> register_lines_; DISALLOW_COPY_AND_ASSIGN(PcToRegisterLineTable); }; @@ -284,8 +284,7 @@ class MethodVerifier { Thread* const self_; // Arena allocator. - ArenaStack arena_stack_; - ScopedArenaAllocator allocator_; + ArenaAllocator allocator_; RegTypeCache& reg_types_; // TODO: Change to a pointer in a separate CL. |