Touch up changes related to cross-dex compiling
* Added exaplanatory comments
* Used IsBootStrapClassLoaded to avoid a read barrier
* Use the new multi-image from CompilerOptions
Bug: 154012332
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I10a4ed0f9d5b2e796102846564a54dc90f297068
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc
index 7317bdf..f55bbee 100644
--- a/compiler/optimizing/stack_map_stream.cc
+++ b/compiler/optimizing/stack_map_stream.cc
@@ -224,7 +224,7 @@
ScopedObjectAccess soa(Thread::Current());
const DexFile* dex_file = method->GetDexFile();
if (!IsSameDexFile(*outer_dex_file, *dex_file)) {
- if (method->GetDeclaringClass()->GetClassLoader() == nullptr) {
+ if (method->GetDeclaringClass()->IsBootStrapClassLoaded()) {
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
const std::vector<const DexFile*>& boot_class_path = class_linker->GetBootClassPath();
auto it = std::find_if(
@@ -269,7 +269,7 @@
ScopedObjectAccess soa(Thread::Current());
if (inline_info.GetDexPc() != static_cast<uint32_t>(-1) &&
!IsSameDexFile(*outer_dex_file, *method->GetDexFile())) {
- if (method->GetDeclaringClass()->GetClassLoader() == nullptr) {
+ if (method->GetDeclaringClass()->IsBootStrapClassLoaded()) {
CHECK_EQ(method_info.GetDexFileIndexKind(), MethodInfo::kKindBCP);
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
const std::vector<const DexFile*>& boot_class_path = class_linker->GetBootClassPath();