diff options
| author | Andreas Gampe <agampe@google.com> | 2018-12-28 09:39:56 -0800 |
|---|---|---|
| committer | Andreas Gampe <agampe@google.com> | 2019-01-02 10:32:25 -0800 |
| commit | 3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf (patch) | |
| tree | 365d20ad6b68ff1dbd4903764b63880324136e4d /libdexfile/dex/code_item_accessors-inl.h | |
| parent | 0f0a4e40667c87fbd4ae5480eddbfd701bfabfa2 (diff) | |
| download | art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.tar.gz art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.tar.bz2 art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.zip | |
ART: Move dex structs into own header
Separating out the structs from DexFile allows them to be forward-
declared, which reduces the need to include the dex_file header.
Bug: 119869270
Test: m
Change-Id: I32dde5a632884bca7435cd584b4a81883de2e7b4
Diffstat (limited to 'libdexfile/dex/code_item_accessors-inl.h')
| -rw-r--r-- | libdexfile/dex/code_item_accessors-inl.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libdexfile/dex/code_item_accessors-inl.h b/libdexfile/dex/code_item_accessors-inl.h index bbf2224b06..15e34b74be 100644 --- a/libdexfile/dex/code_item_accessors-inl.h +++ b/libdexfile/dex/code_item_accessors-inl.h @@ -48,7 +48,7 @@ inline void CodeItemInstructionAccessor::Init(const StandardDexFile::CodeItem& c } inline void CodeItemInstructionAccessor::Init(const DexFile& dex_file, - const DexFile::CodeItem* code_item) { + const dex::CodeItem* code_item) { if (code_item != nullptr) { DCHECK(dex_file.IsInDataSection(code_item)); if (dex_file.IsCompactDexFile()) { @@ -62,7 +62,7 @@ inline void CodeItemInstructionAccessor::Init(const DexFile& dex_file, inline CodeItemInstructionAccessor::CodeItemInstructionAccessor( const DexFile& dex_file, - const DexFile::CodeItem* code_item) { + const dex::CodeItem* code_item) { Init(dex_file, code_item); } @@ -101,7 +101,7 @@ inline void CodeItemDataAccessor::Init(const StandardDexFile::CodeItem& code_ite } inline void CodeItemDataAccessor::Init(const DexFile& dex_file, - const DexFile::CodeItem* code_item) { + const dex::CodeItem* code_item) { if (code_item != nullptr) { if (dex_file.IsCompactDexFile()) { CodeItemDataAccessor::Init(down_cast<const CompactDexFile::CodeItem&>(*code_item)); @@ -113,12 +113,12 @@ inline void CodeItemDataAccessor::Init(const DexFile& dex_file, } inline CodeItemDataAccessor::CodeItemDataAccessor(const DexFile& dex_file, - const DexFile::CodeItem* code_item) { + const dex::CodeItem* code_item) { Init(dex_file, code_item); } -inline IterationRange<const DexFile::TryItem*> CodeItemDataAccessor::TryItems() const { - const DexFile::TryItem* try_items = DexFile::GetTryItems(end(), 0u); +inline IterationRange<const dex::TryItem*> CodeItemDataAccessor::TryItems() const { + const dex::TryItem* try_items = DexFile::GetTryItems(end(), 0u); return { try_items, try_items + TriesSize() }; @@ -128,8 +128,8 @@ inline const uint8_t* CodeItemDataAccessor::GetCatchHandlerData(size_t offset) c return DexFile::GetCatchHandlerData(end(), TriesSize(), offset); } -inline const DexFile::TryItem* CodeItemDataAccessor::FindTryItem(uint32_t try_dex_pc) const { - IterationRange<const DexFile::TryItem*> try_items(TryItems()); +inline const dex::TryItem* CodeItemDataAccessor::FindTryItem(uint32_t try_dex_pc) const { + IterationRange<const dex::TryItem*> try_items(TryItems()); int32_t index = DexFile::FindTryItem(try_items.begin(), try_items.end() - try_items.begin(), try_dex_pc); @@ -158,7 +158,7 @@ inline const void* CodeItemDataAccessor::CodeItemDataEnd() const { } inline void CodeItemDebugInfoAccessor::Init(const DexFile& dex_file, - const DexFile::CodeItem* code_item, + const dex::CodeItem* code_item, uint32_t dex_method_index) { if (code_item == nullptr) { return; |
