diff options
author | 2018-02-20 08:44:20 +0000 | |
---|---|---|
committer | 2018-03-06 11:56:26 +0000 | |
commit | a2649fce613e353f14bb4bed3ea239e157df70eb (patch) | |
tree | 785b510ee107c1483780107f4912d5e71498fe18 /runtime/art_method-inl.h | |
parent | 0f6c3ec0971af7be632ab7ee3286791e6e0a9418 (diff) |
ART: Fixes for constructor parameter annotations
Synthesize empty parameter annotations for implicit parameters on
constructors. Reflective methods for recovering parameter annotations
expect them to be present though they may not be present in the DEX file.
(cherry-picked from commit 58143d2c47734c46c1fa4855cb603c24f2d15454)
Bug: b/68033708
Test: art/test/run-test --host 715
Change-Id: I0827c7e71ff7c7e044fc9dd6c5aac639a0e1a4c6
Diffstat (limited to 'runtime/art_method-inl.h')
-rw-r--r-- | runtime/art_method-inl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h index 145eb67aa9..92769942c0 100644 --- a/runtime/art_method-inl.h +++ b/runtime/art_method-inl.h @@ -295,6 +295,11 @@ inline const DexFile::ClassDef& ArtMethod::GetClassDef() { return GetDexFile()->GetClassDef(GetClassDefIndex()); } +inline size_t ArtMethod::GetNumberOfParameters() { + constexpr size_t return_type_count = 1u; + return strlen(GetShorty()) - return_type_count; +} + inline const char* ArtMethod::GetReturnTypeDescriptor() { DCHECK(!IsProxyMethod()); const DexFile* dex_file = GetDexFile(); |