summaryrefslogtreecommitdiffstats
path: root/runtime/mirror/art_method.cc
diff options
context:
space:
mode:
authorMingyao Yang <mingyao@google.com>2014-07-16 10:44:41 -0700
committerMingyao Yang <mingyao@google.com>2014-07-22 15:03:50 -0700
commit2cdbad7c62f126581ec5177104de961c4d71adaa (patch)
tree6283b87bc9b65249decac9b0e38fe396782b8d7e /runtime/mirror/art_method.cc
parentc62944adcd427dca55489d234428da47c43a0aab (diff)
downloadart-2cdbad7c62f126581ec5177104de961c4d71adaa.zip
art-2cdbad7c62f126581ec5177104de961c4d71adaa.tar.gz
art-2cdbad7c62f126581ec5177104de961c4d71adaa.tar.bz2
Set vtable in class object to null after linking.
This is follow-up work of embedding imt and vtable for faster interface/virtual call dispatching. Once vtable becomes embedded, the original vtable is nulled. Change-Id: I307696657d1e283654169dbecb8f7815c42bbabc
Diffstat (limited to 'runtime/mirror/art_method.cc')
-rw-r--r--runtime/mirror/art_method.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc
index 167f848..211ba1d 100644
--- a/runtime/mirror/art_method.cc
+++ b/runtime/mirror/art_method.cc
@@ -130,12 +130,11 @@ ArtMethod* ArtMethod::FindOverriddenMethod() {
Class* declaring_class = GetDeclaringClass();
Class* super_class = declaring_class->GetSuperClass();
uint16_t method_index = GetMethodIndex();
- ObjectArray<ArtMethod>* super_class_vtable = super_class->GetVTable();
ArtMethod* result = NULL;
// Did this method override a super class method? If so load the result from the super class'
// vtable
- if (super_class_vtable != NULL && method_index < super_class_vtable->GetLength()) {
- result = super_class_vtable->Get(method_index);
+ if (super_class->HasVTable() && method_index < super_class->GetVTableLength()) {
+ result = super_class->GetVTableEntry(method_index);
} else {
// Method didn't override superclass method so search interfaces
if (IsProxyMethod()) {