/aosp12/art/libdexfile/dex/ |
H A D | dex_file.h | 244 const dex::StringId& GetStringId(dex::StringIndex idx) const { in GetStringId() 290 const dex::TypeId& GetTypeId(dex::TypeIndex idx) const { in GetTypeId() 295 dex::TypeIndex GetIndexForTypeId(const dex::TypeId& type_id) const { in GetIndexForTypeId() 312 const dex::TypeId* FindTypeId(dex::StringIndex string_idx) const; 333 const dex::FieldId* FindFieldId(const dex::TypeId& declaring_klass, 380 const dex::MethodId* FindMethodId(const dex::TypeId& declaring_klass, 384 const dex::MethodId* FindMethodIdByIndex(dex::TypeIndex declaring_klass, 437 const dex::ClassDef* FindClassDef(dex::TypeIndex type_idx) const; 481 const dex::ProtoId& GetProtoId(dex::ProtoIndex idx) const { in GetProtoId() 493 const dex::ProtoId* FindProtoId(dex::TypeIndex return_type_idx, [all …]
|
H A D | dex_file-inl.h | 66 const dex::StringId& string_id = GetStringId(idx); in StringDataAndUtf16LengthByIdx() 70 inline const char* DexFile::StringDataByIdx(dex::StringIndex idx) const { in StringDataByIdx() 85 const dex::TypeId& type_id = GetTypeId(idx); in StringByTypeIdx() 89 inline const char* DexFile::StringByTypeIdx(dex::TypeIndex idx) const { in StringByTypeIdx() 93 const dex::TypeId& type_id = GetTypeId(idx); in StringByTypeIdx() 102 const dex::TypeId& type_id = GetTypeId(field_id.type_idx_); in GetFieldTypeDescriptor() 112 const dex::TypeId& type_id = GetTypeId(method_id.class_idx_); in GetMethodDeclaringClassDescriptor() 164 const dex::ProtoId& proto_id = GetProtoId(proto_idx); in GetShorty() 170 return reinterpret_cast<const dex::TryItem*> in GetTryItems() 277 uint32_t signature_idx = dex::kDexNoIndex; in DecodeDebugLocalInfo() [all …]
|
H A D | dex_file_verifier.cc | 40 namespace dex { namespace 1232 const dex::TypeId* type_id = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckIntraTypeIdItem() 1248 const dex::ProtoId* proto_id = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckIntraProtoIdItem() 1265 const dex::FieldId* field_id = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckIntraFieldIdItem() 2479 const dex::StringId* item = reinterpret_cast<const dex::StringId*>(ptr_); in CheckInterStringIdItem() 2499 const dex::TypeId* item = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckInterTypeIdItem() 2530 const dex::ProtoId* item = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckInterProtoIdItem() 2611 const dex::FieldId* item = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckInterFieldIdItem() 2658 const dex::MethodId* item = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckInterMethodIdItem() 2704 const dex::ClassDef* item = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckInterClassDefItem() [all …]
|
H A 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() 236 const dex::StringId* str_id = raw->FindStringId(str); in TEST_F() 257 const dex::ProtoId& to_find = java_lang_dex_file_->GetProtoId(dex::ProtoIndex(i)); in TEST_F() 259 std::vector<dex::TypeIndex> to_find_types; in TEST_F() 265 const dex::ProtoId* found = in TEST_F() [all …]
|
H A D | dex_file.cc | 47 using dex::ClassDef; 48 using dex::FieldId; 49 using dex::MapList; 50 using dex::MapItem; 52 using dex::MethodId; 53 using dex::ProtoId; 54 using dex::StringId; 55 using dex::TryItem; 56 using dex::TypeId; 57 using dex::TypeList; [all …]
|
H A 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 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 92 dex::StringIndex name_idx_; // index into string_ids_ array for method name 109 dex::TypeIndex class_idx_; // index into type_ids_ array for this class 112 dex::TypeIndex superclass_idx_; // index into type_ids_ array for superclass [all …]
|
/aosp12/frameworks/base/startop/view_compiler/ |
H A D | dex_layout_compiler.h | 83 dex::Value GetCurrentView() const; 85 dex::Value GetParentView() const; 91 void BuildGetLayoutResource(dex::Value dest, dex::Value resources, dex::Value resid); 92 void BuildLayoutResourceToAttributeSet(dex::Value dest, dex::Value layout_resource); 94 void BuildTryCreateView(dex::Value dest, dex::Value parent, dex::Value classname); 96 dex::MethodBuilder* method_; 99 dex::Value const context_; 100 dex::Value const resid_; 104 const dex::LiveRegister xml_; 105 const dex::LiveRegister attrs_; [all …]
|
H A D | dex_builder.cc | 23 namespace dex { namespace 28 using ::dex::kAccPublic; 42 constexpr ::dex::Opcode InvokeToInvokeRange(::dex::Opcode opcode) { in InvokeToInvokeRange() 44 case ::dex::Opcode::OP_INVOKE_VIRTUAL: in InvokeToInvokeRange() 46 case ::dex::Opcode::OP_INVOKE_DIRECT: in InvokeToInvokeRange() 48 case ::dex::Opcode::OP_INVOKE_STATIC: in InvokeToInvokeRange() 50 case ::dex::Opcode::OP_INVOKE_INTERFACE: in InvokeToInvokeRange() 194 ::dex::Writer writer(dex_file_); in CreateImage() 267 auto* proto = dex->Alloc<ir::Proto>(); in Encode() 577 Encode21c(::dex::Opcode::OP_SGET, in EncodeFieldOp() [all …]
|
/aosp12/art/tools/hiddenapi/ |
H A D | hiddenapi_test.cc | 268 ScratchFile dex, flags_csv; in TEST_F() local 279 ScratchFile dex, flags_csv; in TEST_F() local 290 ScratchFile dex, flags_csv; in TEST_F() local 301 ScratchFile dex, flags_csv; in TEST_F() local 312 ScratchFile dex, flags_csv; in TEST_F() local 321 ScratchFile dex, flags_csv; in TEST_F() local 330 ScratchFile dex, flags_csv; in TEST_F() local 339 ScratchFile dex, flags_csv; in TEST_F() local 350 ScratchFile dex, flags_csv; in TEST_F() local 361 ScratchFile dex, flags_csv; in TEST_F() local [all …]
|
/aosp12/art/test/etc/ |
H A D | default-build | 431 make_dexmerge classes.dex jasmin_classes.dex 446 make_dexmerge classes.dex smali_classes.dex 455 make_dexmerge classes2.dex jasmin_classes2.dex 468 make_dexmerge classes2.dex smali_classes2.dex 519 make_dexmerge classes-ex.dex smali_classes-ex.dex 529 mv classes.dex classes-1.dex 530 mv classes-ex.dex classes.dex 532 mv classes.dex classes-ex.dex 533 mv classes-1.dex classes.dex 539 make_hiddenapi classes.dex classes2.dex [all …]
|
/aosp12/art/compiler/utils/ |
H A D | atomic_dex_ref_map_test.cc | 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() 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() 55 EXPECT_TRUE(map.Get(MethodReference(dex.get(), 1), &value)); in TEST_F() 60 EXPECT_TRUE(map.Get(MethodReference(dex.get(), 1), &value)); in TEST_F() [all …]
|
/aosp12/art/libdexfile/ |
H A D | Android.bp | 35 "dex/dex_file.cc", 37 "dex/dex_file_layout.cc", 38 "dex/dex_file_loader.cc", 42 "dex/modifiers.cc", 43 "dex/primitive.cc", 44 "dex/signature.cc", 47 "dex/utf.cc", 154 "dex/dex_file.h", 158 "dex/invoke_type.h", 279 "dex/utf_test.cc", [all …]
|
/aosp12/art/runtime/ |
H A 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() 140 const dex::TypeId* type_id = dex_file->FindTypeId(descriptor); in ShouldDenyAccess() [all …]
|
H A D | art_method-inl.h | 168 if (UNLIKELY(dex_method_idx == dex::kDexNoIndex)) { in GetDeclaringClassDescriptor() 189 if (dex_method_idx != dex::kDexNoIndex) { in GetSignature() 199 if (LIKELY(dex_method_idx != dex::kDexNoIndex)) { in GetName() 209 if (LIKELY(dex_method_idx != dex::kDexNoIndex)) { in GetNameView() 225 inline const dex::CodeItem* ArtMethod::GetCodeItem() { in GetCodeItem() 233 : reinterpret_cast<const dex::CodeItem*>( in GetCodeItem() 244 if (dex_pc == dex::kDexNoIndex) { in GetLineNumFromDexPC() 250 inline const dex::ProtoId& ArtMethod::GetPrototype() { in GetPrototype() 259 const dex::ProtoId& proto = dex_file->GetMethodPrototype( in GetParameterTypeList() 278 inline const dex::ClassDef& ArtMethod::GetClassDef() { in GetClassDef() [all …]
|
/aosp12/art/runtime/verifier/ |
H A 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, 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) 212 const dex::ClassDef& class_def, [all …]
|
/aosp12/art/test/dexdump/ |
H A 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
|
/aosp12/art/libprofile/profile/ |
H A D | profile_compilation_info_test.cc | 63 const DexFile* dex, in GetMethod() argument 848 dex.get(), in TEST_F() 852 dex.get(), in TEST_F() 856 dex.get(), in TEST_F() 958 UNUSED(dex.release()); in TEST_F() 984 UNUSED(dex.release()); in TEST_F() 1013 UNUSED(dex.release()); in TEST_F() 1032 UNUSED(dex.release()); in TEST_F() 1725 std::set<dex::TypeIndex> classes; in TEST_F() 1869 UNUSED(dex.release()); in TEST_F() [all …]
|
/aosp12/art/test/071-dexfile-get-static-size/ |
H A 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
|
/aosp12/art/dex2oat/driver/ |
H A D | compiler_driver_test.cc | 96 const dex::ClassDef& class_def = dex_file.GetClassDef(i); in MakeDexFileExecutable() 125 const DexFile& dex = *java_lang_dex_file_; in TEST_F() local 127 EXPECT_EQ(dex.NumStringIds(), dex_cache->NumStrings()); in TEST_F() 132 EXPECT_EQ(dex.NumTypeIds(), dex_cache->NumResolvedTypes()); in TEST_F() 136 << "type_idx=" << i << " " << dex.GetTypeDescriptor(dex.GetTypeId(dex::TypeIndex(i))); in TEST_F() 144 << " " << dex.GetMethodDeclaringClassDescriptor(dex.GetMethodId(i)) in TEST_F() 145 << " " << dex.GetMethodName(dex.GetMethodId(i)); in TEST_F() 147 << " " << dex.GetMethodDeclaringClassDescriptor(dex.GetMethodId(i)) << " " in TEST_F() 148 << dex.GetMethodName(dex.GetMethodId(i)); in TEST_F() 156 << " " << dex.GetFieldDeclaringClassDescriptor(dex.GetFieldId(i)) in TEST_F() [all …]
|
/aosp12/system/unwinding/libunwindstack/ |
H A D | DexFile.cpp | 43 if (std::string err_msg; !art_api::dex::TryLoadLibdexfile(&err_msg)) { in CheckDexSupport() 76 std::unique_ptr<art_api::dex::DexFile> dex; in CreateFromDisk() local 77 art_api::dex::DexFile::Create(memory->GetPtr(), size, nullptr, map->name().c_str(), &dex); in CreateFromDisk() 78 if (dex == nullptr) { in CreateFromDisk() 81 dex_api.reset(new DexFileApi{std::move(dex), std::move(memory), std::mutex()}); in CreateFromDisk() 120 std::unique_ptr<art_api::dex::DexFile> dex; in Create() local 121 art_api::dex::DexFile::Create(copy->GetPtr(0), file_size, nullptr, "", &dex); in Create() 122 if (dex == nullptr) { in Create() 125 std::shared_ptr<DexFileApi> api(new DexFileApi{std::move(dex), std::move(copy), std::mutex()}); in Create()
|
/aosp12/art/test/663-odd-dex-size3/ |
H A 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:
|
/aosp12/art/test/663-odd-dex-size4/ |
H A 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.
|
/aosp12/art/test/693-vdex-inmem-loader-evict/src/ |
H A 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 …]
|
/aosp12/art/test/666-dex-cache-itf/ |
H A 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"],
|
/aosp12/art/test/1949-short-dex-file/ |
H A 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"],
|