OSDN Git Service

Revert "ART: Skip image visitor in OatWriter for VerifyAtRuntime"
authorAndreas Gampe <agampe@google.com>
Mon, 21 Sep 2015 18:46:52 +0000 (11:46 -0700)
committerAndreas Gampe <agampe@google.com>
Mon, 21 Sep 2015 18:54:35 +0000 (11:54 -0700)
This reverts commit d5ce6a80d6795ada9f47600287706135481cbb4b.

This has an unexpected side effect of not correctly including
reference classes in the boot image. Needs more investigation.

Bug: 24103765
Bug: 24213543
Change-Id: I2a7649f07ec73c59a8cb543f12b6496ac74f7a11

compiler/oat_writer.cc

index c96b171..4ddd457 100644 (file)
@@ -1123,11 +1123,7 @@ size_t OatWriter::InitOatCodeDexFiles(size_t offset) {
     } while (false)
 
   VISIT(InitCodeMethodVisitor);
-  // InitImageMethodVisitor visits all methods, resolves them (failing if one cannot be resolved,
-  // which is a bad sign for a working boot image), and then install entrypoints.
-  // In case of VerifyAtRuntime, there won't be code, and we do not want to resolve the methods
-  // (this has been skipped in the driver for performance).
-  if (compiler_driver_->IsImage() && !compiler_driver_->GetCompilerOptions().VerifyAtRuntime()) {
+  if (compiler_driver_->IsImage()) {
     VISIT(InitImageMethodVisitor);
   }