summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-06-21 16:18:10 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-06-21 16:18:10 +0000
commit4692c35c151951aa1fa901ca24bfa302a9beeacf (patch)
tree8d28d7714dd7fa0ae1ff44888ae61f3c8786bfeb /compiler/optimizing/stack_map_stream.cc
parentf6d4f6e0e61977777b7a9ca18b75bcd26e98e9f9 (diff)
parent87f3fcbd0db352157fc59148e94647ef21b73bce (diff)
Merge "Replace String.charAt() with HIR."
Diffstat (limited to 'compiler/optimizing/stack_map_stream.cc')
-rw-r--r--compiler/optimizing/stack_map_stream.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc
index 11a254ef63..fc8af6462a 100644
--- a/compiler/optimizing/stack_map_stream.cc
+++ b/compiler/optimizing/stack_map_stream.cc
@@ -228,7 +228,7 @@ size_t StackMapStream::ComputeDexRegisterMapsSize() const {
void StackMapStream::ComputeInlineInfoEncoding() {
uint32_t method_index_max = 0;
- uint32_t dex_pc_max = 0;
+ uint32_t dex_pc_max = DexFile::kDexNoIndex;
uint32_t invoke_type_max = 0;
uint32_t inline_info_index = 0;
@@ -236,7 +236,10 @@ void StackMapStream::ComputeInlineInfoEncoding() {
for (size_t j = 0; j < entry.inlining_depth; ++j) {
InlineInfoEntry inline_entry = inline_infos_[inline_info_index++];
method_index_max = std::max(method_index_max, inline_entry.method_index);
- dex_pc_max = std::max(dex_pc_max, inline_entry.dex_pc);
+ if (inline_entry.dex_pc != DexFile::kDexNoIndex &&
+ (dex_pc_max == DexFile::kDexNoIndex || dex_pc_max < inline_entry.dex_pc)) {
+ dex_pc_max = inline_entry.dex_pc;
+ }
invoke_type_max = std::max(invoke_type_max, static_cast<uint32_t>(inline_entry.invoke_type));
}
}