summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/entrypoint_utils.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-01-07 08:58:46 -0800
committerIan Rogers <irogers@google.com>2014-01-08 09:15:46 -0800
commit5ddb4104ac605d66693b55b79f26f8b8a5505e63 (patch)
tree9231f1e54e9a1aaca640c590d5b4f318720e263b /runtime/entrypoints/entrypoint_utils.h
parent5a2ced515a456f15dcf194843c024e835eda7dbe (diff)
downloadart-5ddb4104ac605d66693b55b79f26f8b8a5505e63.zip
art-5ddb4104ac605d66693b55b79f26f8b8a5505e63.tar.gz
art-5ddb4104ac605d66693b55b79f26f8b8a5505e63.tar.bz2
Remove intialized static storage from dex cache.
The initialized static storage array is used by compiled code to determine if for a sget/sput class initialization is necessary. The compiled code typically doesn't require this test as the class is pre-initialized or the class being accessed is the same as the current method. Change-Id: Icbc45e692b3d0ac61e559e69edb6c9b29439e571
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h
index a60446c..e7fe072 100644
--- a/runtime/entrypoints/entrypoint_utils.h
+++ b/runtime/entrypoints/entrypoint_utils.h
@@ -517,15 +517,15 @@ static inline mirror::Class* ResolveVerifyAndClinit(uint32_t type_idx,
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
mirror::Class* klass = class_linker->ResolveType(type_idx, referrer);
- if (UNLIKELY(klass == NULL)) {
+ if (UNLIKELY(klass == nullptr)) {
CHECK(self->IsExceptionPending());
- return NULL; // Failure - Indicate to caller to deliver exception
+ return nullptr; // Failure - Indicate to caller to deliver exception
}
// Perform access check if necessary.
mirror::Class* referring_class = referrer->GetDeclaringClass();
if (verify_access && UNLIKELY(!referring_class->CanAccess(klass))) {
ThrowIllegalAccessErrorClass(referring_class, klass);
- return NULL; // Failure - Indicate to caller to deliver exception
+ return nullptr; // Failure - Indicate to caller to deliver exception
}
// If we're just implementing const-class, we shouldn't call <clinit>.
if (!can_run_clinit) {
@@ -541,9 +541,8 @@ static inline mirror::Class* ResolveVerifyAndClinit(uint32_t type_idx,
SirtRef<mirror::Class> sirt_class(self, klass);
if (!class_linker->EnsureInitialized(sirt_class, true, true)) {
CHECK(self->IsExceptionPending());
- return NULL; // Failure - Indicate to caller to deliver exception
+ return nullptr; // Failure - Indicate to caller to deliver exception
}
- referrer->GetDexCacheInitializedStaticStorage()->Set(type_idx, sirt_class.get());
return sirt_class.get();
}