summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/quick_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:01:08 +0100
commit4824c27988c8eeb302791624bb3ce1d557b0db6c (patch)
treec14f74d9cc4c93cab04bee5c723e420a87db9cb3 /compiler/dex/quick/quick_compiler.cc
parent22c4edd865bfdea29e80a789cef70e8e51d2a3a5 (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 Change-Id: I64c2c84dfa1c0d259631e65e5f44b94e4139e6a7
Diffstat (limited to 'compiler/dex/quick/quick_compiler.cc')
-rw-r--r--compiler/dex/quick/quick_compiler.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc
index 2523a83c39..28c485a41c 100644
--- a/compiler/dex/quick/quick_compiler.cc
+++ b/compiler/dex/quick/quick_compiler.cc
@@ -33,6 +33,7 @@
#include "dex/pass_driver_me_post_opt.h"
#include "dex/pass_manager.h"
#include "dex/quick/mir_to_lir.h"
+#include "dex/verified_method.h"
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "elf_writer_quick.h"
@@ -661,6 +662,10 @@ CompiledMethod* QuickCompiler::Compile(const DexFile::CodeItem* code_item,
return nullptr;
}
+ if (driver->GetVerifiedMethod(&dex_file, method_idx)->HasRuntimeThrow()) {
+ return nullptr;
+ }
+
DCHECK(driver->GetCompilerOptions().IsCompilationEnabled());
Runtime* const runtime = Runtime::Current();