summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2018-06-08 11:14:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-06-08 11:14:39 +0000
commita4bae540b7c91136aaab02fd1638c8df6cb96970 (patch)
treeeb517cc7ba2a3b0d37b9be26e8b811d9f015d672 /runtime/quick_exception_handler.cc
parentbac28b0d5fb0765291adf8379bc502783cbb15b0 (diff)
parentfd89b0739d4000ea70f28bf53dea531027024f5a (diff)
Merge "Remove unused GetDexRegisterMap arguments."
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r--runtime/quick_exception_handler.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 23ccf6ad58..cf1cbe7f7b 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -230,19 +230,18 @@ void QuickExceptionHandler::SetCatchEnvironmentForOptimizedHandler(StackVisitor*
// Find stack map of the catch block.
StackMap catch_stack_map = code_info.GetCatchStackMapForDexPc(GetHandlerDexPc());
DCHECK(catch_stack_map.IsValid());
- DexRegisterMap catch_vreg_map =
- code_info.GetDexRegisterMapOf(catch_stack_map, number_of_vregs);
- if (!catch_vreg_map.IsValid() || !catch_vreg_map.HasAnyLiveDexRegisters()) {
+ DexRegisterMap catch_vreg_map = code_info.GetDexRegisterMapOf(catch_stack_map);
+ if (!catch_vreg_map.HasAnyLiveDexRegisters()) {
return;
}
+ DCHECK_EQ(catch_vreg_map.size(), number_of_vregs);
// Find stack map of the throwing instruction.
StackMap throw_stack_map =
code_info.GetStackMapForNativePcOffset(stack_visitor->GetNativePcOffset());
DCHECK(throw_stack_map.IsValid());
- DexRegisterMap throw_vreg_map =
- code_info.GetDexRegisterMapOf(throw_stack_map, number_of_vregs);
- DCHECK(throw_vreg_map.IsValid());
+ DexRegisterMap throw_vreg_map = code_info.GetDexRegisterMapOf(throw_stack_map);
+ DCHECK_EQ(throw_vreg_map.size(), number_of_vregs);
// Copy values between them.
for (uint16_t vreg = 0; vreg < number_of_vregs; ++vreg) {
@@ -405,14 +404,12 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor {
uint32_t register_mask = code_info.GetRegisterMaskOf(stack_map);
BitMemoryRegion stack_mask = code_info.GetStackMaskOf(stack_map);
DexRegisterMap vreg_map = IsInInlinedFrame()
- ? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1,
- stack_map,
- number_of_vregs)
- : code_info.GetDexRegisterMapOf(stack_map, number_of_vregs);
-
- if (!vreg_map.IsValid()) {
+ ? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1, stack_map)
+ : code_info.GetDexRegisterMapOf(stack_map);
+ if (vreg_map.empty()) {
return;
}
+ DCHECK_EQ(vreg_map.size(), number_of_vregs);
for (uint16_t vreg = 0; vreg < number_of_vregs; ++vreg) {
if (updated_vregs != nullptr && updated_vregs[vreg]) {