summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-06-24 15:53:03 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-06-24 17:16:07 +0100
commit286763464072ffb599846f76720c7ec54392ae6e (patch)
treec735e7e8dc14f8c978c75a08d8a32e8bb46632fe /compiler/optimizing/optimizing_compiler.cc
parentb5171ff4859104a1e314c3091b6bd4872ad7c2b2 (diff)
Use a flag from the verifier to know if we should compile.
Only used for the lack of bottom type in the aget-object case for now. Could be used for more. bug:21865466 (cherry picked from commit 4824c27988c8eeb302791624bb3ce1d557b0db6c) Change-Id: I2bb7fe1d4737bd92c1076b5193607d74d8761ee7
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 810b4f8f8f..895893298e 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -618,7 +618,8 @@ CompiledMethod* OptimizingCompiler::Compile(const DexFile::CodeItem* code_item,
const DexFile& dex_file) const {
CompilerDriver* compiler_driver = GetCompilerDriver();
CompiledMethod* method = nullptr;
- if (compiler_driver->IsMethodVerifiedWithoutFailures(method_idx, class_def_idx, dex_file)) {
+ if (compiler_driver->IsMethodVerifiedWithoutFailures(method_idx, class_def_idx, dex_file) &&
+ !compiler_driver->GetVerifiedMethod(&dex_file, method_idx)->HasRuntimeThrow()) {
method = TryCompile(code_item, access_flags, invoke_type, class_def_idx,
method_idx, jclass_loader, dex_file);
} else {