diff options
author | 2019-12-03 14:36:42 +0000 | |
---|---|---|
committer | 2019-12-04 12:04:36 +0000 | |
commit | a00b54b74bee06c006b8bebfbef85e2801de293c (patch) | |
tree | 6edb2a96c1f89ae913e6b5f190b117cb290239e8 /libdexfile/dex/standard_dex_file.h | |
parent | e571a283b73fb4621c401811f523503b3266564b (diff) |
Helpers and refactorings to prepare for interpreter optimizations (x64)
- Add data structure offsets that will be used in assembly code.
- Be explicit about a stack overflow in a fault handler.
- Move assembly helper code in asm_support so interpreter can use it.
- Support putting literals in InterpreterCache.
- Fix artHandleFillArrayDataFromCode for x64.
Bug: 119800099
Test: test.py
Change-Id: I2729f87fe5d09c04ae2e7081636f0cd89ac14c21
Diffstat (limited to 'libdexfile/dex/standard_dex_file.h')
-rw-r--r-- | libdexfile/dex/standard_dex_file.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libdexfile/dex/standard_dex_file.h b/libdexfile/dex/standard_dex_file.h index db82a9bf20..3af36f6791 100644 --- a/libdexfile/dex/standard_dex_file.h +++ b/libdexfile/dex/standard_dex_file.h @@ -35,6 +35,22 @@ class StandardDexFile : public DexFile { struct CodeItem : public dex::CodeItem { static constexpr size_t kAlignment = 4; + static constexpr size_t InsSizeOffset() { + return OFFSETOF_MEMBER(CodeItem, ins_size_); + } + + static constexpr size_t OutsSizeOffset() { + return OFFSETOF_MEMBER(CodeItem, outs_size_); + } + + static constexpr size_t RegistersSizeOffset() { + return OFFSETOF_MEMBER(CodeItem, registers_size_); + } + + static constexpr size_t InsnsOffset() { + return OFFSETOF_MEMBER(CodeItem, insns_); + } + private: CodeItem() = default; |