/art/libdexfile/dex/ |
D | dex_file.h | 244 const dex::StringId& GetStringId(dex::StringIndex idx) const { in GetStringId() 249 dex::StringIndex GetIndexForStringId(const dex::StringId& string_id) const { in GetIndexForStringId() 252 return dex::StringIndex(&string_id - string_ids_); in GetIndexForStringId() 255 int32_t GetStringLength(const dex::StringId& string_id) const; 260 const char* GetStringDataAndUtf16Length(const dex::StringId& string_id, 263 const char* GetStringData(const dex::StringId& string_id) const; 266 const char* StringDataAndUtf16LengthByIdx(dex::StringIndex idx, uint32_t* utf16_length) const; 268 const char* StringDataByIdx(dex::StringIndex idx) const; 269 std::string_view StringViewByIdx(dex::StringIndex idx) const; 272 const dex::StringId* FindStringId(const char* string) const; [all …]
|
D | art_dex_file_loader_test.cc | 56 std::unique_ptr<const DexFile> dex(OpenTestDexFile("Nested")); in TEST_F() local 57 ASSERT_TRUE(dex.get() != nullptr); in TEST_F() 111 const dex::ClassDef& c0 = raw->GetClassDef(0); in TEST_F() 114 const dex::ClassDef& c1 = raw->GetClassDef(1); in TEST_F() 117 const dex::ClassDef& c2 = raw->GetClassDef(2); in TEST_F() 126 const dex::ClassDef& class_def = raw->GetClassDef(0); in TEST_F() 137 const dex::MethodId& method_id = raw->GetMethodId(cur_method->GetIndex()); in TEST_F() 211 const dex::MethodId& method_id = raw->GetMethodId(cur_method->GetIndex()); in TEST_F() 236 const dex::StringId* str_id = raw->FindStringId(str); in TEST_F() 244 const char* type_str = java_lang_dex_file_->StringByTypeIdx(dex::TypeIndex(i)); in TEST_F() [all …]
|
D | dex_file-inl.h | 42 inline int32_t DexFile::GetStringLength(const dex::StringId& string_id) const { in GetStringLength() 47 inline const char* DexFile::GetStringDataAndUtf16Length(const dex::StringId& string_id, in GetStringDataAndUtf16Length() 55 inline const char* DexFile::GetStringData(const dex::StringId& string_id) const { in GetStringData() 60 inline const char* DexFile::StringDataAndUtf16LengthByIdx(dex::StringIndex idx, in StringDataAndUtf16LengthByIdx() 66 const dex::StringId& string_id = GetStringId(idx); in StringDataAndUtf16LengthByIdx() 70 inline const char* DexFile::StringDataByIdx(dex::StringIndex idx) const { in StringDataByIdx() 75 inline std::string_view DexFile::StringViewByIdx(dex::StringIndex idx) const { in StringViewByIdx() 81 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx, uint32_t* unicode_length) const { in StringByTypeIdx() 85 const dex::TypeId& type_id = GetTypeId(idx); in StringByTypeIdx() 89 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx) const { in StringByTypeIdx() [all …]
|
D | dex_file_structs.h | 32 namespace dex { 61 dex::StringIndex descriptor_idx_; // index into string_ids 69 dex::TypeIndex class_idx_; // index into type_ids_ array for defining class 70 dex::TypeIndex type_idx_; // index into type_ids_ array for field type 71 dex::StringIndex name_idx_; // index into string_ids_ array for field name 79 dex::StringIndex shorty_idx_; // index into string_ids array for shorty descriptor 80 dex::TypeIndex return_type_idx_; // index into type_ids array for return type 90 dex::TypeIndex class_idx_; // index into type_ids_ array for defining class 91 dex::ProtoIndex proto_idx_; // index into proto_ids_ array for method prototype 92 dex::StringIndex name_idx_; // index into string_ids_ array for method name [all …]
|
D | dex_file_verifier.cc | 40 namespace dex { namespace 130 dex::StringIndex string_idx) { in GetString() 133 const dex::StringId* string_id = in GetString() 134 reinterpret_cast<const dex::StringId*>(begin + header->string_ids_off_) + string_idx.index_; in GetString() 145 dex::TypeIndex class_idx) { in GetClass() 149 const dex::TypeId* type_id = in GetClass() 150 reinterpret_cast<const dex::TypeId*>(begin + header->type_ids_off_) + class_idx.index_; in GetClass() 164 const dex::FieldId* field_id = in GetFieldDescription() 165 reinterpret_cast<const dex::FieldId*>(begin + header->field_ids_off_) + idx; in GetFieldDescription() 179 const dex::MethodId* method_id = in GetMethodDescription() [all …]
|
D | dex_file.cc | 46 using dex::CallSiteIdItem; 47 using dex::ClassDef; 48 using dex::FieldId; 49 using dex::MapList; 50 using dex::MapItem; 51 using dex::MethodHandleItem; 52 using dex::MethodId; 53 using dex::ProtoId; 54 using dex::StringId; 55 using dex::TryItem; [all …]
|
D | signature.h | 30 namespace dex { 55 Signature(const DexFile* dex, const dex::ProtoId& proto) : dex_file_(dex), proto_id_(&proto) { in Signature() argument 63 const dex::ProtoId* proto_id_ = nullptr;
|
D | string_reference_test.cc | 38 ASSERT_STREQ("String1", dex_file1->GetStringData(dex_file1->GetStringId(dex::StringIndex(0)))); in TEST() 39 StringReference sr1(dex_file1.get(), dex::StringIndex(0)); in TEST() 45 ASSERT_STREQ("String2", dex_file2->GetStringData(dex_file2->GetStringId(dex::StringIndex(0)))); in TEST() 46 StringReference sr2(dex_file2.get(), dex::StringIndex(0)); in TEST() 85 dex_file1->GetStringData(dex_file1->GetStringId(dex::StringIndex(index)))); in TEST() 96 dex_file2->GetStringData(dex_file2->GetStringId(dex::StringIndex(index)))); in TEST() 102 StringReference sr1(dex_file1.get(), dex::StringIndex(index1)); in TEST() 103 StringReference sr2(dex_file2.get(), dex::StringIndex(index2)); in TEST()
|
/art/compiler/utils/ |
D | atomic_dex_ref_map_test.cc | 32 std::unique_ptr<const DexFile> dex(OpenTestDexFile("Interfaces")); in TEST_F() local 33 ASSERT_TRUE(dex != nullptr); in TEST_F() 38 EXPECT_FALSE(map.Get(MethodReference(dex.get(), 1), &value)); in TEST_F() 39 EXPECT_FALSE(map.HaveDexFile(dex.get())); in TEST_F() 41 EXPECT_TRUE(map.Insert(MethodReference(dex.get(), 1), 0, 1) == Map::kInsertResultInvalidDexFile); in TEST_F() 42 map.AddDexFile(dex.get()); in TEST_F() 43 EXPECT_TRUE(map.HaveDexFile(dex.get())); in TEST_F() 46 EXPECT_TRUE(registered_dex_files[0] == dex.get()); in TEST_F() 47 EXPECT_GT(dex->NumMethodIds(), 10u); in TEST_F() 49 EXPECT_TRUE(map.Get(MethodReference(dex.get(), 1), &value)); in TEST_F() [all …]
|
/art/test/etc/ |
D | default-build | 277 local dex_output=${name}.dex 296 echo unzip -p $d8_output classes.dex \> $dex_output 298 unzip -p $d8_output classes.dex > $dex_output 334 mv ./d8_merge_out/classes.dex "$dst_file"; 358 if [ -e classes.dex ]; then 359 zip $TEST_NAME.jar classes.dex 377 mv classes-ex.dex classes.dex # rename it so it shows up as "classes.dex" in the zip file. 378 zip ${TEST_NAME}-ex.jar classes.dex 431 make_dexmerge classes.dex jasmin_classes.dex 441 ${SMALI} -JXmx512m assemble ${SMALI_ARGS} --output smali_classes.dex `find smali -name '*.smali'` [all …]
|
/art/tools/hiddenapi/ |
D | hiddenapi_test.cc | 166 const dex::ClassDef& FindClass(const char* desc, const DexFile& dex_file) { in FindClass() 167 const dex::TypeId* type_id = dex_file.FindTypeId(desc); in FindClass() 169 const dex::ClassDef* found = dex_file.FindClassDef(dex_file.GetIndexForTypeId(*type_id)); in FindClass() 176 const dex::ClassDef& class_def, in GetFieldHiddenFlags() 186 const dex::FieldId& fid = dex_file.GetFieldId(field.GetIndex()); in GetFieldHiddenFlags() 203 const dex::ClassDef& class_def, in GetMethodHiddenFlags() 213 const dex::MethodId& mid = dex_file.GetMethodId(method.GetIndex()); in GetMethodHiddenFlags() 268 ScratchFile dex, flags_csv; in TEST_F() local 273 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() 279 ScratchFile dex, flags_csv; in TEST_F() local [all …]
|
/art/test/071-dexfile-get-static-size/ |
D | build | 25 cp res/test1.dex test-jar/classes.dex 26 cp res/test2.dex test-jar/classes2.dex 27 zip -j res/test-jar.jar test-jar/classes.dex 28 zip -j res/multi-jar.jar test-jar/classes.dex test-jar/classes2.dex
|
/art/test/663-odd-dex-size3/ |
D | info.txt | 1 Test for a dex file with an odd size followed by an aligned dex file. 3 The code in classes.dex is: 11 The generated dex file was then manually edited to: 12 1) Add 1 to the size value in the dex header. 14 3) Change the checksum in the dex header. 16 The code in classes2.dex is:
|
/art/test/663-odd-dex-size4/ |
D | info.txt | 1 Test for an aligned dex file followed by a dex file with an odd size. 3 The code in classes.dex is: 8 The code in classes2.dex is: 16 The generated dex file was then manually edited to: 17 1) Add 1 to the size value in the dex header. 19 3) Change the checksum in the dex header.
|
/art/runtime/ |
D | sdk_checker.cc | 56 const dex::TypeId* declaring_type_id = in ShouldDenyAccess() 61 const dex::StringId* name_id = dex_file->FindStringId(art_method->GetName()); in ShouldDenyAccess() 66 dex::TypeIndex return_type_idx; in ShouldDenyAccess() 67 std::vector<dex::TypeIndex> param_type_idxs; in ShouldDenyAccess() 74 const dex::ProtoId* proto_id = dex_file->FindProtoId(return_type_idx, param_type_idxs); in ShouldDenyAccess() 79 const dex::MethodId* method_id = in ShouldDenyAccess() 104 const dex::TypeId* declaring_type_id = dex_file->FindTypeId( in ShouldDenyAccess() 109 const dex::StringId* name_id = dex_file->FindStringId(art_field->GetName()); in ShouldDenyAccess() 113 const dex::TypeId* type_id = dex_file->FindTypeId(art_field->GetTypeDescriptor()); in ShouldDenyAccess() 118 const dex::FieldId* field_id = dex_file->FindFieldId(*declaring_type_id, *name_id, *type_id); in ShouldDenyAccess() [all …]
|
/art/test/dexdump/ |
D | run-all-tests | 49 ALL_DEX_FILES_JAR=all-dex-files.jar 78 for dex in *.dex; do 80 new_output=${dex%%.*}.${suffix} 81 ${SUFFIX_COMMAND_MAP[${suffix}]} ${dex} > ${new_output} 83 echo "Failed running ${SUFFIX_COMMAND_MAP[${suffix}]} ${dex} > ${new_output}" 2>&1 91 for i in *.dex; do 93 dex_file=classes.dex 96 dex_file=classes${count}.dex 117 for input in *.dex *.jar; do
|
/art/libdexfile/ |
D | Android.bp | 31 "dex/art_dex_file_loader.cc", 32 "dex/compact_dex_file.cc", 33 "dex/compact_offset_table.cc", 34 "dex/descriptors_names.cc", 35 "dex/dex_file.cc", 36 "dex/dex_file_exception_helpers.cc", 37 "dex/dex_file_layout.cc", 38 "dex/dex_file_loader.cc", 39 "dex/dex_file_tracking_registrar.cc", 40 "dex/dex_file_verifier.cc", [all …]
|
/art/runtime/verifier/ |
D | verifier_deps.h | 79 void RecordClassVerified(const DexFile& dex_file, const dex::ClassDef& class_def) 85 const dex::ClassDef& class_def, 94 const dex::ClassDef& class_def, 104 const dex::ClassDef& class_def, 128 bool HasRecordedVerifiedStatus(const DexFile& dex_file, const dex::ClassDef& class_def) 147 using TypeAssignabilityBase = std::tuple<dex::StringIndex, dex::StringIndex>; 151 TypeAssignability(dex::StringIndex destination_idx, dex::StringIndex source_idx) in TypeAssignability() 154 dex::StringIndex GetDestination() const { return std::get<0>(*this); } in GetDestination() 155 dex::StringIndex GetSource() const { return std::get<1>(*this); } in GetSource() 200 dex::StringIndex GetIdFromString(const DexFile& dex_file, const std::string& str) [all …]
|
/art/test/666-dex-cache-itf/ |
D | Android.bp | 3 // Build rules for ART run-test `666-dex-cache-itf`. 16 name: "art-run-test-666-dex-cache-itf", 21 ":art-run-test-666-dex-cache-itf-expected-stdout", 22 ":art-run-test-666-dex-cache-itf-expected-stderr", 28 name: "art-run-test-666-dex-cache-itf-expected-stdout", 29 out: ["art-run-test-666-dex-cache-itf-expected-stdout.txt"], 36 name: "art-run-test-666-dex-cache-itf-expected-stderr", 37 out: ["art-run-test-666-dex-cache-itf-expected-stderr.txt"],
|
/art/test/1949-short-dex-file/ |
D | Android.bp | 3 // Build rules for ART run-test `1949-short-dex-file`. 16 name: "art-run-test-1949-short-dex-file", 21 ":art-run-test-1949-short-dex-file-expected-stdout", 22 ":art-run-test-1949-short-dex-file-expected-stderr", 28 name: "art-run-test-1949-short-dex-file-expected-stdout", 29 out: ["art-run-test-1949-short-dex-file-expected-stdout.txt"], 36 name: "art-run-test-1949-short-dex-file-expected-stderr", 37 out: ["art-run-test-1949-short-dex-file-expected-stderr.txt"],
|
/art/test/677-fsi/ |
D | expected-stderr.txt | 1 oat file has dex code, but APK has uncompressed dex code 2 oat file has dex code, but APK has uncompressed dex code
|
/art/test/156-register-dex-file-multi-loader/ |
D | Android.bp | 3 // Build rules for ART run-test `156-register-dex-file-multi-loader`. 16 name: "art-run-test-156-register-dex-file-multi-loader", 21 ":art-run-test-156-register-dex-file-multi-loader-expected-stdout", 22 ":art-run-test-156-register-dex-file-multi-loader-expected-stderr", 28 name: "art-run-test-156-register-dex-file-multi-loader-expected-stdout", 29 out: ["art-run-test-156-register-dex-file-multi-loader-expected-stdout.txt"], 36 name: "art-run-test-156-register-dex-file-multi-loader-expected-stderr", 37 out: ["art-run-test-156-register-dex-file-multi-loader-expected-stderr.txt"],
|
/art/test/180-native-default-method/ |
D | build | 24 if test -f classes.dex && head -c 7 classes.dex | grep -q 039; then 26 printf '035' | dd status=none conv=notrunc of=classes.dex bs=1 seek=4 count=3 28 zip $TEST_NAME.jar classes.dex
|
/art/test/370-dex-v37/ |
D | build | 24 if test -f classes.dex && head -c 7 classes.dex | grep -q 035; then 26 printf '037' | dd status=none conv=notrunc of=classes.dex bs=1 seek=4 count=3 28 zip $TEST_NAME.jar classes.dex
|
/art/test/693-vdex-inmem-loader-evict/src/ |
D | Main.java | 108 byte[] dex = DEX_BYTES_BASE.clone(); in createDex() 111 System.arraycopy(DEX_BYTES_CHECKSUMS[index], 0, dex, DEX_BYTES_CHECKSUM_OFFSET, in createDex() 115 if (dex[DEX_BYTES_CLASS_ID_OFFSET1 + 0] != 0x30 || in createDex() 116 dex[DEX_BYTES_CLASS_ID_OFFSET1 + 1] != 0x31 || in createDex() 117 dex[DEX_BYTES_CLASS_ID_OFFSET2 + 0] != 0x30 || in createDex() 118 dex[DEX_BYTES_CLASS_ID_OFFSET2 + 1] != 0x31) { in createDex() 125 dex[DEX_BYTES_CLASS_ID_OFFSET1 + 0] = str_id1; in createDex() 126 dex[DEX_BYTES_CLASS_ID_OFFSET1 + 1] = str_id2; in createDex() 127 dex[DEX_BYTES_CLASS_ID_OFFSET2 + 0] = str_id1; in createDex() 128 dex[DEX_BYTES_CLASS_ID_OFFSET2 + 1] = str_id2; in createDex() [all …]
|