summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-10-11 19:03:20 -0700
committer Andreas Gampe <agampe@google.com> 2018-12-13 10:52:08 -0800
commit5b20b358edb0c586ae2106a82be365717da82507 (patch)
tree3cda8d9774087f3f6b80681f18d03c271d113fbf /compiler/driver/compiler_driver.cc
parent62f6e9055363df6b6372d86960e8d987d6c439a1 (diff)
ART: Rewrite EnsureInitialized hit case
When an initialized class is found during EnsureInitialized, do not check whether verification was attempted and fix up bits. Instead, ensure that all class-loading paths have that done when eventually getting here. Special runtime-constructed classes (primitives, arrays, proxies) need code to do this work. "Normal" classes have the work done during VerifyClass. Leave a DCHECK in as a state check. Protect state transfers with additional checks. This reduces the overhead of the interpreter which cannot elide initialization checks for static accesses. Bug: 115834172 Test: m test-art-host Change-Id: Iacd6652583364509c37eafe81fed1198abb1b71a
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 18f7105769..0039be0fde 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1742,6 +1742,9 @@ static void LoadAndUpdateStatus(const ClassAccessor& accessor,
if (&cls->GetDexFile() == &accessor.GetDexFile()) {
ObjectLock<mirror::Class> lock(self, cls);
mirror::Class::SetStatus(cls, status, self);
+ if (status >= ClassStatus::kVerified) {
+ cls->SetVerificationAttempted();
+ }
}
} else {
DCHECK(self->IsExceptionPending());