Enable kSupportBootImageFixup
Change-Id: I57b338b3d985e2de96a6fb99327fc274406e3844
diff --git a/src/compiler.cc b/src/compiler.cc
index f066b0a..ce34f0f 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -716,13 +716,15 @@
stats_->DirectMethodsToBoot(type);
bool compiling_boot = Runtime::Current()->GetHeap()->GetSpaces().size() == 1;
if (compiling_boot) {
- const bool kSupportBootImageFixup = false;
+ const bool kSupportBootImageFixup = true;
if (kSupportBootImageFixup) {
MethodHelper mh(method);
if (IsImageClass(mh.GetDeclaringClassDescriptor())) {
+ // We can only branch directly to Methods that are resolved in the DexCache.
+ // Otherwise we won't invoke the resolution trampoline.
direct_method = -1;
+ direct_code = -1;
}
- direct_code = -1;
}
} else {
if (Runtime::Current()->GetHeap()->GetImageSpace()->Contains(method)) {