summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/quick/inline_method_analyser.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/quick/inline_method_analyser.cc b/runtime/quick/inline_method_analyser.cc
index 9cf4b1658..1c404ff14 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,