diff options
author | Vladimir Marko <vmarko@google.com> | 2015-05-06 14:09:04 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-05-06 17:51:37 +0100 |
commit | f7083ed806da454ba6a50ddef34799559f863fd4 (patch) | |
tree | cd9f1d02af86f35c95df3c284aa2b7fc020e6f2e /runtime/quick | |
parent | 529c147b6ce15fd4ac8b2500c7e7a5749e98396b (diff) | |
download | art-f7083ed806da454ba6a50ddef34799559f863fd4.tar.gz art-f7083ed806da454ba6a50ddef34799559f863fd4.tar.bz2 art-f7083ed806da454ba6a50ddef34799559f863fd4.zip |
Quick: Inline synthetic accessors generated by jack.
While javac names synthetic accessors "access$nnn", jack
names them "-getN", "-putN" and "-wrapN". For simplicity,
treat all methods starting with "-" as synthetic accessors.
Bug: 20873367
(cherry picked from commit d5f1005da7599f149b1332402c9791ef2acb8c42)
Change-Id: Ifcc77fc3c5dd44797a48632c8e16416fbc273a93
Diffstat (limited to 'runtime/quick')
-rw-r--r-- | runtime/quick/inline_method_analyser.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/quick/inline_method_analyser.cc b/runtime/quick/inline_method_analyser.cc index 9cf4b16582..1c404ff141 100644 --- a/runtime/quick/inline_method_analyser.cc +++ b/runtime/quick/inline_method_analyser.cc @@ -134,7 +134,10 @@ bool InlineMethodAnalyser::AnalyseMethodCode(verifier::MethodVerifier* verifier, bool InlineMethodAnalyser::IsSyntheticAccessor(MethodReference ref) { const DexFile::MethodId& method_id = ref.dex_file->GetMethodId(ref.dex_method_index); const char* method_name = ref.dex_file->GetMethodName(method_id); - return strncmp(method_name, "access$", strlen("access$")) == 0; + // javac names synthetic accessors "access$nnn", + // jack names them "-getN", "-putN", "-wrapN". + return strncmp(method_name, "access$", strlen("access$")) == 0 || + strncmp(method_name, "-", strlen("-")) == 0; } bool InlineMethodAnalyser::AnalyseReturnMethod(const DexFile::CodeItem* code_item, |