ART: Add miranda checking

Add a test for resolution of miranda methods across dex-files. See
CL 112688 and b/18193682 for the code change.

Fix the test script to support no-verify again.

Weaken the dex cache check to a check whether the found method is a
miranda method. This will penalize miranda methods, as they will
always have to be resolved by name, but does not require the multi-step
load of the method's dex cache.

Bug: 18193682
Change-Id: I1dae2a9ec0985dc8625acd7dd5686a5d3cdc8888
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 9ecc885..f1044e8 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -39,6 +39,7 @@
 USE_JVM="n"
 VERIFY="y"
 ZYGOTE=""
+DEX_VERIFY=""
 
 while true; do
     if [ "x$1" = "x--quiet" ]; then
@@ -176,7 +177,6 @@
     fi
 
     if [ "$VERIFY" = "y" ]; then
-        DEX_VERIFY=""
         JVM_VERIFY_ARG="-Xverify:all"
         msg "Performing verification"
     else
@@ -234,7 +234,12 @@
 
 if [ "$INTERPRETER" = "y" ]; then
     INT_OPTS="-Xint"
-    COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=interpret-only"
+    if [ "$VERIFY" = "y" ] ; then
+      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=interpret-only"
+    else
+      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-none"
+      DEX_VERIFY="${DEX_VERIFY} -Xverify:none"
+    fi
 fi
 
 JNI_OPTS="-Xjnigreflimit:512 -Xcheck:jni"
@@ -279,6 +284,7 @@
 dalvikvm_cmdline="$INVOKE_WITH $GDB $ANDROID_ROOT/bin/$DALVIKVM \
                   $GDB_ARGS \
                   $FLAGS \
+                  $DEX_VERIFY \
                   -XXlib:$LIB \
                   $PATCHOAT \
                   $DEX2OAT \