diff options
author | Vladimir Marko <vmarko@google.com> | 2015-06-15 18:52:54 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-06-18 15:20:17 +0100 |
commit | a8b41003a717ecf399b890c18e9b0df49f55472f (patch) | |
tree | ab2a83ac36bd902322e7948c0d67fe5073563c3d /compiler/driver/compiler_driver.h | |
parent | f61ab97807441935cab89ebe6e24279e03d62bfe (diff) | |
download | art-a8b41003a717ecf399b890c18e9b0df49f55472f.zip art-a8b41003a717ecf399b890c18e9b0df49f55472f.tar.gz art-a8b41003a717ecf399b890c18e9b0df49f55472f.tar.bz2 |
ART: Fix reporting initialized classes by CompilerDriver.
Fix a bug where the CompilerDriver was erroneously reporting
classes as initialized during AOT compilation when they were
not guaranteed to be initialized at runtime.
This fix prevents the Quick compiler from inlining calls to
static methods in classes that are not guaranteed to be
initialized, so that the runtime performs the initialization
required for correctness.
Bug: 21847756
(cherry picked from commit 07785bb98dc8bbe192970e0f4c2cafd338a8dc68)
Change-Id: I60c7361cb6e8f51be20a3cbfcae19f3240bdfbed
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r-- | compiler/driver/compiler_driver.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 68c905e..f737007 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -501,6 +501,16 @@ class CompilerDriver { uint32_t field_idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + // Can we assume that the klass is initialized? + bool CanAssumeClassIsInitialized(mirror::Class* klass) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + bool CanReferrerAssumeClassIsInitialized(mirror::Class* referrer_class, mirror::Class* klass) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + + // Can we assume that the klass is loaded? + bool CanAssumeClassIsLoaded(mirror::Class* klass) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + // These flags are internal to CompilerDriver for collecting INVOKE resolution statistics. // The only external contract is that unresolved method has flags 0 and resolved non-0. enum { |