changeset 403:4d38d18ba364

meth-lazy: removed obsolete DataBinding interface and commented-out code
author mhaupt
date Fri, 13 Jul 2012 10:45:43 +0200
parents 421b98214f0d
children 4deb4756153e
files meth-lazy-7023639.xbmh.patch
diffstat 1 files changed, 260 insertions(+), 219 deletions(-) [+]
line wrap: on
line diff
--- a/meth-lazy-7023639.xbmh.patch	Thu Jul 12 02:21:22 2012 -0700
+++ b/meth-lazy-7023639.xbmh.patch	Fri Jul 13 10:45:43 2012 +0200
@@ -1,9 +1,9 @@
 More flexible bound method handles.
 Contributed-by: Michael Haupt
 
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/BoundMethodHandle.java
---- a/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/BoundMethodHandle.java
+--- a/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
@@ -11,7 +11,7 @@
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
-@@ -25,308 +25,380 @@
+@@ -25,308 +25,400 @@
  
  package java.lang.invoke;
  
@@ -220,30 +220,6 @@
 -            case 'D':  getter = NF_doubleDataValue0; break;
 -            default:
 -                throw new InternalError("unknown type: " + basicType);
--            }
--            return new Name(getter, mhName);
--        } else {
--            switch (basicType) {
--            case 'L':
--                if (i == 1)  return new Name(NF_dataValue1, mhName);
--                if (i == 2)  return new Name(NF_dataValue2, mhName);
--                if (i == 3)  return new Name(NF_dataValue3, mhName);
--                getter = NF_dataValue;
--                break;
--            case 'I':
--                if (i == 1)  return new Name(NF_intDataValue1, mhName);
--                getter = NF_intDataValue;
--                break;
--            case 'J':
--                if (i == 1)  return new Name(NF_longDataValue1, mhName);
--                getter = NF_longDataValue;
--                break;
--            case 'F':  getter =  NF_floatDataValue; break;
--            case 'D':  getter = NF_doubleDataValue; break;
--            default:
--                throw new InternalError("unknown type: " + basicType);
--            }
--            return new Name(getter, mhName, i);
 +    /**
 +     * All subclasses must provide such a value describing their type signature.
 +     */
@@ -271,6 +247,49 @@
 +        return getterName;
 +    }
 +
++    @Override
++    final Object internalValues() {
++        Object[] boundValues = new Object[types().length()];
++        for (int i = 0; i < boundValues.length; ++i) {
++            try {
++                switch (types().charAt(i)) {
++                case 'L': boundValues[i] = argL(i); break;
++                case 'I': boundValues[i] = argI(i); break;
++                case 'F': boundValues[i] = argF(i); break;
++                case 'D': boundValues[i] = argD(i); break;
++                case 'J': boundValues[i] = argJ(i); break;
++                default : throw new InternalError("unexpected type: " + types().charAt(i));
++                }
++            } catch (Throwable t) {
++                throw new InternalError(t);
+             }
+-            return new Name(getter, mhName);
+-        } else {
+-            switch (basicType) {
+-            case 'L':
+-                if (i == 1)  return new Name(NF_dataValue1, mhName);
+-                if (i == 2)  return new Name(NF_dataValue2, mhName);
+-                if (i == 3)  return new Name(NF_dataValue3, mhName);
+-                getter = NF_dataValue;
+-                break;
+-            case 'I':
+-                if (i == 1)  return new Name(NF_intDataValue1, mhName);
+-                getter = NF_intDataValue;
+-                break;
+-            case 'J':
+-                if (i == 1)  return new Name(NF_longDataValue1, mhName);
+-                getter = NF_longDataValue;
+-                break;
+-            case 'F':  getter =  NF_floatDataValue; break;
+-            case 'D':  getter = NF_doubleDataValue; break;
+-            default:
+-                throw new InternalError("unknown type: " + basicType);
+-            }
+-            return new Name(getter, mhName, i);
++        }
++        return Arrays.asList(boundValues);
++    }
++
 +    public final Object argL(int i) throws Throwable { return          myData().getters[i].invokeBasic(this); }
 +    public final int    argI(int i) throws Throwable { return (int)    myData().getters[i].invokeBasic(this); }
 +    public final float  argF(int i) throws Throwable { return (float)  myData().getters[i].invokeBasic(this); }
@@ -632,7 +651,7 @@
      /** Create a LF which simply reinvokes a target of the given basic type.
       *  The target MH must have the reinvocation target bound to value #0.
       */
-@@ -342,11 +414,410 @@
+@@ -342,11 +434,410 @@
          final int NEXT_MH     = nameCursor++;
          final int REINVOKE    = nameCursor++;
          Name[] names = arguments(nameCursor - ARG_LIMIT, mtype.invokerType());
@@ -1044,9 +1063,9 @@
 +    }
 +
  }
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/CountingMethodHandle.java
---- a/src/share/classes/java/lang/invoke/CountingMethodHandle.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/CountingMethodHandle.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/CountingMethodHandle.java
+--- a/src/share/classes/java/lang/invoke/CountingMethodHandle.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/CountingMethodHandle.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -36,11 +36,13 @@
   *
   * @author never
@@ -1120,63 +1139,149 @@
 +        throw new IllegalStateException("NYI");
 +    }
  }
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/DataBinding.java
---- a/src/share/classes/java/lang/invoke/DataBinding.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/DataBinding.java	Thu Jul 12 00:47:38 2012 +0200
-@@ -73,15 +73,12 @@
- 
-         @Override
-         public Object get(int i) {
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/DataBinding.java
+--- a/src/share/classes/java/lang/invoke/DataBinding.java	Thu Jul 12 19:03:13 2012 +0200
++++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+@@ -1,186 +0,0 @@
+-/*
+- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation.  Oracle designates this
+- * particular file as subject to the "Classpath" exception as provided
+- * by Oracle in the LICENSE file that accompanied this code.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- */
+-
+-package java.lang.invoke;
+-
+-import java.util.List;
+-import java.util.AbstractList;
+-
+-/**
+- * Interface for binding data values into a method handle or other object.
+- * @author John Rose, JSR 292 EG
+- */
+-interface DataBinding {
+-    // /** Get basic types of the data fields, as a string of the form {@code "[LIJFD]*"}. */
+-    // public String dataValueTypes();
+-    // /** Get the number of data fields, equivalent to {@code getSignature().length()}. */
+-    // public int dataValueCount();
+-    // /** Get the basic type of the N-th value, one of the characters in {@code "LIJFD"}. */
+-    // public char  dataValueType(int i);
+-
+-    // /** Get the N-th value, boxed as needed. */
+-    // public Object dataValue(int i);
+-    // /** Get the N-th value, which must be a reference. */
+-    // public Object objectDataValue(int i);
+-    // /** Get the N-th value, which must be an int. */
+-    // public int intDataValue(int i);
+-    // /** Get the N-th value, which must be a long. */
+-    // public long longDataValue(int i);
+-    // /** Get the N-th value, which must be a float. */
+-    // public float floatDataValue(int i);
+-    // /** Get the N-th value, which must be a double. */
+-    // public double doubleDataValue(int i);
+-
+-//    /** Create an object with the same values, plus the added reference. */
+-//    public DataBinding addObjectDataValue(Object valule);
+-//    /** Create an object with the same values, plus the added int. */
+-//    public DataBinding addIntDataValue(int value);
+-//    /** Create an object with the same values, plus the added long. */
+-//    public DataBinding addLongDataValue(long value);
+-//    /** Create an object with the same values, plus the added float. */
+-//    public DataBinding addFloatDataValue(float value);
+-//    /** Create an object with the same values, plus the added double. */
+-//    public DataBinding addDoubleDataValue(double value);
+-
+-    class ListView extends AbstractList<Object> {
+-        final BoundMethodHandle data;
+-
+-        ListView(BoundMethodHandle data) {
+-            this.data = data;
+-        }
+-
+-        @Override
+-        public Object get(int i) {
 -            if (i == 0)
 -                return data.dataValue0();
 -            else
 -                return ((BoundMethodHandle.Multiple) data).dataValue(i);
-+            return Methods.dataValue(data, i);
-         }
- 
-         @Override
-         public int size() {
+-        }
+-
+-        @Override
+-        public int size() {
 -            return data.dataValueCount();
-+            return data.tcount();
-         }
- 
-         @Override
-@@ -94,7 +91,7 @@
-         private Methods() { throw new InternalError(); }
- 
-         public static boolean checkDataValueType(BoundMethodHandle data, int i, char type) {
+-        }
+-
+-        @Override
+-        public Object[] toArray() {
+-            return Methods.toArray(data);
+-        }
+-    }
+-
+-    public class Methods {
+-        private Methods() { throw new InternalError(); }
+-
+-        public static boolean checkDataValueType(BoundMethodHandle data, int i, char type) {
 -            char actualType = data.dataValueType(i);
-+            char actualType = data.type(i);
-             if (actualType != type) {
-                 throw new IllegalArgumentException("actual type is "+actualType);
-             }
-@@ -102,15 +99,15 @@
-         }
- 
-         public static int dataValueCount(BoundMethodHandle data) {
+-            if (actualType != type) {
+-                throw new IllegalArgumentException("actual type is "+actualType);
+-            }
+-            return true;  // pass boolean back for use with assert()
+-        }
+-
+-        public static int dataValueCount(BoundMethodHandle data) {
 -            return data.dataValueTypes().length();
-+            return data.types().length();
-         }
-         public static char dataValueType(BoundMethodHandle data, int i) {
+-        }
+-        public static char dataValueType(BoundMethodHandle data, int i) {
 -            return data.dataValueTypes().charAt(i);
-+            return data.types().charAt(i);
-         }
-         public static String dataValueTypes(BoundMethodHandle data) {
+-        }
+-        public static String dataValueTypes(BoundMethodHandle data) {
 -            char[] types = new char[data.dataValueCount()];
-+            char[] types = new char[data.tcount()];
-             for (int i = 0; i < types.length; i++)
+-            for (int i = 0; i < types.length; i++)
 -                types[i] = data.dataValueType(i);
-+                types[i] = data.type(i);
-             return new String(types);
-         }
- 
-@@ -135,44 +132,40 @@
-             //checkDataValueType(data, i, 'D');
-             return (Double) data.dataValue(i);
-         }
-+        */
- 
-         public static Object dataValue(BoundMethodHandle data, int i) {
+-            return new String(types);
+-        }
+-
+-        /*
+-        public static Object objectDataValue(BoundMethodHandle data, int i) {
+-            //checkDataValueType(data, i, 'L');
+-            return data.dataValue(i);
+-        }
+-        public static int intDataValue(BoundMethodHandle data, int i) {
+-            //checkDataValueType(data, i, 'I');
+-            return (Integer) data.dataValue(i);
+-        }
+-        public static long longDataValue(BoundMethodHandle data, int i) {
+-            //checkDataValueType(data, i, 'J');
+-            return (Long) data.dataValue(i);
+-        }
+-        public static float floatDataValue(BoundMethodHandle data, int i) {
+-            //checkDataValueType(data, i, 'F');
+-            return (Float) data.dataValue(i);
+-        }
+-        public static double doubleDataValue(BoundMethodHandle data, int i) {
+-            //checkDataValueType(data, i, 'D');
+-            return (Double) data.dataValue(i);
+-        }
+-
+-        public static Object dataValue(BoundMethodHandle data, int i) {
 -            switch (data.dataValueType(i)) {
 -                case 'I':  return data.intDataValue(i);
 -                case 'J':  return data.longDataValue(i);
@@ -1184,43 +1289,25 @@
 -                case 'D':  return data.doubleDataValue(i);
 -                case 'L':  return data.objectDataValue(i);
 -                default:   throw new InternalError();
-+            try {
-+                switch (data.type(i)) {
-+                    case 'I':  return data.argI(i);
-+                    case 'J':  return data.argJ(i);
-+                    case 'F':  return data.argF(i);
-+                    case 'D':  return data.argD(i);
-+                    case 'L':  return data.argL(i);
-+                    default:   throw new InternalError("unknown type: " + data.type(i));
-+                }
-+            } catch (Throwable t) {
-+                throw new InternalError(t);
-             }
-         }
+-            }
+-        }
 -        */
- 
-         public static Object[] toArray(BoundMethodHandle data) {
+-
+-        public static Object[] toArray(BoundMethodHandle data) {
 -            String types = data.dataValueTypes();
-+            String types = data.types();
-             int size = types.length();
-             Object[] values = new Object[size];
-             for (int i = 0; i < size; i++) {
-                 Object value;
+-            int size = types.length();
+-            Object[] values = new Object[size];
+-            for (int i = 0; i < size; i++) {
+-                Object value;
 -                if (data instanceof BoundMethodHandle) {
-+                try {
-                     switch (types.charAt(i)) {
+-                    switch (types.charAt(i)) {
 -                    case 'I':  value = data.intDataValue0();     break;
 -                    case 'J':  value = data.longDataValue0();    break;
 -                    case 'F':  value = data.floatDataValue0();   break;
 -                    case 'D':  value = data.doubleDataValue0();  break;
 -                    case 'L':  value = data.dataValue0();        break;
-+                    case 'I':  value = data.argI(i);     break;
-+                    case 'J':  value = data.argJ(i);    break;
-+                    case 'F':  value = data.argF(i);   break;
-+                    case 'D':  value = data.argD(i);  break;
-+                    case 'L':  value = data.argL(i);        break;
-                     default:   throw new InternalError();
-                     }
+-                    default:   throw new InternalError();
+-                    }
 -                } else {
 -                    BoundMethodHandle.Multiple m = (BoundMethodHandle.Multiple) data;
 -                    switch (types.charAt(i)) {
@@ -1231,14 +1318,20 @@
 -                    case 'L':  value = m.dataValue(i);        break;
 -                    default:   throw new InternalError();
 -                    }
-+                } catch (Throwable t) {
-+                    throw new InternalError(t);
-                 }
-                 values[i] = value;
-             }
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/DirectMethodHandle.java
---- a/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Thu Jul 12 00:47:38 2012 +0200
+-                }
+-                values[i] = value;
+-            }
+-            return values;
+-        }
+-
+-        public static List<Object> toList(BoundMethodHandle data) {
+-            return new ListView(data);
+-        }
+-    }
+-}
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/DirectMethodHandle.java
+--- a/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -66,24 +66,22 @@
      }
  
@@ -1283,9 +1376,9 @@
      private static final NamedFunction NF_internalMemberName;
      private static final NamedFunction NF_ensureClassInitialized;
      private static final MethodHandle MH_shouldBeInitialized;
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
---- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
+--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -27,6 +27,7 @@
  
  import sun.invoke.util.VerifyAccess;
@@ -1382,11 +1475,10 @@
          Name receiver = (Name) invokeBasicName.arguments[0];
  
          Label L_fallback = new Label();
-@@ -734,68 +740,68 @@
-         mv.visitLabel(L_done);
+@@ -735,69 +741,6 @@
      }
  
--    /**
+     /**
 -     * Check if MemberName is a call to retrieve a bound argument.
 -     *
 -     * @param member
@@ -1448,72 +1540,12 @@
 -            emitUnboxing(Long.class);
 -        }
 -    }
-+//    /**
-+//     * Check if MemberName is a call to retrieve a bound argument.
-+//     *
-+//     * @param member
-+//     * @return
-+//     */
-+//    private boolean isBoundArgumentLoad(MemberName member) {
-+//        if (member == null) {
-+//            return false;
-+//        }
-+//        Class<?> klass = member.getDeclaringClass();
-+//        String   name  = member.getName();
-+//        if (klass != BoundMethodHandle.class && klass != BoundMethodHandle.Multiple.class) {
-+//            return false;
-+//        }
-+//        if (!name.startsWith("dataValue") &&
-+//            !name.startsWith("intDataValue") &&
-+//            !name.startsWith("longDataValue")) {
-+//            return false;
-+//        }
-+//        if (name.equals("dataValue") || name.equals("intDataValue") || name.equals("longDataValue")) {
-+//            return false;
-+//        }
-+//        int arity = member.getInvocationType().parameterCount();
-+//        if (arity == 2)
-+//            return false;  // do not handle Multiple.dataValue(int i), yet
-+//        assert(arity == 1);
-+//        return true;
-+//    }
-+//
-+//    private void emitBoundArgumentLoad(MemberName member, Name argLoadName) {
-+//        assert(argLoadName.arguments.length == 1 &&
-+//               argLoadName.arguments[0] == this.lambdaForm.names[0]) : argLoadName.exprString();
-+//        String name = member.getName();
-+//        int index = Integer.valueOf(name.substring(name.length() - 1));
-+//
-+//        if (index == 0) {
-+//            // aload_0
-+//            // checkcast  // class java/lang/invoke/BoundMethodHandle
-+//            // getfield   // Field argument:Ljava/lang/Object;
-+//            emitAloadInsn(0);
-+//            mv.visitTypeInsn(Opcodes.CHECKCAST, BMH);
-+//            mv.visitFieldInsn(Opcodes.GETFIELD, BMH, "argument", "Ljava/lang/Object;");
-+//        } else {
-+//            // aload_0
-+//            // checkcast  // class java/lang/invoke/BoundMethodHandle$Multiple
-+//            // getfield   // Field next:Ljava/lang/invoke/BoundMethodHandle$Multiple;
-+//            // getfield   // Field argument:Ljava/lang/Object;
-+//            emitAloadInsn(0);
-+//            mv.visitTypeInsn(Opcodes.CHECKCAST, BMHM);
-+//            for (int i = 0; i < index; i++) {
-+//                mv.visitFieldInsn(Opcodes.GETFIELD, BMHM, "next", "Ljava/lang/invoke/BoundMethodHandle$Multiple;");
-+//            }
-+//            mv.visitFieldInsn(Opcodes.GETFIELD, BMH, "argument", "Ljava/lang/Object;");
-+//        }
-+//
-+//        if (name.startsWith("intDataValue")) {
-+//            emitUnboxing(Integer.class);
-+//        } else if (name.startsWith("longDataValue")) {
-+//            emitUnboxing(Long.class);
-+//        }
-+//    }
- 
-     /**
+-
+-    /**
       *
-@@ -805,16 +811,17 @@
+      * @param name
+      * @param paramIndex
+@@ -805,16 +748,17 @@
      private void emitPushArgument(Name name, int paramIndex) {
          Object arg = name.arguments[paramIndex];
          char ptype = name.function.parameterType(paramIndex);
@@ -1532,7 +1564,7 @@
              }
          }
      }
-@@ -990,9 +997,6 @@
+@@ -990,9 +934,6 @@
      private byte[] generateLambdaFormInterpreterEntryPointBytes() {
          classFilePrologue();
  
@@ -1542,7 +1574,7 @@
          // Suppress this method in backtraces displayed to the user.
          mv.visitAnnotation("Ljava/lang/invoke/LambdaForm$Hidden;", true);
  
-@@ -1028,9 +1032,10 @@
+@@ -1028,9 +969,10 @@
          emitReturnInsn(rtype);
  
          classFileEpilogue();
@@ -1554,7 +1586,7 @@
          return classFile;
      }
  
-@@ -1048,13 +1053,12 @@
+@@ -1048,13 +990,12 @@
          return g.loadMethod(g.generateNamedFunctionInvokerImpl(typeForm));
      }
  
@@ -1570,7 +1602,7 @@
          // Suppress this method in backtraces displayed to the user.
          mv.visitAnnotation("Ljava/lang/invoke/LambdaForm$Hidden;", true);
  
-@@ -1099,9 +1103,27 @@
+@@ -1099,9 +1040,27 @@
          emitReturnInsn(Object.class);  // NOTE: NamedFunction invokers always return a reference value.
  
          classFileEpilogue();
@@ -1599,9 +1631,9 @@
 +        }
 +    }
  }
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/Invokers.java
---- a/src/share/classes/java/lang/invoke/Invokers.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/Invokers.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/Invokers.java
+--- a/src/share/classes/java/lang/invoke/Invokers.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/Invokers.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -75,7 +75,7 @@
          if (invoker != null)  return invoker;
          MethodType mtype = targetType;
@@ -1629,9 +1661,9 @@
              // else if isLinker, then MTYPE is passed in from the caller (e.g., the JVM)
          }
  
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/LambdaForm.java
---- a/src/share/classes/java/lang/invoke/LambdaForm.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/LambdaForm.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/LambdaForm.java
+--- a/src/share/classes/java/lang/invoke/LambdaForm.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/LambdaForm.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -264,7 +264,7 @@
          // Do all names possess an index consistent with their local definition order?
          for (int i = 0; i < arity; i++) {
@@ -1758,9 +1790,9 @@
          // Put the predefined NamedFunction invokers into the table.
          static void initializeInvokers() {
              for (MemberName m : MemberName.getFactory().getMethods(NamedFunction.class, false, null, null, null)) {
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/MemberName.java
---- a/src/share/classes/java/lang/invoke/MemberName.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/MemberName.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/MemberName.java
+--- a/src/share/classes/java/lang/invoke/MemberName.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/MemberName.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -77,6 +77,32 @@
      //@Injected int         vmindex;
      private Object     resolution;  // if null, this guy is resolved
@@ -1794,9 +1826,9 @@
      /** Return the declaring class of this member.
       *  In the case of a bare name and type, the declaring class will be null.
       */
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/MethodHandle.java
---- a/src/share/classes/java/lang/invoke/MethodHandle.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/MethodHandle.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/MethodHandle.java
+--- a/src/share/classes/java/lang/invoke/MethodHandle.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/MethodHandle.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -28,11 +28,9 @@
  
  import java.util.*;
@@ -1810,7 +1842,16 @@
  
  /**
   * A method handle is a typed, directly executable reference to an underlying method,
-@@ -1294,6 +1292,25 @@
+@@ -1267,8 +1265,6 @@
+ 
+     /*non-public*/
+     Object internalValues() {
+-        if (this instanceof BoundMethodHandle)
+-            return DataBinding.Methods.toList((BoundMethodHandle) this);
+         return "";
+     }
+ 
+@@ -1294,6 +1290,25 @@
      }
  
      /*non-public*/
@@ -1836,7 +1877,7 @@
      MethodHandle dropArguments(MethodType srcType, int pos, int drops) {
          // Override this if it can be improved.
          return rebind().dropArguments(srcType, pos, drops);
-@@ -1306,11 +1323,11 @@
+@@ -1306,11 +1321,11 @@
      }
  
      /*non-public*/
@@ -1850,9 +1891,9 @@
 +        return new BoundMethodHandle.BMH_L(type2, form2, this);
      }
  }
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/MethodHandleImpl.java
---- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/MethodHandleImpl.java
+--- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -186,43 +186,57 @@
      }
  
@@ -2037,9 +2078,9 @@
      }
  
      private static class GuardWithCatch {
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/MethodHandleNatives.java
---- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/MethodHandleNatives.java
+--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -325,19 +325,13 @@
          if (defc != MethodHandle.class || refKind != REF_invokeVirtual)
              throw new LinkageError("no such method "+defc.getName()+"."+name+type);
@@ -2066,9 +2107,9 @@
      }
  
      /**
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/MethodType.java
---- a/src/share/classes/java/lang/invoke/MethodType.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/MethodType.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/MethodType.java
+--- a/src/share/classes/java/lang/invoke/MethodType.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/MethodType.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -108,6 +108,8 @@
      /*trusted*/ Class<?> rtype() { return rtype; }
      /*trusted*/ Class<?>[] ptypes() { return ptypes; }
@@ -2078,9 +2119,9 @@
      private static void checkRtype(Class<?> rtype) {
          rtype.equals(rtype);  // null check
      }
-diff -r 25fcfb3a5f65 src/share/classes/java/lang/invoke/SimpleMethodHandle.java
---- a/src/share/classes/java/lang/invoke/SimpleMethodHandle.java	Wed Jul 11 14:18:03 2012 +0200
-+++ b/src/share/classes/java/lang/invoke/SimpleMethodHandle.java	Thu Jul 12 00:47:38 2012 +0200
+diff -r 1478423d0bfc src/share/classes/java/lang/invoke/SimpleMethodHandle.java
+--- a/src/share/classes/java/lang/invoke/SimpleMethodHandle.java	Thu Jul 12 19:03:13 2012 +0200
++++ b/src/share/classes/java/lang/invoke/SimpleMethodHandle.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -55,4 +55,10 @@
          LambdaForm form2 = internalForm().permuteArguments(1, reorder, basicTypes(newType.parameterList()));
          return new SimpleMethodHandle(newType, form2);
@@ -2092,9 +2133,9 @@
 +    }
 +
  }
-diff -r 25fcfb3a5f65 test/java/lang/invoke/MaxTest.java
+diff -r 1478423d0bfc test/java/lang/invoke/MaxTest.java
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/test/java/lang/invoke/MaxTest.java	Thu Jul 12 00:47:38 2012 +0200
++++ b/test/java/lang/invoke/MaxTest.java	Fri Jul 13 10:44:45 2012 +0200
 @@ -0,0 +1,143 @@
 +/*
 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.