Lines Matching refs:dex
63 // Dex file is the API that exposes native dex files (ordinary dex files) and CompactDex.
64 // Originally, the dex file format used by ART was mostly the same as APKs. The only change was
66 // Since ART needs to support both native dex files and CompactDex files, the DexFile interface
70 // Number of bytes in the dex file magic.
74 // First Dex format version enforcing class definition ordering rules.
109 // Decode the dex magic version
162 dex::StringIndex descriptor_idx_; // index into string_ids
170 dex::TypeIndex class_idx_; // index into type_ids_ array for defining class
171 dex::TypeIndex type_idx_; // index into type_ids_ array for field type
172 dex::StringIndex name_idx_; // index into string_ids_ array for field name
180 dex::StringIndex shorty_idx_; // index into string_ids array for shorty descriptor
181 dex::TypeIndex return_type_idx_; // index into type_ids array for return type
191 dex::TypeIndex class_idx_; // index into type_ids_ array for defining class
193 dex::StringIndex name_idx_; // index into string_ids_ array for method name
199 // Base code_item, compact dex and standard dex have different code item layouts.
210 dex::TypeIndex class_idx_; // index into type_ids_ array for this class
213 dex::TypeIndex superclass_idx_; // index into type_ids_ array for superclass
216 dex::StringIndex source_file_idx_; // index into string_ids_ for source file name
248 dex::TypeIndex type_idx_; // index into type_ids section
431 // Closes a .dex file.
438 // For DexFiles directly from .dex files, this is the checksum from the DexFile::Header.
439 // For DexFiles opened from a zip files, this will be the ZipEntry CRC32 of classes.dex.
449 // Decode the dex magic version
460 // Returns true if the dex file supports default methods.
463 // Returns the maximum size in bytes needed to store an equivalent dex file strictly conforming to
464 // the dex file specification. That is the size if we wanted to get rid of all the
470 // Returns the number of string identifiers in the .dex file.
477 const StringId& GetStringId(dex::StringIndex idx) const {
482 dex::StringIndex GetIndexForStringId(const StringId& string_id) const {
485 return dex::StringIndex(&string_id - string_ids_);
498 const char* StringDataAndUtf16LengthByIdx(dex::StringIndex idx, uint32_t* utf16_length) const;
500 const char* StringDataByIdx(dex::StringIndex idx) const;
510 // Returns the number of type identifiers in the .dex file.
516 bool IsTypeIndexValid(dex::TypeIndex idx) const {
521 const TypeId& GetTypeId(dex::TypeIndex idx) const {
526 dex::TypeIndex GetIndexForTypeId(const TypeId& type_id) const {
531 return dex::TypeIndex(static_cast<uint16_t>(result));
535 const char* StringByTypeIdx(dex::TypeIndex idx, uint32_t* unicode_length) const;
537 const char* StringByTypeIdx(dex::TypeIndex idx) const;
543 const TypeId* FindTypeId(dex::StringIndex string_idx) const;
545 // Returns the number of field identifiers in the .dex file.
585 // Returns the number of method identifiers in the .dex file.
632 // Returns the number of class definitions in the .dex file.
654 const ClassDef* FindClassDef(dex::TypeIndex type_idx) const;
691 // Returns the number of prototype identifiers in the .dex file.
710 const ProtoId* FindProtoId(dex::TypeIndex return_type_idx,
711 const dex::TypeIndex* signature_type_idxs,
713 const ProtoId* FindProtoId(dex::TypeIndex return_type_idx,
714 const std::vector<dex::TypeIndex>& signature_type_idxs) const {
720 dex::TypeIndex* return_type_idx,
721 std::vector<dex::TypeIndex>* param_type_idxs) const;
749 // Find which try region is associated with the given address (ie dex pc). Returns -1 if none.
780 uint16_t reg_ = 0; // Dex register which stores the values.
973 // Recalculates the checksum of the dex file. Does not use the current value in the header.
983 std::string PrettyType(dex::TypeIndex type_idx) const;
1015 // Changes the dex file pointed to by class_it to not have any hiddenapi flags.
1019 // First Dex format version supporting default methods.
1047 // The base address of the data section (same as Begin() for standard dex).
1053 // Typically the dex file name when available, alternatively some identifying string.
1094 // If this dex file was loaded from an oat file, oat_dex_file_ contains a
1102 // If the dex file is a compact dex file. If false then the dex file is a standard dex file.
1105 // If the dex file is located in /system/framework/.
1115 // Iterate over a dex file's ProtoId's paramters
1128 dex::TypeIndex GetTypeIdx() {
1132 return dex_file_.StringByTypeIdx(dex::TypeIndex(GetTypeIdx()));
1162 Signature(const DexFile* dex, const DexFile::ProtoId& proto) : dex_file_(dex), proto_id_(&proto) {
1322 // A dex file's class_data_item is leb128 encoded, this structure holds a decoded form of the