Home
last modified time | relevance | path

Searched refs:StringIndex (Results 1 – 25 of 54) sorted by relevance

123

/art/libdexfile/dex/
Dstring_reference.h34 StringReference(const DexFile* file, dex::StringIndex index) in StringReference()
37 dex::StringIndex StringIndex() const { in StringIndex() function
38 return dex::StringIndex(index); in StringIndex()
42 return dex_file->GetStringData(dex_file->GetStringId(StringIndex())); in GetStringData()
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()
Ddex_file_types.h73 class StringIndex : public DexIndex<uint32_t> {
75 StringIndex() {} in StringIndex() function
76 explicit constexpr StringIndex(uint32_t index) : DexIndex<decltype(index_)>(index) {} in StringIndex() function
77 static constexpr StringIndex Invalid() { in Invalid()
78 return StringIndex(std::numeric_limits<decltype(index_)>::max()); in Invalid()
81 std::ostream& operator<<(std::ostream& os, const StringIndex& index);
104 template<> struct hash<art::dex::StringIndex> {
105 size_t operator()(const art::dex::StringIndex& index) const {
Ddex_file_structs.h61 dex::StringIndex descriptor_idx_; // index into string_ids
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
92 dex::StringIndex name_idx_; // index into string_ids_ array for method name
115 dex::StringIndex source_file_idx_; // index into string_ids_ for source file name
Ddex_file-inl.h60 inline const char* DexFile::StringDataAndUtf16LengthByIdx(dex::StringIndex 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()
171 inline bool DexFile::StringEquals(const DexFile* df1, dex::StringIndex sidx1, in StringEquals()
172 const DexFile* df2, dex::StringIndex sidx2) { in StringEquals()
363 return StringDataByIdx(dex::StringIndex(idx)); in DecodeDebugLocalInfo()
465 visitor(dex::StringIndex(DecodeUnsignedLeb128P1(debug_info))); in DecodeDebugInfoParameterNames()
Ddex_file.cc59 static_assert(sizeof(dex::StringIndex) == sizeof(uint32_t), "StringIndex size is wrong");
60 static_assert(std::is_trivially_copyable<dex::StringIndex>::value, "StringIndex not trivial");
245 const dex::StringIndex name_idx = GetIndexForStringId(name); in FindFieldId()
280 const dex::StringIndex name_idx = GetIndexForStringId(name); in FindMethodId()
315 const StringId& str_id = GetStringId(dex::StringIndex(mid)); in FindStringId()
349 const TypeId* DexFile::FindTypeId(dex::StringIndex string_idx) const { in FindTypeId()
677 std::ostream& operator<<(std::ostream& os, const StringIndex& index) { in operator <<()
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()
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;
308 const dex::TypeId* FindTypeId(dex::StringIndex string_idx) const;
787 static inline bool StringEquals(const DexFile* df1, dex::StringIndex sidx1,
788 const DexFile* df2, dex::StringIndex sidx2);
Dtest_dex_file_builder_test.cc52 dex_file->GetStringData(dex_file->GetStringId(dex::StringIndex(i)))) << i; in TEST()
Ddex_file_verifier_test.cc179 method_id->name_idx_ = dex::StringIndex(0xFF); in TEST_F()
248 dex::StringIndex name_index = dex_file->GetMethodId(method_index).name_idx_; in FindMethodData()
841 dex::StringIndex name_index = dex_file->GetFieldId(field_index).name_idx_; in FindFieldData()
1431 std::swap(const_cast<dex::StringIndex&>(proto1.shorty_idx_), in TEST_F()
1432 const_cast<dex::StringIndex&>(proto2.shorty_idx_)); in TEST_F()
1436 const_cast<dex::StringIndex&>(proto1.shorty_idx_) = proto2.shorty_idx_; in TEST_F()
Ddex_file_tracking_registrar.cc221 const dex::StringId & string_id = dex_file_->GetStringId(StringIndex(stringid_ctr)); in SetAllStringDataStartRegistration()
Dcode_item_accessors-inl.h241 return dex_file_->StringDataByIdx(dex::StringIndex(idx)); in DecodeDebugPositionInfo()
Ddex_instruction.cc209 PrintableString(file->StringDataByIdx(dex::StringIndex(string_idx))).c_str(), in DumpString()
353 PrintableString(file->StringDataByIdx(dex::StringIndex(string_idx))).c_str(), in DumpString()
/art/runtime/verifier/
Dverifier_deps.h169 using FieldResolutionBase = std::tuple<uint32_t, uint16_t, dex::StringIndex>;
173 FieldResolution(uint32_t field_idx, uint16_t access_flags, dex::StringIndex declaring_class_idx) in FieldResolution()
179 dex::StringIndex GetDeclaringClassIndex() const { return std::get<2>(*this); } in GetDeclaringClassIndex()
182 using MethodResolutionBase = std::tuple<uint32_t, uint16_t, dex::StringIndex>;
188 dex::StringIndex declaring_class_idx) in MethodResolution()
194 dex::StringIndex GetDeclaringClassIndex() const { return std::get<2>(*this); } in GetDeclaringClassIndex()
197 using TypeAssignabilityBase = std::tuple<dex::StringIndex, dex::StringIndex>;
201 TypeAssignability(dex::StringIndex destination_idx, dex::StringIndex source_idx) in TypeAssignability()
204 dex::StringIndex GetDestination() const { return std::get<0>(*this); } in GetDestination()
205 dex::StringIndex GetSource() const { return std::get<1>(*this); } in GetSource()
[all …]
Dverifier_deps.cc109 dex::StringIndex VerifierDeps::GetClassDescriptorStringId(const DexFile& dex_file, in GetClassDescriptorStringId()
133 static dex::StringIndex TryGetClassDescriptorStringId(const DexFile& dex_file, in TryGetClassDescriptorStringId()
146 return dex::StringIndex::Invalid(); in TryGetClassDescriptorStringId()
149 dex::StringIndex VerifierDeps::GetMethodDeclaringClassStringId(const DexFile& dex_file, in GetMethodDeclaringClassStringId()
154 return dex::StringIndex(VerifierDeps::kUnresolvedMarker); in GetMethodDeclaringClassStringId()
156 const dex::StringIndex string_id = TryGetClassDescriptorStringId( in GetMethodDeclaringClassStringId()
168 dex::StringIndex VerifierDeps::GetFieldDeclaringClassStringId(const DexFile& dex_file, in GetFieldDeclaringClassStringId()
173 return dex::StringIndex(VerifierDeps::kUnresolvedMarker); in GetFieldDeclaringClassStringId()
175 const dex::StringIndex string_id = TryGetClassDescriptorStringId( in GetFieldDeclaringClassStringId()
219 dex::StringIndex VerifierDeps::GetIdFromString(const DexFile& dex_file, const std::string& str) { in GetIdFromString()
[all …]
/art/runtime/entrypoints/quick/
Dquick_dexcache_entrypoints.cc99 dex::StringIndex string_idx, in StoreStringInBss()
215 Runtime::Current()->GetClassLinker()->ResolveString(dex::StringIndex(string_idx), caller); in artResolveStringFromCode()
217 StoreStringInBss(caller_and_outer.outer_method, dex::StringIndex(string_idx), result); in artResolveStringFromCode()
/art/runtime/
Dtransaction.h130 void RecordResolveString(ObjPtr<mirror::DexCache> dex_cache, dex::StringIndex string_idx)
266 ResolveStringLog(ObjPtr<mirror::DexCache> dex_cache, dex::StringIndex string_idx);
274 const dex::StringIndex string_idx_;
Dclass_linker-inl.h69 inline ObjPtr<mirror::String> ClassLinker::ResolveString(dex::StringIndex string_idx, in ResolveString()
83 inline ObjPtr<mirror::String> ClassLinker::ResolveString(dex::StringIndex string_idx, in ResolveString()
97 inline ObjPtr<mirror::String> ClassLinker::ResolveString(dex::StringIndex string_idx, in ResolveString()
108 inline ObjPtr<mirror::String> ClassLinker::LookupString(dex::StringIndex string_idx, in LookupString()
Dclass_linker.h249 ObjPtr<mirror::String> ResolveString(dex::StringIndex string_idx,
252 ObjPtr<mirror::String> ResolveString(dex::StringIndex string_idx,
258 ObjPtr<mirror::String> ResolveString(dex::StringIndex string_idx,
264 ObjPtr<mirror::String> LookupString(dex::StringIndex string_idx,
1015 ObjPtr<mirror::String> DoResolveString(dex::StringIndex string_idx,
1018 ObjPtr<mirror::String> DoResolveString(dex::StringIndex string_idx,
1023 ObjPtr<mirror::String> DoLookupString(dex::StringIndex string_idx,
/art/runtime/mirror/
Ddex_cache.h276 String* GetResolvedString(dex::StringIndex string_idx) ALWAYS_INLINE
279 void SetResolvedString(dex::StringIndex string_idx, ObjPtr<mirror::String> resolved) ALWAYS_INLINE
282 void SetPreResolvedString(dex::StringIndex string_idx,
292 void ClearString(dex::StringIndex string_idx) REQUIRES_SHARED(Locks::mutator_lock_);
472 uint32_t StringSlotIndex(dex::StringIndex string_idx) REQUIRES_SHARED(Locks::mutator_lock_);
Ddex_cache-inl.h79 inline uint32_t DexCache::StringSlotIndex(dex::StringIndex string_idx) { in StringSlotIndex()
86 inline String* DexCache::GetResolvedString(dex::StringIndex string_idx) { in GetResolvedString()
105 inline void DexCache::SetResolvedString(dex::StringIndex string_idx, ObjPtr<String> resolved) { in SetResolvedString()
118 inline void DexCache::SetPreResolvedString(dex::StringIndex string_idx, ObjPtr<String> resolved) { in SetPreResolvedString()
140 inline void DexCache::ClearString(dex::StringIndex string_idx) { in ClearString()
/art/dex2oat/
Dverifier_deps_test.cc509 dex::StringIndex id_Main1 = verifier_deps_->GetIdFromString(*primary_dex_file_, "LMain;"); in TEST_F()
513 dex::StringIndex id_Main2 = verifier_deps_->GetIdFromString(*primary_dex_file_, "LMain;"); in TEST_F()
517 dex::StringIndex id_Lorem1 = verifier_deps_->GetIdFromString(*primary_dex_file_, "Lorem ipsum"); in TEST_F()
521 dex::StringIndex id_Lorem2 = verifier_deps_->GetIdFromString(*primary_dex_file_, "Lorem ipsum"); in TEST_F()
1319 constexpr dex::StringIndex kStringIndexZero(0); // We know there is a class there. in TEST_F()
1343 constexpr dex::StringIndex kNewTypeIndex(0); in TEST_F()
1373 constexpr dex::StringIndex kStringIndexZero(0); // We know there is a class there. in TEST_F()
1399 constexpr dex::StringIndex kNewTypeIndex(0); in TEST_F()
/art/compiler/linker/
Dlinker_patch.h211 dex::StringIndex TargetStringIndex() const { in TargetStringIndex()
214 return dex::StringIndex(string_idx_); in TargetStringIndex()
/art/dexdump/
Ddexdump.cc481 dumpEscapedString(pDexFile->StringDataByIdx(dex::StringIndex(idx))); in dumpEncodedValue()
483 dumpXmlAttribute(pDexFile->StringDataByIdx(dex::StringIndex(idx))); in dumpEncodedValue()
524 fputs(pDexFile->StringDataByIdx(dex::StringIndex(name_idx)), gOutFile); in dumpEncodedValue()
821 const char* st = pDexFile->StringDataByIdx(dex::StringIndex(index)); in indexString()
1681 dex::StringIndex method_name_idx = static_cast<dex::StringIndex>(it.GetJavaValue().i); in dumpCallSite()
1753 dex::StringIndex string_idx = static_cast<dex::StringIndex>(it.GetJavaValue().i); in dumpCallSite()
/art/tools/veridex/
Dflow_analysis.h80 const char* str = reference_.dex_file->StringDataByIdx(dex::StringIndex(reference_.index)); in ToString()
Dhidden_api_finder.cc67 dex::StringIndex string_index(inst->VRegB_21c()); in CollectAccesses()

123