jdk/src/share/classes/sun/dyn/SpreadGeneric.java
author jrose
Fri, 30 Apr 2010 23:48:23 -0700
changeset 5722 4ada807383c8
parent 4537 7c3c7f8d5195
child 5725 16c1792b2ee6
permissions -rw-r--r--
6939134: JSR 292 adjustments to method handle invocation Summary: split MethodHandle.invoke into invokeExact and invokeGeneric; also clean up JVM-to-Java interfaces Reviewed-by: twisti
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     1
/*
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     2
 * Copyright 2008-2009 Sun Microsystems, Inc.  All Rights Reserved.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     4
 *
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    10
 *
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    15
 * accompanied this code).
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    16
 *
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    20
 *
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    23
 * have any questions.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    24
 */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    25
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    26
package sun.dyn;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    27
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    28
import java.dyn.JavaMethodHandle;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    29
import java.dyn.MethodHandle;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    30
import java.dyn.MethodHandles;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    31
import java.dyn.MethodType;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    32
import java.dyn.NoAccessException;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    33
import java.lang.reflect.Constructor;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    34
import java.lang.reflect.InvocationTargetException;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    35
import java.util.ArrayList;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    36
import sun.dyn.util.ValueConversions;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    37
import static sun.dyn.MemberName.newIllegalArgumentException;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    38
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    39
/**
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    40
 * Generic spread adapter.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    41
 * Expands a final argument into multiple (zero or more) arguments, keeping the others the same.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    42
 * @author jrose
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    43
 */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    44
class SpreadGeneric {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    45
    // type for the outgoing call
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    46
    private final MethodType targetType;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    47
    // number of arguments to spread
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    48
    private final int spreadCount;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    49
    // prototype adapter (clone and customize for each new target!)
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    50
    private final Adapter adapter;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    51
    // entry point for adapter (Adapter mh, a...) => ...
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    52
    private final MethodHandle entryPoint;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    53
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    54
    /** Compute and cache information common to all spreading adapters
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    55
     *  that accept calls of the given (generic) type.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    56
     */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    57
    private SpreadGeneric(MethodType targetType, int spreadCount) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    58
        assert(targetType == targetType.generic());
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    59
        this.targetType = targetType;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    60
        this.spreadCount = spreadCount;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    61
        // the target invoker will generally need casts on reference arguments
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    62
        MethodHandle[] ep = { null };
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    63
        Adapter ad = findAdapter(this, ep);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    64
        if (ad != null) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    65
            this.adapter = ad;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    66
            this.entryPoint = ep[0];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    67
            return;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    68
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    69
        this.adapter = buildAdapterFromBytecodes(targetType, spreadCount, ep);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    70
        this.entryPoint = ep[0];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    71
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    72
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    73
    /** From targetType remove the last spreadCount arguments, and instead
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    74
     *  append a simple Object argument.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    75
     */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    76
    static MethodType preSpreadType(MethodType targetType, int spreadCount) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    77
        @SuppressWarnings("unchecked")
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    78
        ArrayList<Class<?>> params = new ArrayList(targetType.parameterList());
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    79
        int outargs = params.size();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    80
        params.subList(outargs - spreadCount, outargs).clear();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    81
        params.add(Object.class);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    82
        return MethodType.methodType(targetType.returnType(), params);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    83
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    84
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    85
    MethodHandle makeInstance(MethodHandle target) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    86
        MethodType type = target.type();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    87
        if (type != targetType) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    88
            throw new UnsupportedOperationException("NYI type="+type);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    89
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    90
        return adapter.makeInstance(this, target);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    91
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    92
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    93
    /** Build an adapter of the given generic type, which invokes typedTarget
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    94
     *  on the incoming arguments, after unboxing as necessary.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    95
     *  The return value is boxed if necessary.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    96
     * @param genericType  the required type of the result
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    97
     * @param typedTarget the target
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    98
     * @return an adapter method handle
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
    99
     */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   100
    public static MethodHandle make(MethodHandle target, int spreadCount) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   101
        MethodType type = target.type();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   102
        MethodType gtype = type.generic();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   103
        if (type == gtype) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   104
            return SpreadGeneric.of(type, spreadCount).makeInstance(target);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   105
        } else {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   106
            MethodHandle gtarget = FromGeneric.make(target);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   107
            assert(gtarget.type() == gtype);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   108
            MethodHandle gspread = SpreadGeneric.of(gtype, spreadCount).makeInstance(gtarget);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   109
            return ToGeneric.make(preSpreadType(type, spreadCount), gspread);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   110
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   111
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   112
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   113
    /** Return the adapter information for this type's erasure. */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   114
    static SpreadGeneric of(MethodType targetType, int spreadCount) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   115
        if (targetType != targetType.generic())
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   116
            throw new UnsupportedOperationException("NYI type="+targetType);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   117
        MethodTypeImpl form = MethodTypeImpl.of(targetType);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   118
        int outcount = form.parameterCount();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   119
        assert(spreadCount <= outcount);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   120
        SpreadGeneric[] spreadGens = form.spreadGeneric;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   121
        if (spreadGens == null)
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   122
            form.spreadGeneric = spreadGens = new SpreadGeneric[outcount+1];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   123
        SpreadGeneric spreadGen = spreadGens[spreadCount];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   124
        if (spreadGen == null)
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   125
            spreadGens[spreadCount] = spreadGen = new SpreadGeneric(form.erasedType(), spreadCount);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   126
        return spreadGen;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   127
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   128
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   129
    public String toString() {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   130
        return getClass().getSimpleName()+targetType+"["+spreadCount+"]";
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   131
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   132
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   133
    // This mini-api is called from an Adapter to manage the spread.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   134
    /** A check/coercion that happens once before any selections. */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   135
    protected Object check(Object av, int n) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   136
        MethodHandleImpl.checkSpreadArgument(av, n);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   137
        return av;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   138
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   139
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   140
    /** The selection operator for spreading; note that it takes Object not Object[]. */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   141
    protected Object select(Object av, int n) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   142
        return ((Object[])av)[n];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   143
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   144
    /*
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   145
    protected int select_I(Object av, int n) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   146
        // maybe return ((int[])select)[n]
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   147
        throw new UnsupportedOperationException("subclass resp.");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   148
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   149
    protected int select_J(Object av, int n) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   150
        // maybe return ((long[])select)[n]
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   151
        throw new UnsupportedOperationException("subclass resp.");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   152
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   153
    // */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   154
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   155
    /* Create an adapter that handles spreading calls for the given type. */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   156
    static Adapter findAdapter(SpreadGeneric outer, MethodHandle[] ep) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   157
        MethodType targetType = outer.targetType;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   158
        int spreadCount = outer.spreadCount;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   159
        int outargs = targetType.parameterCount();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   160
        int inargs = outargs - spreadCount;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   161
        if (inargs < 0)  return null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   162
        MethodType entryType = MethodType.genericMethodType(inargs + 1); // 1 for av
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   163
        String cname1 = "S" + outargs;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   164
        String[] cnames = { cname1 };
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   165
        String iname = "invoke_S"+spreadCount;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   166
        // e.g., D5I2, D5, L5I2, L5; invoke_D5
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   167
        for (String cname : cnames) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   168
            Class<? extends Adapter> acls = Adapter.findSubClass(cname);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   169
            if (acls == null)  continue;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   170
            // see if it has the required invoke method
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   171
            MethodHandle entryPoint = null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   172
            try {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   173
                entryPoint = MethodHandleImpl.IMPL_LOOKUP.findSpecial(acls, iname, entryType, acls);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   174
            } catch (NoAccessException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   175
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   176
            if (entryPoint == null)  continue;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   177
            Constructor<? extends Adapter> ctor = null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   178
            try {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   179
                ctor = acls.getDeclaredConstructor(SpreadGeneric.class);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   180
            } catch (NoSuchMethodException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   181
            } catch (SecurityException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   182
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   183
            if (ctor == null)  continue;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   184
            try {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   185
                // Produce an instance configured as a prototype.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   186
                Adapter ad = ctor.newInstance(outer);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   187
                ep[0] = entryPoint;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   188
                return ad;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   189
            } catch (IllegalArgumentException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   190
            } catch (InvocationTargetException wex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   191
                Throwable ex = wex.getTargetException();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   192
                if (ex instanceof Error)  throw (Error)ex;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   193
                if (ex instanceof RuntimeException)  throw (RuntimeException)ex;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   194
            } catch (InstantiationException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   195
            } catch (IllegalAccessException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   196
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   197
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   198
        return null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   199
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   200
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   201
    static Adapter buildAdapterFromBytecodes(MethodType targetType,
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   202
            int spreadCount, MethodHandle[] ep) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   203
        throw new UnsupportedOperationException("NYI");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   204
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   205
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   206
    /**
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   207
     * This adapter takes some untyped arguments, and returns an untyped result.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   208
     * Internally, it applies the invoker to the target, which causes the
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   209
     * objects to be unboxed; the result is a raw type in L/I/J/F/D.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   210
     * This result is passed to convert, which is responsible for
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   211
     * converting the raw result into a boxed object.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   212
     * The invoker is kept separate from the target because it can be
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   213
     * generated once per type erasure family, and reused across adapters.
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   214
     */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   215
    static abstract class Adapter extends JavaMethodHandle {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   216
        /*
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   217
         * class X<<R,int M,int N>> extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   218
         *   (Object**N)=>R target;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   219
         *   static int S = N-M;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   220
         *   Object invoke(Object**M a, Object v) = target(a..., v[0]...v[S-1]);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   221
         * }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   222
         */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   223
        protected final SpreadGeneric outer;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   224
        protected final MethodHandle target;   // (any**N) => R
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   225
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   226
        @Override
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   227
        public String toString() {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   228
            return target.toString();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   229
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   230
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   231
        static final MethodHandle NO_ENTRY = ValueConversions.identity();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   232
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   233
        protected boolean isPrototype() { return target == null; }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   234
        protected Adapter(SpreadGeneric outer) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   235
            super(NO_ENTRY);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   236
            this.outer = outer;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   237
            this.target = null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   238
            assert(isPrototype());
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   239
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   240
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   241
        protected Adapter(SpreadGeneric outer, MethodHandle target) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   242
            super(outer.entryPoint);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   243
            this.outer = outer;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   244
            this.target = target;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   245
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   246
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   247
        /** Make a copy of self, with new fields. */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   248
        protected abstract Adapter makeInstance(SpreadGeneric outer, MethodHandle target);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   249
        // { return new ThisType(outer, target); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   250
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   251
        protected Object check(Object av, int n) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   252
            return outer.check(av, n);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   253
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   254
        protected Object select(Object av, int n) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   255
            return outer.select(av, n);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   256
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   257
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   258
        static private final String CLASS_PREFIX; // "sun.dyn.SpreadGeneric$"
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   259
        static {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   260
            String aname = Adapter.class.getName();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   261
            String sname = Adapter.class.getSimpleName();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   262
            if (!aname.endsWith(sname))  throw new InternalError();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   263
            CLASS_PREFIX = aname.substring(0, aname.length() - sname.length());
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   264
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   265
        /** Find a sibing class of Adapter. */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   266
        static Class<? extends Adapter> findSubClass(String name) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   267
            String cname = Adapter.CLASS_PREFIX + name;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   268
            try {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   269
                return Class.forName(cname).asSubclass(Adapter.class);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   270
            } catch (ClassNotFoundException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   271
                return null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   272
            } catch (ClassCastException ex) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   273
                return null;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   274
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   275
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   276
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   277
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   278
    /* generated classes follow this pattern:
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   279
    static class xS2 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   280
        protected xS2(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   281
        protected xS2(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   282
        protected xS2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new xS2(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   283
        protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av,0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   284
             return target.<Object>invokeExact(a0, a1)); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   285
        protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av,1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   286
             return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   287
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   288
        protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av,1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   289
             return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   290
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   291
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   292
    // */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   293
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   294
/*
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   295
: SHELL; n=SpreadGeneric; cp -p $n.java $n.java-; sed < $n.java- > $n.java+ -e '/{{*{{/,/}}*}}/w /tmp/genclasses.java' -e '/}}*}}/q'; (cd /tmp; javac -d . genclasses.java; java -cp . genclasses) >> $n.java+; echo '}' >> $n.java+; mv $n.java+ $n.java; mv $n.java- $n.java~
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   296
//{{{
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   297
import java.util.*;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   298
class genclasses {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   299
    static String[][] TEMPLATES = { {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   300
        "@for@ N=0..10",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   301
        "    //@each-cat@",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   302
        "    static class @cat@ extends Adapter {",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   303
        "        protected @cat@(SpreadGeneric outer) { super(outer); }  // to build prototype",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   304
        "        protected @cat@(SpreadGeneric outer, MethodHandle t) { super(outer, t); }",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   305
        "        protected @cat@ makeInstance(SpreadGeneric outer, MethodHandle t) { return new @cat@(outer, t); }",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   306
        "        protected Object invoke_S0(@Tvav,@Object av) throws Throwable { av = super.check(av, 0);",
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   307
        "            return target.<Object>invokeExact(@av@); }",
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   308
        "        //@each-S@",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   309
        "        protected Object invoke_S@S@(@Tvav,@Object av) throws Throwable { av = super.check(av, @S@);",
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   310
        "            return target.<Object>invokeExact(@av,@@sv@); }",
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   311
        "        //@end-S@",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   312
        "    }",
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   313
    } };
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   314
    static final String NEWLINE_INDENT = "\n                ";
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   315
    enum VAR {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   316
        cat, N, S, av, av_, Tvav_, sv;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   317
        public final String pattern = "@"+toString().replace('_','.')+"@";
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   318
        public String binding = toString();
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   319
        static void makeBindings(boolean topLevel, int outargs, int spread) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   320
            int inargs = outargs - spread;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   321
            VAR.cat.binding = "S"+outargs;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   322
            VAR.N.binding = String.valueOf(outargs); // outgoing arg count
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   323
            VAR.S.binding = String.valueOf(spread);  // spread count
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   324
            String[] av = new String[inargs];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   325
            String[] Tvav = new String[inargs];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   326
            for (int i = 0; i < inargs; i++) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   327
                av[i] = arg(i);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   328
                Tvav[i] = param("Object", av[i]);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   329
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   330
            VAR.av.binding = comma(av);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   331
            VAR.av_.binding = comma(av, ", ");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   332
            VAR.Tvav_.binding = comma(Tvav, ", ");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   333
            String[] sv = new String[spread];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   334
            for (int i = 0; i < spread; i++) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   335
                String spc = "";
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   336
                if (i % 4 == 0) spc = NEWLINE_INDENT;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   337
                sv[i] = spc+"super.select(av,"+i+")";
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   338
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   339
            VAR.sv.binding = comma(sv);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   340
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   341
        static String arg(int i) { return "a"+i; }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   342
        static String param(String t, String a) { return t+" "+a; }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   343
        static String comma(String[] v) { return comma(v, ""); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   344
        static String comma(String[] v, String sep) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   345
            if (v.length == 0)  return "";
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   346
            String res = v[0];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   347
            for (int i = 1; i < v.length; i++)  res += ", "+v[i];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   348
            return res + sep;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   349
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   350
        static String transform(String string) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   351
            for (VAR var : values())
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   352
                string = string.replaceAll(var.pattern, var.binding);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   353
            return string;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   354
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   355
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   356
    static String[] stringsIn(String[] strings, int beg, int end) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   357
        return Arrays.copyOfRange(strings, beg, Math.min(end, strings.length));
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   358
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   359
    static String[] stringsBefore(String[] strings, int pos) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   360
        return stringsIn(strings, 0, pos);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   361
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   362
    static String[] stringsAfter(String[] strings, int pos) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   363
        return stringsIn(strings, pos, strings.length);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   364
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   365
    static int indexAfter(String[] strings, int pos, String tag) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   366
        return Math.min(indexBefore(strings, pos, tag) + 1, strings.length);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   367
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   368
    static int indexBefore(String[] strings, int pos, String tag) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   369
        for (int i = pos, end = strings.length; ; i++) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   370
            if (i == end || strings[i].endsWith(tag))  return i;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   371
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   372
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   373
    static int MIN_ARITY, MAX_ARITY;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   374
    public static void main(String... av) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   375
        for (String[] template : TEMPLATES) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   376
            int forLinesLimit = indexBefore(template, 0, "@each-cat@");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   377
            String[] forLines = stringsBefore(template, forLinesLimit);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   378
            template = stringsAfter(template, forLinesLimit);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   379
            for (String forLine : forLines)
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   380
                expandTemplate(forLine, template);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   381
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   382
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   383
    static void expandTemplate(String forLine, String[] template) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   384
        String[] params = forLine.split("[^0-9]+");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   385
        if (params[0].length() == 0)  params = stringsAfter(params, 1);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   386
        System.out.println("//params="+Arrays.asList(params));
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   387
        int pcur = 0;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   388
        MIN_ARITY = Integer.valueOf(params[pcur++]);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   389
        MAX_ARITY = Integer.valueOf(params[pcur++]);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   390
        if (pcur != params.length)  throw new RuntimeException("bad extra param: "+forLine);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   391
        for (int outargs = MIN_ARITY; outargs <= MAX_ARITY; outargs++) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   392
            expandTemplate(template, true, outargs, 0);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   393
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   394
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   395
    static void expandTemplate(String[] template, boolean topLevel, int outargs, int spread) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   396
        VAR.makeBindings(topLevel, outargs, spread);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   397
        for (int i = 0; i < template.length; i++) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   398
            String line = template[i];
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   399
            if (line.endsWith("@each-cat@")) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   400
                // ignore
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   401
            } else if (line.endsWith("@each-S@")) {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   402
                int blockEnd = indexAfter(template, i, "@end-S@");
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   403
                String[] block = stringsIn(template, i+1, blockEnd-1);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   404
                for (int spread1 = spread+1; spread1 <= outargs; spread1++)
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   405
                    expandTemplate(block, false, outargs, spread1);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   406
                VAR.makeBindings(topLevel, outargs, spread);
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   407
                i = blockEnd-1; continue;
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   408
            } else {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   409
                System.out.println(VAR.transform(line));
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   410
            }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   411
        }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   412
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   413
}
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   414
//}}} */
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   415
//params=[0, 10]
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   416
    static class S0 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   417
        protected S0(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   418
        protected S0(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   419
        protected S0 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S0(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   420
        protected Object invoke_S0(Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   421
            return target.<Object>invokeExact(); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   422
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   423
    static class S1 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   424
        protected S1(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   425
        protected S1(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   426
        protected S1 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S1(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   427
        protected Object invoke_S0(Object a0, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   428
            return target.<Object>invokeExact(a0); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   429
        protected Object invoke_S1(Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   430
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   431
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   432
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   433
    static class S2 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   434
        protected S2(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   435
        protected S2(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   436
        protected S2 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S2(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   437
        protected Object invoke_S0(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   438
            return target.<Object>invokeExact(a0, a1); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   439
        protected Object invoke_S1(Object a0, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   440
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   441
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   442
        protected Object invoke_S2(Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   443
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   444
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   445
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   446
    static class S3 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   447
        protected S3(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   448
        protected S3(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   449
        protected S3 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S3(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   450
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   451
            return target.<Object>invokeExact(a0, a1, a2); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   452
        protected Object invoke_S1(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   453
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   454
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   455
        protected Object invoke_S2(Object a0, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   456
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   457
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   458
        protected Object invoke_S3(Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   459
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   460
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   461
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   462
    static class S4 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   463
        protected S4(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   464
        protected S4(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   465
        protected S4 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S4(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   466
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   467
            return target.<Object>invokeExact(a0, a1, a2, a3); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   468
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   469
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   470
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   471
        protected Object invoke_S2(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   472
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   473
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   474
        protected Object invoke_S3(Object a0, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   475
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   476
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   477
        protected Object invoke_S4(Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   478
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   479
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   480
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   481
    static class S5 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   482
        protected S5(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   483
        protected S5(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   484
        protected S5 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S5(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   485
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   486
            return target.<Object>invokeExact(a0, a1, a2, a3, a4); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   487
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   488
            return target.<Object>invokeExact(a0, a1, a2, a3,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   489
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   490
        protected Object invoke_S2(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   491
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   492
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   493
        protected Object invoke_S3(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   494
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   495
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   496
        protected Object invoke_S4(Object a0, Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   497
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   498
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   499
        protected Object invoke_S5(Object av) throws Throwable { av = super.check(av, 5);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   500
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   501
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   502
                super.select(av,4)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   503
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   504
    static class S6 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   505
        protected S6(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   506
        protected S6(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   507
        protected S6 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S6(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   508
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   509
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   510
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   511
            return target.<Object>invokeExact(a0, a1, a2, a3, a4,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   512
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   513
        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   514
            return target.<Object>invokeExact(a0, a1, a2, a3,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   515
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   516
        protected Object invoke_S3(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   517
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   518
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   519
        protected Object invoke_S4(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   520
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   521
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   522
        protected Object invoke_S5(Object a0, Object av) throws Throwable { av = super.check(av, 5);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   523
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   524
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   525
                super.select(av,4)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   526
        protected Object invoke_S6(Object av) throws Throwable { av = super.check(av, 6);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   527
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   528
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   529
                super.select(av,4), super.select(av,5)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   530
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   531
    static class S7 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   532
        protected S7(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   533
        protected S7(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   534
        protected S7 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S7(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   535
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   536
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   537
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   538
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   539
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   540
        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   541
            return target.<Object>invokeExact(a0, a1, a2, a3, a4,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   542
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   543
        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   544
            return target.<Object>invokeExact(a0, a1, a2, a3,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   545
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   546
        protected Object invoke_S4(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   547
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   548
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   549
        protected Object invoke_S5(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 5);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   550
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   551
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   552
                super.select(av,4)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   553
        protected Object invoke_S6(Object a0, Object av) throws Throwable { av = super.check(av, 6);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   554
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   555
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   556
                super.select(av,4), super.select(av,5)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   557
        protected Object invoke_S7(Object av) throws Throwable { av = super.check(av, 7);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   558
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   559
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   560
                super.select(av,4), super.select(av,5), super.select(av,6)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   561
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   562
    static class S8 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   563
        protected S8(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   564
        protected S8(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   565
        protected S8 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S8(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   566
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   567
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   568
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   569
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   570
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   571
        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   572
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   573
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   574
        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   575
            return target.<Object>invokeExact(a0, a1, a2, a3, a4,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   576
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   577
        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   578
            return target.<Object>invokeExact(a0, a1, a2, a3,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   579
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   580
        protected Object invoke_S5(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 5);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   581
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   582
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   583
                super.select(av,4)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   584
        protected Object invoke_S6(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 6);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   585
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   586
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   587
                super.select(av,4), super.select(av,5)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   588
        protected Object invoke_S7(Object a0, Object av) throws Throwable { av = super.check(av, 7);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   589
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   590
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   591
                super.select(av,4), super.select(av,5), super.select(av,6)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   592
        protected Object invoke_S8(Object av) throws Throwable { av = super.check(av, 8);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   593
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   594
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   595
                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   596
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   597
    static class S9 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   598
        protected S9(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   599
        protected S9(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   600
        protected S9 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S9(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   601
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   602
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   603
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   604
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   605
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   606
        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   607
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   608
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   609
        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   610
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   611
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   612
        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   613
            return target.<Object>invokeExact(a0, a1, a2, a3, a4,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   614
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   615
        protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 5);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   616
            return target.<Object>invokeExact(a0, a1, a2, a3,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   617
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   618
                super.select(av,4)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   619
        protected Object invoke_S6(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 6);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   620
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   621
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   622
                super.select(av,4), super.select(av,5)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   623
        protected Object invoke_S7(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 7);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   624
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   625
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   626
                super.select(av,4), super.select(av,5), super.select(av,6)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   627
        protected Object invoke_S8(Object a0, Object av) throws Throwable { av = super.check(av, 8);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   628
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   629
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   630
                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   631
        protected Object invoke_S9(Object av) throws Throwable { av = super.check(av, 9);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   632
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   633
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   634
                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   635
                super.select(av,8)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   636
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   637
    static class S10 extends Adapter {
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   638
        protected S10(SpreadGeneric outer) { super(outer); }  // to build prototype
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   639
        protected S10(SpreadGeneric outer, MethodHandle t) { super(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   640
        protected S10 makeInstance(SpreadGeneric outer, MethodHandle t) { return new S10(outer, t); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   641
        protected Object invoke_S0(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object a9, Object av) throws Throwable { av = super.check(av, 0);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   642
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   643
        protected Object invoke_S1(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8, Object av) throws Throwable { av = super.check(av, 1);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   644
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7, a8,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   645
                super.select(av,0)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   646
        protected Object invoke_S2(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object av) throws Throwable { av = super.check(av, 2);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   647
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6, a7,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   648
                super.select(av,0), super.select(av,1)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   649
        protected Object invoke_S3(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object av) throws Throwable { av = super.check(av, 3);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   650
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5, a6,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   651
                super.select(av,0), super.select(av,1), super.select(av,2)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   652
        protected Object invoke_S4(Object a0, Object a1, Object a2, Object a3, Object a4, Object a5, Object av) throws Throwable { av = super.check(av, 4);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   653
            return target.<Object>invokeExact(a0, a1, a2, a3, a4, a5,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   654
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   655
        protected Object invoke_S5(Object a0, Object a1, Object a2, Object a3, Object a4, Object av) throws Throwable { av = super.check(av, 5);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   656
            return target.<Object>invokeExact(a0, a1, a2, a3, a4,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   657
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   658
                super.select(av,4)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   659
        protected Object invoke_S6(Object a0, Object a1, Object a2, Object a3, Object av) throws Throwable { av = super.check(av, 6);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   660
            return target.<Object>invokeExact(a0, a1, a2, a3,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   661
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   662
                super.select(av,4), super.select(av,5)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   663
        protected Object invoke_S7(Object a0, Object a1, Object a2, Object av) throws Throwable { av = super.check(av, 7);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   664
            return target.<Object>invokeExact(a0, a1, a2,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   665
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   666
                super.select(av,4), super.select(av,5), super.select(av,6)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   667
        protected Object invoke_S8(Object a0, Object a1, Object av) throws Throwable { av = super.check(av, 8);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   668
            return target.<Object>invokeExact(a0, a1,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   669
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   670
                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   671
        protected Object invoke_S9(Object a0, Object av) throws Throwable { av = super.check(av, 9);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   672
            return target.<Object>invokeExact(a0,
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   673
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   674
                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   675
                super.select(av,8)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   676
        protected Object invoke_S10(Object av) throws Throwable { av = super.check(av, 10);
5722
4ada807383c8 6939134: JSR 292 adjustments to method handle invocation
jrose
parents: 4537
diff changeset
   677
            return target.<Object>invokeExact(
4537
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   678
                super.select(av,0), super.select(av,1), super.select(av,2), super.select(av,3),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   679
                super.select(av,4), super.select(av,5), super.select(av,6), super.select(av,7),
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   680
                super.select(av,8), super.select(av,9)); }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   681
    }
7c3c7f8d5195 6914665: update jdk code for JSR 292 (post 6858164)
jrose
parents:
diff changeset
   682
}