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
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc
index 2523a83..28c485a 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 @@
return nullptr;
}
+ if (driver->GetVerifiedMethod(&dex_file, method_idx)->HasRuntimeThrow()) {
+ return nullptr;
+ }
+
DCHECK(driver->GetCompilerOptions().IsCompilationEnabled());
Runtime* const runtime = Runtime::Current();