diff options
Diffstat (limited to 'runtime/dex_file-inl.h')
-rw-r--r-- | runtime/dex_file-inl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/dex_file-inl.h b/runtime/dex_file-inl.h index 58cd48631d..c926a0d7fc 100644 --- a/runtime/dex_file-inl.h +++ b/runtime/dex_file-inl.h @@ -135,9 +135,13 @@ inline const char* DexFile::GetShorty(uint32_t proto_idx) const { } inline const DexFile::TryItem* DexFile::GetTryItems(const CodeItem& code_item, uint32_t offset) { - const uint16_t* insns_end_ = &code_item.insns_[code_item.insns_size_in_code_units_]; + return GetTryItems(code_item.Instructions().end(), offset); +} + +inline const DexFile::TryItem* DexFile::GetTryItems(const DexInstructionIterator& code_item_end, + uint32_t offset) { return reinterpret_cast<const TryItem*> - (RoundUp(reinterpret_cast<uintptr_t>(insns_end_), 4)) + offset; + (RoundUp(reinterpret_cast<uintptr_t>(&code_item_end.Inst()), 4)) + offset; } static inline bool DexFileStringEquals(const DexFile* df1, dex::StringIndex sidx1, |