Home
last modified time | relevance | path

Searched refs:CompactDexFile (Results 1 – 16 of 16) sorted by relevance

/art/libdexfile/dex/
Dcompact_dex_file.cc25 constexpr uint8_t CompactDexFile::kDexMagic[kDexMagicSize];
26 constexpr uint8_t CompactDexFile::kDexMagicVersion[];
28 void CompactDexFile::WriteMagic(uint8_t* magic) { in WriteMagic()
32 void CompactDexFile::WriteCurrentVersion(uint8_t* magic) { in WriteCurrentVersion()
36 bool CompactDexFile::IsMagicValid(const uint8_t* magic) { in IsMagicValid()
40 bool CompactDexFile::IsVersionValid(const uint8_t* magic) { in IsVersionValid()
45 bool CompactDexFile::IsMagicValid() const { in IsMagicValid()
49 bool CompactDexFile::IsVersionValid() const { in IsVersionValid()
53 bool CompactDexFile::SupportsDefaultMethods() const { in SupportsDefaultMethods()
58 uint32_t CompactDexFile::GetCodeItemSize(const dex::CodeItem& item) const { in GetCodeItemSize()
[all …]
Dcompact_dex_file_test.cc28 static const size_t len = CompactDexFile::kDexVersionLen + CompactDexFile::kDexMagicSize; in TEST()
34 CompactDexFile::WriteMagic(header); in TEST()
37 CompactDexFile::WriteCurrentVersion(header); in TEST()
39 EXPECT_EQ(valid_magic, CompactDexFile::IsMagicValid(header)); in TEST()
40 EXPECT_EQ(valid_version, CompactDexFile::IsVersionValid(header)); in TEST()
54 uint16_t buffer[sizeof(CompactDexFile::CodeItem) + in TEST()
55 CompactDexFile::CodeItem::kMaxPreHeaderSize] = {}; in TEST()
56 CompactDexFile::CodeItem* code_item = reinterpret_cast<CompactDexFile::CodeItem*>( in TEST()
57 &buffer[CompactDexFile::CodeItem::kMaxPreHeaderSize]); in TEST()
Dcode_item_accessors_test.cc33 CompactDexFile::Header* header = in CreateFakeDex()
34 const_cast<CompactDexFile::Header*>(CompactDexFile::Header::At(data->data())); in CreateFakeDex()
35 CompactDexFile::WriteMagic(header->magic_); in CreateFakeDex()
36 CompactDexFile::WriteCurrentVersion(header->magic_); in CreateFakeDex()
100 CompactDexFile::CodeItem* cdex_code_item = in TEST()
101 reinterpret_cast<CompactDexFile::CodeItem*>(const_cast<uint8_t*>(compact_dex->Begin() + in TEST()
102 CompactDexFile::CodeItem::kMaxPreHeaderSize * sizeof(uint16_t))); in TEST()
Dcode_item_accessors-inl.h38 inline void CodeItemInstructionAccessor::Init<CompactDexFile::CodeItem>(
39 const CompactDexFile::CodeItem& code_item) {
61 Init(down_cast<const CompactDexFile::CodeItem&>(*code_item)); in Init()
92 inline void CodeItemDataAccessor::Init<CompactDexFile::CodeItem>(
93 const CompactDexFile::CodeItem& code_item) {
117 Init(down_cast<const CompactDexFile::CodeItem&>(*code_item)); in Init()
171 inline void CodeItemDebugInfoAccessor::Init<CompactDexFile::CodeItem>(
172 const CompactDexFile::CodeItem& code_item,
174 debug_info_offset_ = down_cast<const CompactDexFile*>(dex_file_)->GetDebugInfoOffset(
195 Init(down_cast<const CompactDexFile::CodeItem&>(*code_item), dex_method_index); in Init()
Dcompact_dex_file.h27 class CompactDexFile : public DexFile {
80 friend class CompactDexFile; variable
243 friend class CompactDexFile; member
287 CompactDexFile(const uint8_t* base,
300 DISALLOW_COPY_AND_ASSIGN(CompactDexFile);
Ddex_file_loader.cc158 CompactDexFile::IsMagicValid(magic); in IsMagicValid()
165 if (CompactDexFile::IsMagicValid(magic)) { in IsVersionAndMagicValid()
166 return CompactDexFile::IsVersionValid(magic); in IsVersionAndMagicValid()
342 } else if (size >= sizeof(CompactDexFile::Header) && CompactDexFile::IsMagicValid(base)) { in OpenCommon()
347 const CompactDexFile::Header* const header = CompactDexFile::Header::At(base); in OpenCommon()
351 dex_file.reset(new CompactDexFile(base, in OpenCommon()
Ddex_file-inl.h435 inline const CompactDexFile* DexFile::AsCompactDexFile() const { in AsCompactDexFile()
437 return down_cast<const CompactDexFile*>(this); in AsCompactDexFile()
Ddex_file.h39 class CompactDexFile; variable
764 ALWAYS_INLINE const CompactDexFile* AsCompactDexFile() const;
Ddex_file_verifier.cc599 ? sizeof(CompactDexFile::Header) in CheckHeader()
/art/dexlayout/
Dcompact_dex_writer.cc147 CompactDexFile::CodeItem::kAlignment, in WriteCodeItem()
150 CompactDexFile::CodeItem disk_code_item; in WriteCodeItem()
152 uint16_t preheader_storage[CompactDexFile::CodeItem::kMaxPreHeaderSize] = {}; in WriteCodeItem()
153 uint16_t* preheader_end = preheader_storage + CompactDexFile::CodeItem::kMaxPreHeaderSize; in WriteCodeItem()
195 stream->Write(&disk_code_item, OFFSETOF_MEMBER(CompactDexFile::CodeItem, insns_)); in WriteCodeItem()
271 CompactDexFile::Header header; in WriteHeader()
272 CompactDexFile::WriteMagic(&header.magic_[0]); in WriteHeader()
273 CompactDexFile::WriteCurrentVersion(&header.magic_[0]); in WriteHeader()
309 header.feature_flags_ |= static_cast<uint32_t>(CompactDexFile::FeatureFlags::kDefaultMethods); in WriteHeader()
316 return sizeof(CompactDexFile::Header); in GetHeaderSize()
[all …]
Ddex_writer.cc795 if (CompactDexFile::IsMagicValid(header_->Magic())) { in WriteHeader()
/art/libartbase/base/
Dcommon_art_test.h115 CompactDexFile::Header* header = in CreateFakeDex()
116 const_cast<CompactDexFile::Header*>(CompactDexFile::Header::At(storage->data())); in CreateFakeDex()
117 CompactDexFile::WriteMagic(header->magic_); in CreateFakeDex()
118 CompactDexFile::WriteCurrentVersion(header->magic_); in CreateFakeDex()
/art/libdexfile/external/
Ddex_file_ext.cc202 if (art::CompactDexFile::IsMagicValid(header->magic_)) { in ExtDexFileOpenFromMemory()
340 const art::CompactDexFile::Header& cdex_header = in ExtDexFileGetMethodInfoForOffset()
/art/dex2oat/
Ddex2oat_test.cc1540 std::vector<std::unique_ptr<const CompactDexFile>> compact_dex_files; in TEST_F()
1546 std::unique_ptr<const CompactDexFile>(dex_file.release()->AsCompactDexFile())); in TEST_F()
1548 for (const std::unique_ptr<const CompactDexFile>& dex_file : compact_dex_files) { in TEST_F()
1550 const CompactDexFile::Header& header = dex_file->GetHeader(); in TEST_F()
1563 for (const std::unique_ptr<const CompactDexFile>& other_dex : compact_dex_files) { in TEST_F()
2111 CompactDexFile::Header header = {}; in TEST_F()
2112 CompactDexFile::WriteMagic(header.magic_); in TEST_F()
2113 CompactDexFile::WriteCurrentVersion(header.magic_); in TEST_F()
2114 header.file_size_ = sizeof(CompactDexFile::Header); in TEST_F()
/art/dex2oat/linker/
Doat_writer.cc3204 if (!CompactDexFile::IsMagicValid(header.magic_) || header.data_size_ == 0u) { in WriteDexFiles()
3305 if (!CompactDexFile::IsMagicValid(header->magic_)) { in WriteDexFiles()
/art/runtime/
Doat_file.cc1897 if (CompactDexFile::IsMagicValid(dex_header->magic_)) { in OatDexFile()