ART: Allow quickening in the boot image
Update the class linker to accept class status from the boot image
in compiler mode. Update compiler driver to allow quickening for
boot image classes. Update method verifier to accept quickened
instructions in compiler mode when we just want to dump. Update
oatdump to the new verifier API.
Bug: 17316928
Change-Id: I9ef1bfd78b0d93625b89b3d662131d7d6e5f2903
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 669fb34..a165901 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -79,7 +79,7 @@
// Thread-local storage compiler worker threads
class CompilerTls {
public:
- CompilerTls() : llvm_info_(NULL) {}
+ CompilerTls() : llvm_info_(nullptr) {}
~CompilerTls() {}
void* GetLLVMInfo() { return llvm_info_; }
@@ -95,7 +95,7 @@
// Create a compiler targeting the requested "instruction_set".
// "image" should be true if image specific optimizations should be
// enabled. "image_classes" lets the compiler know what classes it
- // can assume will be in the image, with NULL implying all available
+ // can assume will be in the image, with nullptr implying all available
// classes.
explicit CompilerDriver(const CompilerOptions* compiler_options,
VerificationResults* verification_results,
@@ -197,9 +197,9 @@
// Are runtime access checks necessary in the compiled code?
bool CanAccessTypeWithoutChecks(uint32_t referrer_idx, const DexFile& dex_file,
- uint32_t type_idx, bool* type_known_final = NULL,
- bool* type_known_abstract = NULL,
- bool* equals_referrers_class = NULL)
+ uint32_t type_idx, bool* type_known_final = nullptr,
+ bool* type_known_abstract = nullptr,
+ bool* equals_referrers_class = nullptr)
LOCKS_EXCLUDED(Locks::mutator_lock_);
// Are runtime access and instantiable checks necessary in the code?
@@ -447,7 +447,7 @@
referrer_class_def_idx_(referrer_class_def_idx),
referrer_method_idx_(referrer_method_idx),
literal_offset_(literal_offset) {
- CHECK(dex_file_ != NULL);
+ CHECK(dex_file_ != nullptr);
}
virtual ~PatchInformation() {}
@@ -667,6 +667,13 @@
ThreadPool* thread_pool, TimingLogger* timings)
LOCKS_EXCLUDED(Locks::mutator_lock_);
+ void SetVerified(jobject class_loader, const std::vector<const DexFile*>& dex_files,
+ ThreadPool* thread_pool, TimingLogger* timings);
+ void SetVerifiedDexFile(jobject class_loader, const DexFile& dex_file,
+ const std::vector<const DexFile*>& dex_files,
+ ThreadPool* thread_pool, TimingLogger* timings)
+ LOCKS_EXCLUDED(Locks::mutator_lock_);
+
void InitializeClasses(jobject class_loader, const std::vector<const DexFile*>& dex_files,
ThreadPool* thread_pool, TimingLogger* timings)
LOCKS_EXCLUDED(Locks::mutator_lock_);
@@ -724,7 +731,7 @@
const bool image_;
// If image_ is true, specifies the classes that will be included in
- // the image. Note if image_classes_ is NULL, all classes are
+ // the image. Note if image_classes_ is nullptr, all classes are
// included in the image.
std::unique_ptr<std::set<std::string>> image_classes_;