Move annotations to native.
Art side of this change. There is also a corresponding Libcore change.
Seeing ~2-3x speedup over dalvik KK MR1 in AnnotatedElementBenchmark.
Benchmark Speedup of Art AOSP to Dalvik KK MR1
GetAllReturnsLargeAnnotation 2.99
GetAllReturnsMarkerAnnotation 2.20
GetAllReturnsNoAnnotation 2.43
GetAllReturnsSmallAnnotation 2.52
GetAllReturnsThreeAnnotations 2.87
GetAnnotationsOnSubclass 2.42
GetDeclaredAnnotationsOnSubclass 2.49
GetFieldAnnotation 2.68
GetFieldAnnotations 2.60
GetMethodAnnotation 2.66
GetMethodAnnotations 2.61
GetParameterAnnotations 2.52
GetTypeAnnotation 2.56
GetTypeAnnotations 2.17
IsFieldAnnotationPresent 3.26
IsMethodAnnotationPresent 4.99
IsTypeAnnotationPresent 1.34
Change-Id: Ibdbb6d23b17eaab6e83c8774b1bb9401e8227941
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 7243a25..fbf4035 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -229,6 +229,12 @@
SHARED_REQUIRES(Locks::mutator_lock_);
ArtMethod* ResolveMethod(Thread* self, uint32_t method_idx, ArtMethod* referrer, InvokeType type)
SHARED_REQUIRES(Locks::mutator_lock_) REQUIRES(!dex_lock_, !Roles::uninterruptible_);
+ ArtMethod* ResolveMethodWithoutInvokeType(const DexFile& dex_file,
+ uint32_t method_idx,
+ Handle<mirror::DexCache> dex_cache,
+ Handle<mirror::ClassLoader> class_loader)
+ SHARED_REQUIRES(Locks::mutator_lock_)
+ REQUIRES(!dex_lock_, !Roles::uninterruptible_);
ArtField* GetResolvedField(uint32_t field_idx, mirror::Class* field_declaring_class)
SHARED_REQUIRES(Locks::mutator_lock_);