diff options
-rw-r--r-- | compiler/driver/compiler_driver.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 15b3d08a37..90e63e9674 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1316,6 +1316,14 @@ void CompilerDriver::GetCodeAndMethodForDirectCall(InvokeType* type, InvokeType } } } + if (runtime->UseJit()) { + // If we are the JIT, then don't allow a direct call to the interpreter bridge since this will + // never be updated even after we compile the method. + if (runtime->GetClassLinker()->IsQuickToInterpreterBridge( + reinterpret_cast<const void*>(compiler_->GetEntryPointOf(method)))) { + use_dex_cache = true; + } + } if (method_code_in_boot) { *stats_flags |= kFlagDirectCallToBoot | kFlagDirectMethodToBoot; } |