Lines Matching refs:header_
113 : header_(dex_layout->GetHeader()), in DexWriter()
234 for (auto& string_id : header_->StringIds()) { in WriteStringIds()
244 header_->StringIds().SetOffset(start); in WriteStringIds()
259 for (auto& string_data : header_->StringDatas()) { in WriteStringDatas()
263 header_->StringDatas().SetOffset(start); in WriteStringDatas()
270 for (auto& type_id : header_->TypeIds()) { in WriteTypeIds()
277 header_->TypeIds().SetOffset(start); in WriteTypeIds()
285 for (auto& type_list : header_->TypeLists()) { in WriteTypeLists()
296 header_->TypeLists().SetOffset(start); in WriteTypeLists()
303 for (auto& proto_id : header_->ProtoIds()) { in WriteProtoIds()
316 header_->ProtoIds().SetOffset(start); in WriteProtoIds()
323 for (auto& field_id : header_->FieldIds()) { in WriteFieldIds()
333 header_->FieldIds().SetOffset(start); in WriteFieldIds()
340 for (auto& method_id : header_->MethodIds()) { in WriteMethodIds()
350 header_->MethodIds().SetOffset(start); in WriteMethodIds()
356 for (auto& encoded_array : header_->EncodedArrayItems()) { in WriteEncodedArrays()
362 header_->EncodedArrayItems().SetOffset(start); in WriteEncodedArrays()
369 for (auto& annotation : header_->AnnotationItems()) { in WriteAnnotations()
377 header_->AnnotationItems().SetOffset(start); in WriteAnnotations()
385 for (auto& annotation_set : header_->AnnotationSetItems()) { in WriteAnnotationSets()
396 header_->AnnotationSetItems().SetOffset(start); in WriteAnnotationSets()
404 for (auto& annotation_set_ref : header_->AnnotationSetRefLists()) { in WriteAnnotationSetRefs()
415 header_->AnnotationSetRefLists().SetOffset(start); in WriteAnnotationSetRefs()
423 for (auto& annotations_directory : header_->AnnotationsDirectoryItems()) { in WriteAnnotationsDirectories()
461 header_->AnnotationsDirectoryItems().SetOffset(start); in WriteAnnotationsDirectories()
466 if (header_->HiddenapiClassDatas().Empty()) { in WriteHiddenapiClassData()
469 DCHECK_EQ(header_->HiddenapiClassDatas().Size(), header_->ClassDefs().Size()); in WriteHiddenapiClassData()
472 ProcessOffset(stream, &header_->HiddenapiClassDatas()); in WriteHiddenapiClassData()
479 std::vector<uint32_t> data_header(header_->ClassDefs().Size() + 1, 0); in WriteHiddenapiClassData()
480 data_header[0] = sizeof(uint32_t) * (header_->ClassDefs().Size() + 1); in WriteHiddenapiClassData()
481 for (uint32_t i = 0; i < header_->ClassDefs().Size(); ++i) { in WriteHiddenapiClassData()
482 uint32_t item_size = header_->HiddenapiClassDatas()[i]->ItemSize(); in WriteHiddenapiClassData()
489 for (uint32_t i = 0; i < header_->ClassDefs().Size(); ++i) { in WriteHiddenapiClassData()
490 dex_ir::ClassDef* class_def = header_->ClassDefs()[i]; in WriteHiddenapiClassData()
491 const auto& item = header_->HiddenapiClassDatas()[i]; in WriteHiddenapiClassData()
515 header_->HiddenapiClassDatas().SetOffset(start); in WriteHiddenapiClassData()
527 for (auto& debug_info : header_->DebugInfoItems()) { in WriteDebugInfoItems()
531 header_->DebugInfoItems().SetOffset(start); in WriteDebugInfoItems()
609 for (auto& code_item : header_->CodeItems()) { in WriteCodeItems()
624 header_->CodeItems().SetOffset(start); in WriteCodeItems()
631 for (auto& class_def : header_->ClassDefs()) { in WriteClassDefs()
653 header_->ClassDefs().SetOffset(start); in WriteClassDefs()
660 header_->ClassDatas()) { in WriteClassDatas()
673 header_->ClassDatas().SetOffset(start); in WriteClassDatas()
680 for (auto& call_site_id : header_->CallSiteIds()) { in WriteCallSiteIds()
690 header_->CallSiteIds().SetOffset(start); in WriteCallSiteIds()
697 for (auto& method_handle : header_->MethodHandleItems()) { in WriteMethodHandles()
706 header_->MethodHandleItems().SetOffset(start); in WriteMethodHandles()
732 header_->StringIds().Size(), in GenerateAndWriteMapItems()
733 header_->StringIds().GetOffset())); in GenerateAndWriteMapItems()
735 header_->TypeIds().Size(), in GenerateAndWriteMapItems()
736 header_->TypeIds().GetOffset())); in GenerateAndWriteMapItems()
738 header_->ProtoIds().Size(), in GenerateAndWriteMapItems()
739 header_->ProtoIds().GetOffset())); in GenerateAndWriteMapItems()
741 header_->FieldIds().Size(), in GenerateAndWriteMapItems()
742 header_->FieldIds().GetOffset())); in GenerateAndWriteMapItems()
744 header_->MethodIds().Size(), in GenerateAndWriteMapItems()
745 header_->MethodIds().GetOffset())); in GenerateAndWriteMapItems()
747 header_->ClassDefs().Size(), in GenerateAndWriteMapItems()
748 header_->ClassDefs().GetOffset())); in GenerateAndWriteMapItems()
750 header_->CallSiteIds().Size(), in GenerateAndWriteMapItems()
751 header_->CallSiteIds().GetOffset())); in GenerateAndWriteMapItems()
753 header_->MethodHandleItems().Size(), in GenerateAndWriteMapItems()
754 header_->MethodHandleItems().GetOffset())); in GenerateAndWriteMapItems()
756 queue.AddIfNotEmpty(MapItem(DexFile::kDexTypeMapList, 1, header_->MapListOffset())); in GenerateAndWriteMapItems()
758 header_->TypeLists().Size(), in GenerateAndWriteMapItems()
759 header_->TypeLists().GetOffset())); in GenerateAndWriteMapItems()
761 header_->AnnotationSetRefLists().Size(), in GenerateAndWriteMapItems()
762 header_->AnnotationSetRefLists().GetOffset())); in GenerateAndWriteMapItems()
764 header_->AnnotationSetItems().Size(), in GenerateAndWriteMapItems()
765 header_->AnnotationSetItems().GetOffset())); in GenerateAndWriteMapItems()
767 header_->ClassDatas().Size(), in GenerateAndWriteMapItems()
768 header_->ClassDatas().GetOffset())); in GenerateAndWriteMapItems()
770 header_->CodeItems().Size(), in GenerateAndWriteMapItems()
771 header_->CodeItems().GetOffset())); in GenerateAndWriteMapItems()
773 header_->StringDatas().Size(), in GenerateAndWriteMapItems()
774 header_->StringDatas().GetOffset())); in GenerateAndWriteMapItems()
776 header_->DebugInfoItems().Size(), in GenerateAndWriteMapItems()
777 header_->DebugInfoItems().GetOffset())); in GenerateAndWriteMapItems()
779 header_->AnnotationItems().Size(), in GenerateAndWriteMapItems()
780 header_->AnnotationItems().GetOffset())); in GenerateAndWriteMapItems()
782 header_->EncodedArrayItems().Size(), in GenerateAndWriteMapItems()
783 header_->EncodedArrayItems().GetOffset())); in GenerateAndWriteMapItems()
785 header_->AnnotationsDirectoryItems().Size(), in GenerateAndWriteMapItems()
786 header_->AnnotationsDirectoryItems().GetOffset())); in GenerateAndWriteMapItems()
788 header_->HiddenapiClassDatas().Empty() ? 0u : 1u, in GenerateAndWriteMapItems()
789 header_->HiddenapiClassDatas().GetOffset())); in GenerateAndWriteMapItems()
795 if (CompactDexFile::IsMagicValid(header_->Magic())) { in WriteHeader()
797 if (header_->SupportDefaultMethods()) { in WriteHeader()
806 std::copy_n(header_->Magic(), kMagicAndVersionLen, header.magic_); in WriteHeader()
808 header.checksum_ = header_->Checksum(); in WriteHeader()
809 std::copy_n(header_->Signature(), DexFile::kSha1DigestSize, header.signature_); in WriteHeader()
810 header.file_size_ = header_->FileSize(); in WriteHeader()
812 header.endian_tag_ = header_->EndianTag(); in WriteHeader()
813 header.link_size_ = header_->LinkSize(); in WriteHeader()
814 header.link_off_ = header_->LinkOffset(); in WriteHeader()
815 header.map_off_ = header_->MapListOffset(); in WriteHeader()
816 header.string_ids_size_ = header_->StringIds().Size(); in WriteHeader()
817 header.string_ids_off_ = header_->StringIds().GetOffset(); in WriteHeader()
818 header.type_ids_size_ = header_->TypeIds().Size(); in WriteHeader()
819 header.type_ids_off_ = header_->TypeIds().GetOffset(); in WriteHeader()
820 header.proto_ids_size_ = header_->ProtoIds().Size(); in WriteHeader()
821 header.proto_ids_off_ = header_->ProtoIds().GetOffset(); in WriteHeader()
822 header.field_ids_size_ = header_->FieldIds().Size(); in WriteHeader()
823 header.field_ids_off_ = header_->FieldIds().GetOffset(); in WriteHeader()
824 header.method_ids_size_ = header_->MethodIds().Size(); in WriteHeader()
825 header.method_ids_off_ = header_->MethodIds().GetOffset(); in WriteHeader()
826 header.class_defs_size_ = header_->ClassDefs().Size(); in WriteHeader()
827 header.class_defs_off_ = header_->ClassDefs().GetOffset(); in WriteHeader()
828 header.data_size_ = header_->DataSize(); in WriteHeader()
829 header.data_off_ = header_->DataOffset(); in WriteHeader()
915 header_->SetMapListOffset(stream->Tell()); in Write()
917 stream->Seek(header_->MapListOffset()); in Write()
924 header_->SetDataSize(stream->Tell() - data_offset_); in Write()
925 if (header_->DataSize() != 0) { in Write()
927 header_->SetDataOffset(data_offset_); in Write()
929 header_->SetDataOffset(0u); in Write()
934 const std::vector<uint8_t>& link_data = header_->LinkData(); in Write()
936 CHECK_EQ(header_->LinkSize(), static_cast<uint32_t>(link_data.size())); in Write()
938 header_->SetLinkOffset(stream->Tell()); in Write()
940 stream->Seek(header_->LinkOffset()); in Write()
947 header_->SetFileSize(stream->Tell()); in Write()
952 header_->SetChecksum(DexFile::CalculateChecksum(stream->Begin(), header_->FileSize())); in Write()
958 output->GetMainSection()->Resize(header_->FileSize()); in Write()