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/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index e6be531..0b34688 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -326,7 +326,7 @@
const void* JitCodeCache::GetSavedEntryPointOfPreCompiledMethod(ArtMethod* method) {
if (method->IsPreCompiled()) {
const void* code_ptr = nullptr;
- if (method->GetDeclaringClass()->GetClassLoader() == nullptr) {
+ if (method->GetDeclaringClass()->IsBootStrapClassLoaded()) {
code_ptr = zygote_map_.GetCodeFor(method);
} else {
MutexLock mu(Thread::Current(), *Locks::jit_lock_);