From 2ed8deff799448e094fa7a7cb9cf3b718820f4c6 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 28 Aug 2014 14:41:02 -0700 Subject: 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 (cherry picked from commit 35439baf287b291b67ee406308e17fc6194facbf) Change-Id: I9ef1bfd78b0d93625b89b3d662131d7d6e5f2903 --- compiler/driver/compiler_driver.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'compiler/driver/compiler_driver.h') diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 624947d7b1..3c76098109 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -81,7 +81,7 @@ class CompilerDriver { // 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, @@ -183,9 +183,9 @@ class CompilerDriver { // 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? @@ -436,7 +436,7 @@ class CompilerDriver { 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() {} @@ -655,6 +655,13 @@ class CompilerDriver { ThreadPool* thread_pool, TimingLogger* timings) LOCKS_EXCLUDED(Locks::mutator_lock_); + void SetVerified(jobject class_loader, const std::vector& dex_files, + ThreadPool* thread_pool, TimingLogger* timings); + void SetVerifiedDexFile(jobject class_loader, const DexFile& dex_file, + const std::vector& dex_files, + ThreadPool* thread_pool, TimingLogger* timings) + LOCKS_EXCLUDED(Locks::mutator_lock_); + void InitializeClasses(jobject class_loader, const std::vector& dex_files, ThreadPool* thread_pool, TimingLogger* timings) LOCKS_EXCLUDED(Locks::mutator_lock_); @@ -712,7 +719,7 @@ class CompilerDriver { 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> image_classes_; -- cgit v1.2.3-59-g8ed1b