summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils-inl.h
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2014-11-03 22:27:16 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-11-03 22:27:16 +0000
commit0c25f441d0d85ec882b4634f496ed5bb71995f7c (patch)
tree6ddb67ac39641acf3db3f30c9346ea5c264f2b18 /runtime/entrypoints/entrypoint_utils-inl.h
parenta338da434433b180c33e043929ea79b18f4c093c (diff)
parent207a37dbb8049bdf585d17551c3eb3df685a629f (diff)
Merge "Check null this pointer for direct methods in FindMethodFast."
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils-inl.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 670bf2aa8e..f76da8edaa 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -541,8 +541,7 @@ static inline mirror::ArtMethod* FindMethodFast(uint32_t method_idx,
mirror::Object* this_object,
mirror::ArtMethod* referrer,
bool access_check, InvokeType type) {
- bool is_direct = type == kStatic || type == kDirect;
- if (UNLIKELY(this_object == NULL && !is_direct)) {
+ if (UNLIKELY(this_object == NULL && type != kStatic)) {
return NULL;
}
mirror::ArtMethod* resolved_method =
@@ -567,7 +566,7 @@ static inline mirror::ArtMethod* FindMethodFast(uint32_t method_idx,
}
if (type == kInterface) { // Most common form of slow path dispatch.
return this_object->GetClass()->FindVirtualMethodForInterface(resolved_method);
- } else if (is_direct) {
+ } else if (type == kStatic || type == kDirect) {
return resolved_method;
} else if (type == kSuper) {
return referrer->GetDeclaringClass()->GetSuperClass()