Lines Matching refs:dex_file
36 #include "dex_file-inl.h"
330 const art::DexFile& dex_file);
520 Thread* self, Handle<mirror::ClassLoader> class_loader, const DexFile& dex_file,
522 const char* descriptor = dex_file.GetClassDescriptor(class_def);
553 const DexFile* dex_file;
564 // Find the dex_file
565 dex_file = method->GetDexFile();
568 const DexFile::CodeItem* code_item = dex_file->GetCodeItem(method->GetCodeItemOffset());
572 dex_files.push_back(dex_file);
581 const DexFile::ClassDef& class_def = dex_file->GetClassDef(class_def_idx);
585 dex_to_dex_compilation_level = GetDexToDexCompilationlevel(self, class_loader, *dex_file,
589 *dex_file, dex_to_dex_compilation_level, true);
599 const DexFile* dex_file = dex_files[i];
600 CHECK(dex_file != nullptr);
601 ResolveDexFile(class_loader, *dex_file, dex_files, thread_pool, timings);
752 const DexFile* dex_file = exception_type.second;
754 Handle<mirror::DexCache> dex_cache(hs.NewHandle(class_linker->FindDexCache(*dex_file)));
756 class_linker->ResolveType(*dex_file, exception_type_idx, dex_cache,
759 const DexFile::TypeId& type_id = dex_file->GetTypeId(exception_type_idx);
760 const char* descriptor = dex_file->GetTypeDescriptor(type_id);
827 bool CompilerDriver::CanAssumeTypeIsPresentInDexCache(const DexFile& dex_file, uint32_t type_idx) {
829 IsImageClass(dex_file.StringDataByIdx(dex_file.GetTypeId(type_idx).descriptor_idx_))) {
832 mirror::DexCache* dex_cache = Runtime::Current()->GetClassLinker()->FindDexCache(dex_file);
848 bool CompilerDriver::CanAssumeStringIsPresentInDexCache(const DexFile& dex_file,
858 dex_file)));
859 Runtime::Current()->GetClassLinker()->ResolveString(dex_file, string_idx, dex_cache);
870 bool CompilerDriver::CanAccessTypeWithoutChecks(uint32_t referrer_idx, const DexFile& dex_file,
884 mirror::DexCache* dex_cache = Runtime::Current()->GetClassLinker()->FindDexCache(dex_file);
891 const DexFile::MethodId& method_id = dex_file.GetMethodId(referrer_idx);
918 const DexFile& dex_file,
921 mirror::DexCache* dex_cache = Runtime::Current()->GetClassLinker()->FindDexCache(dex_file);
928 const DexFile::MethodId& method_id = dex_file.GetMethodId(referrer_idx);
945 bool CompilerDriver::CanEmbedTypeInCode(const DexFile& dex_file, uint32_t type_idx,
953 mirror::DexCache* dex_cache = Runtime::Current()->GetClassLinker()->FindDexCache(dex_file);
965 dex_file.StringDataByIdx(dex_file.GetTypeId(type_idx).descriptor_idx_));
996 bool CompilerDriver::CanEmbedStringInCode(const DexFile& dex_file, uint32_t string_idx,
1003 mirror::DexCache* dex_cache = Runtime::Current()->GetClassLinker()->FindDexCache(dex_file);
1223 if (target_method->dex_file == declaring_class->GetDexCache()->GetDexFile()) {
1231 *target_method->dex_file, target_method->dex_method_index);
1237 target_method->dex_file = declaring_class->GetDexCache()->GetDexFile();
1260 target_method->dex_file = declaring_class->GetDexCache()->GetDexFile();
1267 target_method->dex_file = declaring_class->GetDexCache()->GetDexFile();
1344 const VerifiedMethod* CompilerDriver::GetVerifiedMethod(const DexFile* dex_file,
1346 MethodReference ref(dex_file, method_idx);
1365 void CompilerDriver::AddCodePatch(const DexFile* dex_file,
1374 code_to_patch_.push_back(new CallPatchInformation(dex_file,
1383 void CompilerDriver::AddRelativeCodePatch(const DexFile* dex_file,
1393 code_to_patch_.push_back(new RelativeCallPatchInformation(dex_file,
1403 void CompilerDriver::AddMethodPatch(const DexFile* dex_file,
1412 methods_to_patch_.push_back(new CallPatchInformation(dex_file,
1421 void CompilerDriver::AddClassPatch(const DexFile* dex_file,
1427 classes_to_patch_.push_back(new TypePatchInformation(dex_file,
1433 void CompilerDriver::AddStringPatch(const DexFile* dex_file,
1439 strings_to_patch_.push_back(new StringPatchInformation(dex_file,
1453 const DexFile* dex_file,
1460 dex_file_(dex_file),
1552 static bool SkipClass(jobject class_loader, const DexFile& dex_file, mirror::Class* klass)
1556 if (&dex_file != &original_dex_file) {
1559 << dex_file.GetLocation() << " previously found in "
1600 const DexFile& dex_file = *manager->GetDexFile();
1615 const DexFile::ClassDef& class_def = dex_file.GetClassDef(class_def_index);
1620 Handle<mirror::DexCache> dex_cache(hs.NewHandle(class_linker->FindDexCache(dex_file)));
1622 mirror::Class* klass = class_linker->ResolveType(dex_file, class_def.class_idx_, dex_cache,
1632 if (SkipClass(jclass_loader, dex_file, klass)) {
1641 const byte* class_data = dex_file.GetClassData(class_def);
1646 ClassDataItemIterator it(dex_file, class_data);
1649 mirror::ArtField* field = class_linker->ResolveField(dex_file, it.GetMemberIndex(),
1664 mirror::ArtField* field = class_linker->ResolveField(dex_file, it.GetMemberIndex(),
1674 mirror::ArtMethod* method = class_linker->ResolveMethod(dex_file, it.GetMemberIndex(),
1684 mirror::ArtMethod* method = class_linker->ResolveMethod(dex_file, it.GetMemberIndex(),
1697 manager->GetCompiler()->AddRequiresConstructorBarrier(self, &dex_file, class_def_index);
1706 const DexFile& dex_file = *manager->GetDexFile();
1708 Handle<mirror::DexCache> dex_cache(hs.NewHandle(class_linker->FindDexCache(dex_file)));
1711 mirror::Class* klass = class_linker->ResolveType(dex_file, type_idx, dex_cache, class_loader);
1725 void CompilerDriver::ResolveDexFile(jobject class_loader, const DexFile& dex_file,
1733 ParallelCompilationManager context(class_linker, class_loader, this, &dex_file, dex_files,
1739 context.ForAll(0, dex_file.NumTypeIds(), ResolveType, thread_count_);
1743 context.ForAll(0, dex_file.NumClassDefs(), ResolveClassFieldsAndMethods, thread_count_);
1749 const DexFile* dex_file = dex_files[i];
1750 CHECK(dex_file != nullptr);
1751 SetVerifiedDexFile(class_loader, *dex_file, dex_files, thread_pool, timings);
1758 const DexFile* dex_file = dex_files[i];
1759 CHECK(dex_file != nullptr);
1760 VerifyDexFile(class_loader, *dex_file, dex_files, thread_pool, timings);
1768 const DexFile& dex_file = *manager->GetDexFile();
1769 const DexFile::ClassDef& class_def = dex_file.GetClassDef(class_def_index);
1770 const char* descriptor = dex_file.GetClassDescriptor(class_def);
1787 Handle<mirror::DexCache> dex_cache(hs.NewHandle(class_linker->FindDexCache(dex_file)));
1789 if (verifier::MethodVerifier::VerifyClass(&dex_file, dex_cache, class_loader, &class_def, true,
1795 } else if (!SkipClass(jclass_loader, dex_file, klass.Get())) {
1811 void CompilerDriver::VerifyDexFile(jobject class_loader, const DexFile& dex_file,
1816 ParallelCompilationManager context(class_linker, class_loader, this, &dex_file, dex_files,
1818 context.ForAll(0, dex_file.NumClassDefs(), VerifyClass, thread_count_);
1825 const DexFile& dex_file = *manager->GetDexFile();
1826 const DexFile::ClassDef& class_def = dex_file.GetClassDef(class_def_index);
1827 const char* descriptor = dex_file.GetClassDescriptor(class_def);
1855 void CompilerDriver::SetVerifiedDexFile(jobject class_loader, const DexFile& dex_file,
1860 ParallelCompilationManager context(class_linker, class_loader, this, &dex_file, dex_files,
1862 context.ForAll(0, dex_file.NumClassDefs(), SetVerifiedClass, thread_count_);
1869 const DexFile& dex_file = *manager->GetDexFile();
1870 const DexFile::ClassDef& class_def = dex_file.GetClassDef(class_def_index);
1871 const DexFile::TypeId& class_type_id = dex_file.GetTypeId(class_def.class_idx_);
1872 const char* descriptor = dex_file.StringDataByIdx(class_type_id.descriptor_idx_);
1881 if (klass.Get() != nullptr && !SkipClass(jclass_loader, dex_file, klass.Get())) {
1950 void CompilerDriver::InitializeClasses(jobject jni_class_loader, const DexFile& dex_file,
1955 ParallelCompilationManager context(class_linker, jni_class_loader, this, &dex_file, dex_files,
1964 context.ForAll(0, dex_file.NumClassDefs(), InitializeClass, thread_count);
1971 const DexFile* dex_file = dex_files[i];
1972 CHECK(dex_file != nullptr);
1973 InitializeClasses(class_loader, *dex_file, dex_files, thread_pool, timings);
1984 const DexFile* dex_file = dex_files[i];
1985 CHECK(dex_file != nullptr);
1986 CompileDexFile(class_loader, *dex_file, dex_files, thread_pool, timings);
1993 const DexFile& dex_file = *manager->GetDexFile();
1994 const DexFile::ClassDef& class_def = dex_file.GetClassDef(class_def_index);
1999 const char* descriptor = dex_file.GetClassDescriptor(class_def);
2009 } else if (SkipClass(jclass_loader, dex_file, klass.Get())) {
2013 ClassReference ref(&dex_file, class_def_index);
2018 const byte* class_data = dex_file.GetClassData(class_def);
2031 dex_to_dex_compilation_level = GetDexToDexCompilationlevel(soa.Self(), class_loader, dex_file,
2034 ClassDataItemIterator it(dex_file, class_data);
2045 dex_file.StringByTypeIdx(class_def.class_idx_));
2060 method_idx, jclass_loader, dex_file, dex_to_dex_compilation_level,
2077 method_idx, jclass_loader, dex_file, dex_to_dex_compilation_level,
2084 void CompilerDriver::CompileDexFile(jobject class_loader, const DexFile& dex_file,
2089 &dex_file, dex_files, thread_pool);
2090 context.ForAll(0, dex_file.NumClassDefs(), CompilerDriver::CompileClass, thread_count_);
2096 const DexFile& dex_file,
2101 MethodReference method_ref(&dex_file, method_idx);
2109 compiled_method = compiler_->JniCompile(access_flags, method_idx, dex_file);
2123 method_idx, class_loader, dex_file);
2131 method_idx, class_loader, dex_file,
2138 LOG(WARNING) << "Compilation of " << PrettyMethod(method_idx, dex_file)
2145 DCHECK(GetCompiledMethod(method_ref) == nullptr) << PrettyMethod(method_idx, dex_file);
2150 DCHECK(GetCompiledMethod(method_ref) != nullptr) << PrettyMethod(method_idx, dex_file);
2158 LOG(FATAL) << "Unexpected exception compiling: " << PrettyMethod(method_idx, dex_file) << "\n"
2209 void CompilerDriver::AddRequiresConstructorBarrier(Thread* self, const DexFile* dex_file,
2212 freezing_constructor_classes_.insert(ClassReference(dex_file, class_def_index));
2215 bool CompilerDriver::RequiresConstructorBarrier(Thread* self, const DexFile* dex_file,
2218 return freezing_constructor_classes_.count(ClassReference(dex_file, class_def_index)) != 0;