Revert "ART: Compiler support for invoke-polymorphic."

This reverts commit 02e3092f8d98f339588e48691db77f227b48ac1e.

Reasons for revert:

- Breaks MIPS/MIPS64 build.
- Fails under GCStress test on x64.
- Different x64 build configuration doesn't like relocation.

Change-Id: I512555b38165d05f8a07e8aed528f00302061001
diff --git a/test/957-methodhandle-transforms/src/Main.java b/test/957-methodhandle-transforms/src/Main.java
index 9e79ff4..5806509 100644
--- a/test/957-methodhandle-transforms/src/Main.java
+++ b/test/957-methodhandle-transforms/src/Main.java
@@ -40,17 +40,17 @@
         IllegalArgumentException.class);
 
     if (handle.type().returnType() != String.class) {
-      fail("Unexpected return type for handle: " + handle +
+      System.out.println("Unexpected return type for handle: " + handle +
           " [ " + handle.type() + "]");
     }
 
     final IllegalArgumentException iae = new IllegalArgumentException("boo!");
     try {
       handle.invoke(iae);
-      fail("Expected an exception of type: java.lang.IllegalArgumentException");
+      System.out.println("Expected an exception of type: java.lang.IllegalArgumentException");
     } catch (IllegalArgumentException expected) {
       if (expected != iae) {
-        fail("Wrong exception: expected " + iae + " but was " + expected);
+        System.out.println("Wrong exception: expected " + iae + " but was " + expected);
       }
     }
   }
@@ -262,7 +262,7 @@
       array[0] = 42;
       int value = (int) getter.invoke(array, 0);
       if (value != 42) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
 
       try {
@@ -284,7 +284,7 @@
       array[0] = 42;
       long value = (long) getter.invoke(array, 0);
       if (value != 42l) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -294,7 +294,7 @@
       array[0] = 42;
       short value = (short) getter.invoke(array, 0);
       if (value != 42l) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -304,7 +304,7 @@
       array[0] = 42;
       char value = (char) getter.invoke(array, 0);
       if (value != 42l) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -314,7 +314,7 @@
       array[0] = (byte) 0x8;
       byte value = (byte) getter.invoke(array, 0);
       if (value != (byte) 0x8) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -324,7 +324,7 @@
       array[0] = true;
       boolean value = (boolean) getter.invoke(array, 0);
       if (!value) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -334,7 +334,7 @@
       array[0] = 42.0f;
       float value = (float) getter.invoke(array, 0);
       if (value != 42.0f) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -344,7 +344,7 @@
       array[0] = 42.0;
       double value = (double) getter.invoke(array, 0);
       if (value != 42.0) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -372,10 +372,10 @@
       setter.invoke(array, 1, 43);
 
       if (array[0] != 42) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
       if (array[1] != 43) {
-        fail("Unexpected value: " + array[1]);
+        System.out.println("Unexpected value: " + array[1]);
       }
 
       try {
@@ -396,7 +396,7 @@
       long[] array = new long[1];
       setter.invoke(array, 0, 42l);
       if (array[0] != 42l) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -405,7 +405,7 @@
       short[] array = new short[1];
       setter.invoke(array, 0, (short) 42);
       if (array[0] != 42l) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -414,7 +414,7 @@
       char[] array = new char[1];
       setter.invoke(array, 0, (char) 42);
       if (array[0] != 42) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -423,7 +423,7 @@
       byte[] array = new byte[1];
       setter.invoke(array, 0, (byte) 0x8);
       if (array[0] != (byte) 0x8) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -432,7 +432,7 @@
       boolean[] array = new boolean[1];
       setter.invoke(array, 0, true);
       if (!array[0]) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -441,7 +441,7 @@
       float[] array = new float[1];
       setter.invoke(array, 0, 42.0f);
       if (array[0] != 42.0f) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -450,7 +450,7 @@
       double[] array = new double[1];
       setter.invoke(array, 0, 42.0);
       if (array[0] != 42.0) {
-        fail("Unexpected value: " + array[0]);
+        System.out.println("Unexpected value: " + array[0]);
       }
     }
 
@@ -471,7 +471,7 @@
       MethodHandle identity = MethodHandles.identity(boolean.class);
       boolean value = (boolean) identity.invoke(false);
       if (value) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -479,7 +479,7 @@
       MethodHandle identity = MethodHandles.identity(byte.class);
       byte value = (byte) identity.invoke((byte) 0x8);
       if (value != (byte) 0x8) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -487,7 +487,7 @@
       MethodHandle identity = MethodHandles.identity(char.class);
       char value = (char) identity.invoke((char) -56);
       if (value != (char) -56) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -495,7 +495,7 @@
       MethodHandle identity = MethodHandles.identity(short.class);
       short value = (short) identity.invoke((short) -59);
       if (value != (short) -59) {
-        fail("Unexpected value: " + Short.toString(value));
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -503,7 +503,7 @@
       MethodHandle identity = MethodHandles.identity(int.class);
       int value = (int) identity.invoke(52);
       if (value != 52) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -511,7 +511,7 @@
       MethodHandle identity = MethodHandles.identity(long.class);
       long value = (long) identity.invoke(-76l);
       if (value != (long) -76) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -519,7 +519,7 @@
       MethodHandle identity = MethodHandles.identity(float.class);
       float value = (float) identity.invoke(56.0f);
       if (value != (float) 56.0f) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -527,7 +527,7 @@
       MethodHandle identity = MethodHandles.identity(double.class);
       double value = (double) identity.invoke((double) 72.0);
       if (value != (double) 72.0) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -544,28 +544,28 @@
       MethodHandle constant = MethodHandles.constant(int.class, 56);
       int value = (int) constant.invoke();
       if (value != 56) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
 
       // short constant values are converted to int.
       constant = MethodHandles.constant(int.class, (short) 52);
       value = (int) constant.invoke();
       if (value != 52) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
 
       // char constant values are converted to int.
       constant = MethodHandles.constant(int.class, (char) 'b');
       value = (int) constant.invoke();
       if (value != (int) 'b') {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
 
       // int constant values are converted to int.
       constant = MethodHandles.constant(int.class, (byte) 0x1);
       value = (int) constant.invoke();
       if (value != 1) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
 
       // boolean, float, double and long primitive constants are not convertible
@@ -600,13 +600,13 @@
       MethodHandle constant = MethodHandles.constant(long.class, 56l);
       long value = (long) constant.invoke();
       if (value != 56l) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
 
       constant = MethodHandles.constant(long.class, (int) 56);
       value = (long) constant.invoke();
       if (value != 56l) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -615,7 +615,7 @@
       MethodHandle constant = MethodHandles.constant(byte.class, (byte) 0x12);
       byte value = (byte) constant.invoke();
       if (value != (byte) 0x12) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -624,7 +624,7 @@
       MethodHandle constant = MethodHandles.constant(boolean.class, true);
       boolean value = (boolean) constant.invoke();
       if (!value) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -633,7 +633,7 @@
       MethodHandle constant = MethodHandles.constant(char.class, 'f');
       char value = (char) constant.invoke();
       if (value != 'f') {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -642,7 +642,7 @@
       MethodHandle constant = MethodHandles.constant(short.class, (short) 123);
       short value = (short) constant.invoke();
       if (value != (short) 123) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -651,7 +651,7 @@
       MethodHandle constant = MethodHandles.constant(float.class, 56.0f);
       float value = (float) constant.invoke();
       if (value != 56.0f) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -660,7 +660,7 @@
       MethodHandle constant = MethodHandles.constant(double.class, 256.0);
       double value = (double) constant.invoke();
       if (value != 256.0) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -678,13 +678,13 @@
 
     char value = (char) stringCharAt.invoke("foo", 0);
     if (value != 'f') {
-      fail("Unexpected value: " + value);
+      System.out.println("Unexpected value: " + value);
     }
 
     MethodHandle bound = stringCharAt.bindTo("foo");
     value = (char) bound.invoke(0);
     if (value != 'f') {
-      fail("Unexpected value: " + value);
+      System.out.println("Unexpected value: " + value);
     }
 
     try {
@@ -706,7 +706,7 @@
     bound = integerParseInt.bindTo("78452");
     int intValue = (int) bound.invoke();
     if (intValue != 78452) {
-      fail("Unexpected value: " + intValue);
+      System.out.println("Unexpected value: " + intValue);
     }
   }
 
@@ -745,11 +745,11 @@
 
       boolean value = (boolean) adapter.invoke((int) 42);
       if (!value) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
       value = (boolean) adapter.invoke((int) 43);
       if (value) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -764,7 +764,7 @@
 
       int value = (int) adapter.invoke("56");
       if (value != 57) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
 
@@ -779,7 +779,7 @@
 
       int value = (int) adapter.invoke();
       if (value != 42) {
-        fail("Unexpected value: " + value);
+        System.out.println("Unexpected value: " + value);
       }
     }
   }
@@ -791,7 +791,7 @@
       return;
     }
 
-    fail("Unexpected arguments: " + a + ", " + b + ", " + c
+    System.out.println("Unexpected arguments: " + a + ", " + b + ", " + c
         + ", " + d + ", " + e + ", " + f + ", " + g + ", " + h);
   }
 
@@ -800,7 +800,7 @@
       return;
     }
 
-    fail("Unexpected arguments: " + a + ", " + b);
+    System.out.println("Unexpected arguments: " + a + ", " + b);
   }
 
   public static void testPermuteArguments() throws Throwable {
@@ -893,11 +893,6 @@
     Thread.dumpStack();
   }
 
-  public static void fail(String message) {
-    System.out.println("fail: " + message);
-    Thread.dumpStack();
-  }
-
   public static void assertEquals(String s1, String s2) {
     if (s1 == s2) {
       return;