Home
last modified time | relevance | path

Searched refs:dex (Results 1 – 25 of 363) sorted by relevance

12345678910>>...15

/art/libdexfile/dex/
Ddex_file.h243 const dex::StringId& GetStringId(dex::StringIndex idx) const { in GetStringId()
248 dex::StringIndex GetIndexForStringId(const dex::StringId& string_id) const { in GetIndexForStringId()
251 return dex::StringIndex(&string_id - string_ids_); in GetIndexForStringId()
254 int32_t GetStringLength(const dex::StringId& string_id) const;
259 const char* GetStringDataAndUtf16Length(const dex::StringId& string_id,
262 const char* GetStringData(const dex::StringId& string_id) const;
265 const char* StringDataAndUtf16LengthByIdx(dex::StringIndex idx, uint32_t* utf16_length) const;
267 const char* StringDataByIdx(dex::StringIndex idx) const;
268 std::string_view StringViewByIdx(dex::StringIndex idx) const;
271 const dex::StringId* FindStringId(const char* string) const;
[all …]
Dart_dex_file_loader_test.cc56 std::unique_ptr<const DexFile> dex(OpenTestDexFile("Nested")); in TEST_F() local
57 ASSERT_TRUE(dex.get() != nullptr); in TEST_F()
102 const dex::ClassDef& c0 = raw->GetClassDef(0); in TEST_F()
105 const dex::ClassDef& c1 = raw->GetClassDef(1); in TEST_F()
108 const dex::ClassDef& c2 = raw->GetClassDef(2); in TEST_F()
117 const dex::ClassDef& class_def = raw->GetClassDef(0); in TEST_F()
128 const dex::MethodId& method_id = raw->GetMethodId(cur_method->GetIndex()); in TEST_F()
202 const dex::MethodId& method_id = raw->GetMethodId(cur_method->GetIndex()); in TEST_F()
227 const dex::StringId* str_id = raw->FindStringId(str); in TEST_F()
235 const char* type_str = java_lang_dex_file_->StringByTypeIdx(dex::TypeIndex(i)); in TEST_F()
[all …]
Ddex_file-inl.h42 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 …]
Ddex_file_structs.h32 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 …]
Ddex_file_verifier.cc40 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 …]
Dsignature.h30 namespace dex {
55 Signature(const DexFile* dex, const dex::ProtoId& proto) : dex_file_(dex), proto_id_(&proto) { in Signature() argument
63 const dex::ProtoId* const proto_id_ = nullptr;
Ddex_file.cc46 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 …]
Dstring_reference_test.cc38 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()
Dcode_item_accessors.h28 namespace dex {
44 const dex::CodeItem* code_item);
82 ALWAYS_INLINE void Init(const DexFile& dex_file, const dex::CodeItem* code_item);
99 ALWAYS_INLINE CodeItemDataAccessor(const DexFile& dex_file, const dex::CodeItem* code_item);
117 IterationRange<const dex::TryItem*> TryItems() const;
121 const dex::TryItem* FindTryItem(uint32_t try_dex_pc) const;
128 ALWAYS_INLINE void Init(const DexFile& dex_file, const dex::CodeItem* code_item);
149 const dex::CodeItem* code_item, in CodeItemDebugInfoAccessor()
155 const dex::CodeItem* code_item,
/art/compiler/utils/
Datomic_dex_ref_map_test.cc32 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/
Ddefault-build268 local dex_output=${name}.dex
287 echo unzip -p $d8_output classes.dex \> $dex_output
289 unzip -p $d8_output classes.dex > $dex_output
325 mv ./d8_merge_out/classes.dex "$dst_file";
349 if [ -e classes.dex ]; then
350 zip $TEST_NAME.jar classes.dex
368 mv classes-ex.dex classes.dex # rename it so it shows up as "classes.dex" in the zip file.
369 zip ${TEST_NAME}-ex.jar classes.dex
410 make_dexmerge classes.dex jasmin_classes.dex
420 ${SMALI} -JXmx512m assemble ${SMALI_ARGS} --output smali_classes.dex `find smali -name '*.smali'`
[all …]
/art/tools/hiddenapi/
Dhiddenapi_test.cc166 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/
Dbuild25 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
Dinfo.txt3 test1.dex and test2.dex are arbitrary valid dex files.
/art/test/dexdump/
Drun-all-tests76 for dex in *.dex; do
78 new_output=${dex%%.*}.${suffix}
79 ${SUFFIX_COMMAND_MAP[${suffix}]} ${dex} > ${new_output}
81 echo "Failed running ${SUFFIX_COMMAND_MAP[${suffix}]} ${dex} > ${new_output}" 2>&1
92 for dex in *.dex; do
93 echo ${dex}
95 expected_output=${dex%%.*}.${suffix}
97 cmd="${SUFFIX_COMMAND_MAP[${suffix}]} ${dex}"
/art/libdexfile/
DAndroid.bp28 "dex/art_dex_file_loader.cc",
29 "dex/compact_dex_file.cc",
30 "dex/compact_offset_table.cc",
31 "dex/descriptors_names.cc",
32 "dex/dex_file.cc",
33 "dex/dex_file_exception_helpers.cc",
34 "dex/dex_file_layout.cc",
35 "dex/dex_file_loader.cc",
36 "dex/dex_file_tracking_registrar.cc",
37 "dex/dex_file_verifier.cc",
[all …]
/art/test/663-odd-dex-size3/
Dinfo.txt1 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/
Dinfo.txt1 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/test/370-dex-v37/
Dbuild24 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/180-native-default-method/
Dbuild24 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/runtime/verifier/
Dverifier_deps.h73 void RecordClassVerified(const DexFile& dex_file, const dex::ClassDef& class_def)
78 const dex::ClassDef& class_def,
84 static void MaybeRecordClassRedefinition(const DexFile& dex_file, const dex::ClassDef& class_def)
90 dex::TypeIndex type_idx,
159 using ClassResolutionBase = std::tuple<dex::TypeIndex, uint16_t>;
163 ClassResolution(dex::TypeIndex type_idx, uint16_t access_flags) in ClassResolution()
167 dex::TypeIndex GetDexTypeIndex() const { return std::get<0>(*this); } in GetDexTypeIndex()
171 using FieldResolutionBase = std::tuple<uint32_t, uint16_t, dex::StringIndex>;
175 FieldResolution(uint32_t field_idx, uint16_t access_flags, dex::StringIndex declaring_class_idx) in FieldResolution()
181 dex::StringIndex GetDeclaringClassIndex() const { return std::get<2>(*this); } in GetDeclaringClassIndex()
[all …]
Dmethod_verifier_test.cc57 void VerifyDexFile(const DexFile& dex) in VerifyDexFile() argument
60 for (size_t i = 0; i < dex.NumClassDefs(); i++) { in VerifyDexFile()
61 const dex::ClassDef& class_def = dex.GetClassDef(i); in VerifyDexFile()
62 const char* descriptor = dex.GetClassDescriptor(class_def); in VerifyDexFile()
/art/test/693-vdex-inmem-loader-evict/src/
DMain.java108 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 …]
/art/runtime/
Ddex_reference_collection.h48 void AddReference(const DexFile* dex, IndexType index) { in AddReference() argument
49 GetOrInsertVector(dex)->push_back(index); in AddReference()
70 ALWAYS_INLINE IndexVector* GetOrInsertVector(const DexFile* dex) { in GetOrInsertVector() argument
73 if (UNLIKELY(current_dex_file_ != dex)) { in GetOrInsertVector()
76 current_vector_ = &map_.emplace(dex, IndexVector(vector_allocator_)).first->second; in GetOrInsertVector()
77 current_dex_file_ = dex; in GetOrInsertVector()
/art/test/983-source-transform-verify/
Dsource_transform_art.cc46 std::unique_ptr<const DexFile> dex(dex_file_loader.Open(class_data, in VerifyClassData() local
54 CHECK(dex.get() != nullptr) << "Failed to verify dex: " << error; in VerifyClassData()
56 for (ClassAccessor accessor : dex->GetClasses()) { in VerifyClassData()
63 LOG(FATAL) << "Unexpected instruction found in " << dex->PrettyMethod(method.GetIndex()) in VerifyClassData()
65 << inst.DumpString(dex.get()) << std::endl; in VerifyClassData()

12345678910>>...15