From 2c64a837e62c2839521c89060b5bb0dcb237ddda Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 4 Jan 2018 11:31:56 +0000 Subject: Change ClassStatus to fit into 4 bits. In preparation for extending the type check bit string from 24 to 28 bits, rewrite ClassStatus to fit into 4 bits. Also perform a proper cleanup of the ClassStatus, i.e. change it to an enum class, remove the "Status" word from enumerator names, replace "Max" with "Last" in line with other enumerations and remove aliases from mirror::Class. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: testrunner.py --target --optimizing Bug: 64692057 Bug: 65318848 Change-Id: Iec1610ba5dac2c527b36c12819f132e1a77f2d45 --- compiler/driver/compiler_driver.h | 16 ++++++++++------ 1 file changed, 10 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 e001726c95..bcea8530e4 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -31,13 +31,13 @@ #include "base/mutex.h" #include "base/timing_logger.h" #include "class_reference.h" +#include "class_status.h" #include "compiler.h" #include "dex_file.h" #include "dex_file_types.h" #include "driver/compiled_method_storage.h" #include "jit/profile_compilation_info.h" #include "method_reference.h" -#include "mirror/class.h" // For mirror::Class::Status. #include "os.h" #include "safe_map.h" #include "thread_pool.h" @@ -47,6 +47,7 @@ namespace art { namespace mirror { +class Class; class DexCache; } // namespace mirror @@ -55,18 +56,21 @@ class MethodVerifier; class VerifierDepsTest; } // namespace verifier +class ArtField; class BitVector; class CompiledMethod; class CompilerOptions; class DexCompilationUnit; +template class Handle; struct InlineIGetIPutData; class InstructionSetFeatures; class InternTable; enum InvokeType : uint32_t; +class MemberOffset; +template class ObjPtr; class ParallelCompilationManager; class ScopedObjectAccess; template class SrcMap; -template class Handle; class TimingLogger; class VdexFile; class VerificationResults; @@ -152,8 +156,8 @@ class CompilerDriver { std::unique_ptr> CreateQuickResolutionTrampoline() const; std::unique_ptr> CreateQuickToInterpreterBridge() const; - mirror::Class::Status GetClassStatus(const ClassReference& ref) const; - bool GetCompiledClass(const ClassReference& ref, mirror::Class::Status* status) const; + ClassStatus GetClassStatus(const ClassReference& ref) const; + bool GetCompiledClass(const ClassReference& ref, ClassStatus* status) const; CompiledMethod* GetCompiledMethod(MethodReference ref) const; size_t GetNonRelativeLinkerPatchCount() const; @@ -321,7 +325,7 @@ class CompilerDriver { // according to the profile file. bool ShouldVerifyClassBasedOnProfile(const DexFile& dex_file, uint16_t class_idx) const; - void RecordClassStatus(const ClassReference& ref, mirror::Class::Status status); + void RecordClassStatus(const ClassReference& ref, ClassStatus status); // Checks if the specified method has been verified without failures. Returns // false if the method is not in the verification results (GetVerificationResults). @@ -476,7 +480,7 @@ class CompilerDriver { GUARDED_BY(requires_constructor_barrier_lock_); // All class references that this compiler has compiled. Indexed by class defs. - using ClassStateTable = AtomicDexRefMap; + using ClassStateTable = AtomicDexRefMap; ClassStateTable compiled_classes_; // All class references that are in the classpath. Indexed by class defs. ClassStateTable classpath_classes_; -- cgit v1.2.3-59-g8ed1b