Tracking java.lang.reflect.Executable changes
Added a method to Class: total vtable entries increases
by one.
Handling knock-ons of introducing Executable into the
class hierarchy above AbstractMethod.
Rearranging java_lang_reflect_*.cc code to track libcore
changes that reduce duplication between Constructor / Method
/ Executable and AbstractMethod and track the OpenJDK 8
more closely.
Bug: 28666126
Change-Id: I6b5c476a14b8ea25556c35448431de744519b6c2
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index 7999aef..5f225be 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -32,6 +32,7 @@
#include "mirror/accessible_object.h"
#include "mirror/class-inl.h"
#include "mirror/dex_cache.h"
+#include "mirror/executable.h"
#include "mirror/field.h"
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
@@ -691,6 +692,12 @@
};
};
+struct ExecutableOffsets : public CheckOffsets<mirror::Executable> {
+ ExecutableOffsets() : CheckOffsets<mirror::Executable>(
+ false, "Ljava/lang/reflect/Executable;") {
+ };
+};
+
struct AbstractMethodOffsets : public CheckOffsets<mirror::AbstractMethod> {
AbstractMethodOffsets() : CheckOffsets<mirror::AbstractMethod>(
false, "Ljava/lang/reflect/AbstractMethod;") {
@@ -720,6 +727,7 @@
EXPECT_TRUE(FinalizerReferenceOffsets().Check());
EXPECT_TRUE(AccessibleObjectOffsets().Check());
EXPECT_TRUE(FieldOffsets().Check());
+ EXPECT_TRUE(ExecutableOffsets().Check());
EXPECT_TRUE(AbstractMethodOffsets().Check());
}