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_map.h b/runtime/stack_map.h
index ff70b6c..53f80e5 100644
--- a/runtime/stack_map.h
+++ b/runtime/stack_map.h
@@ -75,7 +75,7 @@
 
   size_t size() const { return count_; }
 
-  bool IsValid() const { return count_ != 0; }
+  bool empty() const { return count_ == 0; }
 
   DexRegisterLocation Get(size_t index) const {
     DCHECK_LT(index, count_);
@@ -194,7 +194,6 @@
             const CodeInfo& code_info,
             const MethodInfo& method_info,
             uint32_t code_offset,
-            uint16_t number_of_dex_registers,
             InstructionSet instruction_set) const;
 };
 
@@ -234,8 +233,7 @@
   void Dump(VariableIndentationOutputStream* vios,
             const CodeInfo& info,
             const StackMap& stack_map,
-            const MethodInfo& method_info,
-            uint16_t number_of_dex_registers) const;
+            const MethodInfo& method_info) const;
 };
 
 class InvokeInfo : public BitTable<3>::Accessor {
@@ -358,8 +356,7 @@
     return InvokeInfo(&invoke_infos_, index);
   }
 
-  ALWAYS_INLINE DexRegisterMap GetDexRegisterMapOf(StackMap stack_map,
-                                                   size_t vregs ATTRIBUTE_UNUSED = 0) const {
+  ALWAYS_INLINE DexRegisterMap GetDexRegisterMapOf(StackMap stack_map) const {
     if (stack_map.HasDexRegisterMap()) {
       DexRegisterMap map(number_of_dex_registers_, DexRegisterLocation::Invalid());
       DecodeDexRegisterMap(stack_map.Row(), /* first_dex_register */ 0, &map);
@@ -368,9 +365,7 @@
     return DexRegisterMap(0, DexRegisterLocation::None());
   }
 
-  ALWAYS_INLINE DexRegisterMap GetDexRegisterMapAtDepth(uint8_t depth,
-                                                        StackMap stack_map,
-                                                        size_t vregs ATTRIBUTE_UNUSED = 0) const {
+  ALWAYS_INLINE DexRegisterMap GetDexRegisterMapAtDepth(uint8_t depth, StackMap stack_map) const {
     if (stack_map.HasDexRegisterMap()) {
       // The register counts are commutative and include all outer levels.
       // This allows us to determine the range [first, last) in just two lookups.
@@ -481,7 +476,6 @@
   // `code_offset` is the (absolute) native PC of the compiled method.
   void Dump(VariableIndentationOutputStream* vios,
             uint32_t code_offset,
-            uint16_t number_of_dex_registers,
             bool verbose,
             InstructionSet instruction_set,
             const MethodInfo& method_info) const;