lambda: Experimental support for capture-variable and liberate-variable

Supports capturing/liberating any primitive variables.
No support for capturing objects/lambdas yet since they would both
need GC changes to track roots through closures.

Change-Id: Ibfb68bfe4c579dbf93823aac4c0e6ac8f6360c5d
diff --git a/runtime/dex_instruction.cc b/runtime/dex_instruction.cc
index fc4df14..5250b0d 100644
--- a/runtime/dex_instruction.cc
+++ b/runtime/dex_instruction.cc
@@ -322,10 +322,10 @@
     }
     case k25x: {
       if (Opcode() == INVOKE_LAMBDA) {
-        uint32_t arg[kMaxVarArgRegs];
+        uint32_t arg[kMaxVarArgRegs25x];
         GetAllArgs25x(arg);
         const size_t num_extra_var_args = VRegB_25x();
-        DCHECK_LE(num_extra_var_args + 1, kMaxVarArgRegs);
+        DCHECK_LE(num_extra_var_args + 2, arraysize(arg));
 
         // invoke-lambda vC, {vD, vE, vF, vG}
         os << opcode << " v" << arg[0] << ", {";
@@ -333,7 +333,7 @@
           if (i != 0) {
             os << ", ";
           }
-          os << "v" << arg[i+1];
+          os << "v" << arg[i+2];  // Don't print the pair of vC registers. Pair is implicit.
         }
         os << "}";
         break;