Remove unused GetDexRegisterMap arguments.
They are no longer needed in the new encoding.
I reuse the local variables in most places to DCHECK the size
of the decoded register map. This has one catch though:
We sometimes omit all dex registers, so the DCHECK should be
done only after checking if the map is empty (if applicable).
Test: test-art-host-gtest-stack_map_test
Change-Id: I94b67029842374bc8eb7c9e5eac76fc93a651f24
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 0b3441a..56e47b9 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -236,14 +236,12 @@
size_t depth_in_stack_map = current_inlining_depth_ - 1;
DexRegisterMap dex_register_map = IsInInlinedFrame()
- ? code_info.GetDexRegisterMapAtDepth(depth_in_stack_map,
- stack_map,
- number_of_dex_registers)
- : code_info.GetDexRegisterMapOf(stack_map, number_of_dex_registers);
-
- if (!dex_register_map.IsValid()) {
+ ? code_info.GetDexRegisterMapAtDepth(depth_in_stack_map, stack_map)
+ : code_info.GetDexRegisterMapOf(stack_map);
+ if (dex_register_map.empty()) {
return false;
}
+ DCHECK_EQ(dex_register_map.size(), number_of_dex_registers);
DexRegisterLocation::Kind location_kind = dex_register_map.GetLocationKind(vreg);
switch (location_kind) {
case DexRegisterLocation::Kind::kInStack: {