diff options
author | 2017-11-06 20:02:24 -0800 | |
---|---|---|
committer | 2017-11-09 19:06:10 -0800 | |
commit | 69147f165efaa9da152bb37da3a16dd5d8c6cf3c (patch) | |
tree | 25dbec549b8c06cf24729a577c76ef0b6d3d4c7f /compiler/dex/inline_method_analyser.h | |
parent | 2202d56061941b4fecbdb018d84bcefb05b6c683 (diff) |
Add code item accessor helper classes
Add classes to abstract accesses to code item data. These classes
handle both standard dex and compact dex.
Added:
- CodeItemInstructionsAccessor to handle code item instructions.
- CodeItemDataAccessor to handle code item data excluding debug info.
Moved inline_method_analyzer to use the new classes to test the new
APIs.
Bug: 63756964
Test: test-art-host
Change-Id: I9926acb77b81fa64ed4a3b49b7bed1aab30a0f33
Diffstat (limited to 'compiler/dex/inline_method_analyser.h')
-rw-r--r-- | compiler/dex/inline_method_analyser.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/dex/inline_method_analyser.h b/compiler/dex/inline_method_analyser.h index a35e97fa11..cde2147995 100644 --- a/compiler/dex/inline_method_analyser.h +++ b/compiler/dex/inline_method_analyser.h @@ -30,6 +30,8 @@ namespace art { +class CodeItemDataAccessor; + namespace verifier { class MethodVerifier; } // namespace verifier @@ -121,21 +123,21 @@ class InlineMethodAnalyser { static bool IsSyntheticAccessor(MethodReference ref); private: - static bool AnalyseMethodCode(const DexFile::CodeItem* code_item, + static bool AnalyseMethodCode(const CodeItemDataAccessor* code_item, const MethodReference& method_ref, bool is_static, ArtMethod* method, InlineMethod* result) REQUIRES_SHARED(Locks::mutator_lock_); - static bool AnalyseReturnMethod(const DexFile::CodeItem* code_item, InlineMethod* result); - static bool AnalyseConstMethod(const DexFile::CodeItem* code_item, InlineMethod* result); - static bool AnalyseIGetMethod(const DexFile::CodeItem* code_item, + static bool AnalyseReturnMethod(const CodeItemDataAccessor* code_item, InlineMethod* result); + static bool AnalyseConstMethod(const CodeItemDataAccessor* code_item, InlineMethod* result); + static bool AnalyseIGetMethod(const CodeItemDataAccessor* code_item, const MethodReference& method_ref, bool is_static, ArtMethod* method, InlineMethod* result) REQUIRES_SHARED(Locks::mutator_lock_); - static bool AnalyseIPutMethod(const DexFile::CodeItem* code_item, + static bool AnalyseIPutMethod(const CodeItemDataAccessor* code_item, const MethodReference& method_ref, bool is_static, ArtMethod* method, |