changeset 3506:961eb443422f

Enable M3 translation by default Cleanup code associated with BytecodeMapping-based specialization.
author mcimadamore
date Mon, 18 Apr 2016 17:33:12 +0100
parents f18dc3fd0496
children 9bec39f205ed
files src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/SpecializeTypes.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties src/jdk.compiler/share/classes/com/sun/tools/javac/sym/CreateSymbols.java test/tools/javac/diags/examples/CantSelectNonVirtual.java test/tools/javac/valhalla/typespec/GenericClassFile01.java test/tools/javac/valhalla/typespec/GenericClassFile02.java test/tools/javac/valhalla/typespec/GenericClassFile03.java test/tools/javac/valhalla/typespec/GenericClassFile04.java test/tools/javac/valhalla/typespec/GenericClassFile05.java test/tools/javac/valhalla/typespec/GenericClassFile06.java test/tools/javac/valhalla/typespec/GenericMethod01.java test/tools/javac/valhalla/typespec/GenericMethod02.java test/tools/javac/valhalla/typespec/GenericMethod03.java test/tools/javac/valhalla/typespec/GenericPool01.java test/tools/javac/valhalla/typespec/Lambda01.java test/tools/javac/valhalla/typespec/Lambda03.java test/tools/javac/valhalla/typespec/SpecializedAccessors3.java test/tools/javac/valhalla/typespec/SpecializedAccessors5.java test/tools/javac/valhalla/typespec/TestSuperBridges.java test/tools/javac/valhalla/typespec/Wildcards08.java test/tools/javac/valhalla/typespec/Wildcards08.out test/tools/javac/valhalla/typespec/Wildcards11.java test/tools/javac/valhalla/typespec/items/BytecodeMapping.java test/tools/javac/valhalla/typespec/items/BytecodeMappingHarness.java test/tools/javac/valhalla/typespec/items/Opcodes.java test/tools/javac/valhalla/typespec/items/TemplateMethod.java test/tools/javac/valhalla/typespec/items/m3/PoolMappingHarness.java test/tools/javac/valhalla/typespec/items/tests/TestAnyMembers.java test/tools/javac/valhalla/typespec/items/tests/TestArrayLoadAndStore.java test/tools/javac/valhalla/typespec/items/tests/TestBinary.java test/tools/javac/valhalla/typespec/items/tests/TestCapture.java test/tools/javac/valhalla/typespec/items/tests/TestCast.java test/tools/javac/valhalla/typespec/items/tests/TestClassLit.java test/tools/javac/valhalla/typespec/items/tests/TestCmp.java test/tools/javac/valhalla/typespec/items/tests/TestDefault.java test/tools/javac/valhalla/typespec/items/tests/TestDup.java test/tools/javac/valhalla/typespec/items/tests/TestForeach.java test/tools/javac/valhalla/typespec/items/tests/TestGeneric2GenericCall.java test/tools/javac/valhalla/typespec/items/tests/TestGenericSpecializedConstructor.java test/tools/javac/valhalla/typespec/items/tests/TestIndy.java test/tools/javac/valhalla/typespec/items/tests/TestIndyErasure.java test/tools/javac/valhalla/typespec/items/tests/TestIndyFactory.java test/tools/javac/valhalla/typespec/items/tests/TestInheritedAnyMembers.java test/tools/javac/valhalla/typespec/items/tests/TestInner.java test/tools/javac/valhalla/typespec/items/tests/TestInstanceof.java test/tools/javac/valhalla/typespec/items/tests/TestLambda.java test/tools/javac/valhalla/typespec/items/tests/TestLoadAndStore.java test/tools/javac/valhalla/typespec/items/tests/TestNestedGenerics.java test/tools/javac/valhalla/typespec/items/tests/TestNew.java test/tools/javac/valhalla/typespec/items/tests/TestNewArray.java test/tools/javac/valhalla/typespec/items/tests/TestNonSpecializedGenericCall.java test/tools/javac/valhalla/typespec/items/tests/TestNonSpecializedMethod.java test/tools/javac/valhalla/typespec/items/tests/TestPop.java test/tools/javac/valhalla/typespec/items/tests/TestRefOnly.java test/tools/javac/valhalla/typespec/items/tests/TestRespecialization.java test/tools/javac/valhalla/typespec/items/tests/TestSuper.java test/tools/javac/valhalla/typespec/items/tests/TestSyntheticCast.java test/tools/javac/valhalla/typespec/items/tests/TestValOnly.java test/tools/javac/valhalla/typespec/separate06/Separate06.java test/tools/javac/valhalla/typespec/separate07/Separate07.java test/tools/javac/valhalla/values/CheckNoDups.java test/tools/javac/valhalla/values/CheckValueBuffersAny.java
diffstat 71 files changed, 99 insertions(+), 3265 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Mon Apr 18 17:33:12 2016 +0100
@@ -203,7 +203,6 @@
     public final Type documentedType;
     public final Type elementTypeType;
     public final Type functionalInterfaceType;
-    public final Type genericMethodSpecialzer;
     public final Type genericInstanceDispatch;
     public final Type genericStaticDispatch;
     public final Type virtualAccess;
@@ -538,7 +537,6 @@
         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
         stringConcatFactory = enterClass("java.lang.invoke.StringConcatFactory");
         functionalInterfaceType = enterClass("java.lang.FunctionalInterface");
-        genericMethodSpecialzer = enterClass("java.lang.invoke.GenericMethodSpecializer");
         genericInstanceDispatch = enterClass("java.lang.invoke.GenericInstanceDispatch");
         genericStaticDispatch = enterClass("java.lang.invoke.GenericStaticDispatch");
         virtualAccess = enterClass("java.lang.invoke.VirtualAccess");
@@ -553,7 +551,6 @@
         synthesizeEmptyInterfaceIfMissing(cloneableType);
         synthesizeEmptyInterfaceIfMissing(serializableType);
         synthesizeEmptyInterfaceIfMissing(lambdaMetafactory);
-        synthesizeEmptyBSMIfMissing(genericMethodSpecialzer);
         synthesizeEmptyBSMIfMissing(genericInstanceDispatch);
         synthesizeEmptyBSMIfMissing(genericStaticDispatch);
         synthesizeEmptyBSMIfMissing(virtualAccess);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Mon Apr 18 17:33:12 2016 +0100
@@ -95,7 +95,6 @@
     final boolean allowObjectToPrimitiveCast;
     final boolean allowDefaultMethods;
     final boolean allowTypeSpecialization;
-    public final boolean genericClassFile;
     final Check chk;
     final Enter enter;
     private boolean foldValueAsReference;
@@ -122,7 +121,6 @@
         allowObjectToPrimitiveCast = source.allowObjectToPrimitiveCast();
         allowDefaultMethods = source.allowDefaultMethods();
         allowTypeSpecialization = source.allowTypeSpecialization();
-        genericClassFile = Options.instance(context).isSet("genericClassFile");
         chk = Check.instance(context);
         enter = Enter.instance(context);
         capturedName = names.fromString("<captured wildcard>");
@@ -2403,10 +2401,6 @@
      * @param sym a symbol
      */
     public Type asEnclosingSuper(Type t, Symbol sym) {
-        return asEnclosingSuper(t, sym, AsSuperKind.NORMAL);
-    }
-
-    public Type asEnclosingSuper(Type t, Symbol sym, AsSuperKind superKind) {
         switch (t.getTag()) {
         case CLASS:
             do {
@@ -2758,52 +2752,13 @@
             virtualIntfSym.type = virtualIntfType;
             virtualIntfSym.members_field = WriteableScope.create(virtualIntfSym);
             virtualIntfSym.sourcefile = csym.sourcefile;
-
-            //lazy completion support
             virtualIntfSym.completer = Completer.NULL_COMPLETER;
-            if (!genericClassFile) {
-                virtualIntfSym.completer = (_unused) -> {
-                    for (Symbol m : csym.members().getSymbols()) {
-                        if (m.kind == TYP ||
-                                m.isStatic() ||
-                                m.isConstructor() ||
-                                (genericClassFile && m.type.hasTag(FORALL)) || //skip generic methods (for now)
-                                containsAnyfiedArrays(m.type) ||
-                                (m.flags() & Flags.PUBLIC) == 0)
-                            continue; //only public instance methods/fields!
-                        if (m.kind == MTH) {
-                            //simply clone the method
-                            MethodSymbol m2 = (MethodSymbol)m.clone(virtualIntfSym);
-                            m2.flags_field = Flags.SYNTHETIC | Flags.SPECIALIZABLE | Flags.PUBLIC | Flags.ABSTRACT;
-                            m2.type = asVirtualType(m2.type, origin);
-                            virtualIntfSym.members().enter(m2);
-                        } else {
-                            virtualIntfSym.members().enter(makeGetter((VarSymbol)m, virtualIntfSym));
-                            virtualIntfSym.members().enter(makeSetter((VarSymbol)m, virtualIntfSym));
-                        }
-                    }
-                };
-            }
         }
 
         return result;
     }
 
     /**
-     * Replace all occurrences of virtualizable types with virtual interfaces.
-     */
-    public Type virtualize(Type t) {
-        return t.map(virtualizeMap);
-    }
-
-    Type.TypeMapping<Void> virtualizeMap = new TypeMapping<Void>() {
-        @Override
-        public Type visitClassType(ClassType t, Void aVoid) {
-            return isVirtualizable(t) ? virtualizeClass(t.tsym).type : t;
-        }
-    };
-
-    /**
      * Does a given type contain anyfied arrays?
      */
     public boolean containsAnyfiedArrays(Type t) {
@@ -2875,42 +2830,6 @@
     };
 
     /**
-     * Generate getter method symbol for virtual interface.
-     */
-    Symbol makeGetter(VarSymbol field, TypeSymbol origin) {
-        Type accessorType = new MethodType(
-                List.nil(),
-                asVirtualType(field.type, origin.baseSymbol()),
-                List.nil(),
-                syms.methodClass);
-        return new MethodSymbol(Flags.ABSTRACT | Flags.SYNTHETIC | Flags.SPECIALIZABLE | Flags.PUBLIC,
-                field.name.append(names.fromString("$get")), accessorType, origin) {
-            @Override
-            public Symbol baseSymbol() {
-                return field.baseSymbol();
-            }
-        };
-    }
-
-    /**
-     * Generate setter method symbol for virtual interface.
-     */
-    Symbol makeSetter(VarSymbol field, TypeSymbol origin) {
-        Type accessorType = new MethodType(
-                List.of(asVirtualType(field.type, origin.baseSymbol())),
-                asVirtualType(field.type, origin.baseSymbol()),
-                List.nil(),
-                syms.methodClass);
-        return new MethodSymbol(Flags.ABSTRACT | Flags.SYNTHETIC | Flags.SPECIALIZABLE | Flags.PUBLIC,
-                field.name.append(names.fromString("$set")), accessorType, origin) {
-            @Override
-            public Symbol baseSymbol() {
-                return field.baseSymbol();
-            }
-        };
-    }
-
-    /**
      * Should a given type be virtualized?
      */
     public boolean isVirtualizable(ClassType ctype) {
@@ -5834,22 +5753,20 @@
     }
 
     public Name typeDesc(Type t, Consumer<ClassSymbol> crefFunc) {
-        MangledDescriptorGenerator msg = genericClassFile ?
-                new M3MangledDescriptorGenerator(crefFunc) :
-                new MangledDescriptorGenerator(crefFunc);
+        MangledDescriptorGenerator msg = new MangledDescriptorGenerator(crefFunc);
         msg.assembleSig(normalize(t));
         return names.fromString(msg.toString());
     }
 
     /**
-     * Descriptor generation; supports mangling of specialized class names using the transitional
-     * M2 scheme; for instance, {@code Foo<int>} is mangled as {@code Foo${0=I}}.
+     * Descriptor generation; supports mangling of specialized class names using the M3 scheme;
+     * for instance, {@code Foo<int>} is mangled as {@code Foo${I}}.
      */
     public class MangledDescriptorGenerator extends Types.BuilderSignatureGenerator {
 
         Consumer<ClassSymbol> crefFunc;
 
-        MangledDescriptorGenerator(Consumer<ClassSymbol> crefFunc) {
+        protected MangledDescriptorGenerator(Consumer<ClassSymbol> crefFunc) {
             super(Types.this);
             this.crefFunc = crefFunc;
         }
@@ -5901,37 +5818,6 @@
          * Mangle specialized type (transitional).
          */
         protected Name mangledName(Type type) {
-            List<Type> typeargs = type.allparams();
-
-            //compute name string
-            List<String> specNames =
-                    Tuple2.zip(List.range(0, typeargs.length()), typeargs).stream()
-                            .filter(p -> isPrimitiveOrValue(p.elem1))
-                            .map(p -> String.join("=", p.elem0.toString(), typeSig(p.elem1)))
-                            .collect(List.collector());
-
-            Name baseName = names.fromUtf(externalize(type.tsym.flatName()));
-
-            //compute name of specialized class symbol
-            Name specializedName = specNames.isEmpty() ?
-                    baseName :
-                    names.fromString(baseName + "${" + String.join(",", specNames) + "}");
-
-            return specializedName;
-        }
-    }
-
-    /**
-     * Descriptor generation; supports mangling of specialized class names using the M3 scheme;
-     * for instance, {@code Foo<int>} is mangled as {@code Foo${I}}.
-     */
-    public class M3MangledDescriptorGenerator extends MangledDescriptorGenerator {
-
-        public M3MangledDescriptorGenerator(Consumer<ClassSymbol> crefFunc) {
-            super(crefFunc);
-        }
-
-        protected Name mangledName(Type type) {
             Assert.check(type.getEnclosingType().hasTag(NONE)); //inner classes not supported (yet)
             List<Type> typeargs = type.getTypeArguments();
             //compute name string
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Apr 18 17:33:12 2016 +0100
@@ -3502,16 +3502,12 @@
         }
 
         // Disallow selecting a non-virtual field from an expression whose type is anyfied raw/wildcard
-        if (!types.genericClassFile && (sym.kind == VAR || sym.kind == MTH) &&
+        if ((sym.kind == VAR || sym.kind == MTH) &&
                 (sitesym == null || !sitesym.kind.matches(KindSelector.TYP_PCK)) &&
                 tree.selected.type != null && tree.selected.type.hasTag(CLASS) &&
                 types.isVirtualizable((ClassType)tree.selected.type) &&
-                (types.containsAnyfiedArrays(sym.type) ||
-                (sym.flags() & PUBLIC) == 0)) {
-            Fragment reason = types.containsAnyfiedArrays(sym.type) ?
-                    Fragments.VirtualAnyfiedArrays(sym) :
-                    Fragments.VirtualNonPublic(sym);
-            log.error(tree, Errors.CantSelectNonVirtual(reason));
+                types.containsAnyfiedArrays(sym.type)) {
+            log.error(tree, Errors.CantSelectNonVirtual(Fragments.VirtualAnyfiedArrays(sym)));
         }
 
         if (isType(sitesym)) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Mon Apr 18 17:33:12 2016 +0100
@@ -129,9 +129,6 @@
     /** Flag for alternate metafactories indicating the lambda object requires multiple bridges */
     public static final int FLAG_BRIDGES = 1 << 2;
 
-    /** Flag for alternate metafactories indicating the lambda object requires indy */
-    public static final int FLAG_INDY = 1 << 3;
-
     // <editor-fold defaultstate="collapsed" desc="Instantiating">
     protected static final Context.Key<LambdaToMethod> unlambdaKey = new Context.Key<>();
 
@@ -1099,9 +1096,6 @@
             if (hasBridges) {
                 flags |= FLAG_BRIDGES;
             }
-            if (hasIndy && !specializeTypes.desugarGenericMethods) {
-                flags |= FLAG_INDY;
-            }
             staticArgs = staticArgs.append(BootstrapArgument.Int(flags));
             if (hasMarkers) {
                 staticArgs = staticArgs.append(BootstrapArgument.Int(markers.length()));
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Mon Apr 18 17:33:12 2016 +0100
@@ -1119,10 +1119,7 @@
 
     boolean crossSpecializationBoundaries(Symbol sym, JCTree base) {
         Type rec = specializedReceiver(sym, base);
-        if (isSpecializedGenericCall(base)) {
-            //specializable generic call to private members should always get accessors
-            return true;
-        } else if (sym.isStatic()) {
+        if (sym.isStatic()) {
             //static non-specializable call, needs accessor if we are in a specializable class
             return types.needsMangling(currentClass.type);
         } else if (rec != null) {
@@ -1148,14 +1145,6 @@
             }
         }
 
-        private boolean isSpecializedGenericCall(JCTree base) {
-            //is this a specialized generic call?
-            Symbol baseSym = base != null ? TreeInfo.symbol(base) : null;
-            return baseSym != null &&
-                    baseSym instanceof DynamicMethodSymbol &&
-                    ((DynamicMethodSymbol)baseSym).bsm.owner.type == syms.genericMethodSpecialzer;
-        }
-
 
     /** The class in which an access method for given symbol goes.
      *  @param sym        The access symbol
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/SpecializeTypes.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/SpecializeTypes.java	Mon Apr 18 17:33:12 2016 +0100
@@ -131,9 +131,6 @@
     private CompileStates compileStates;
     private Log log;
 
-    boolean desugarGenericMethods;
-    boolean genericClassFile;
-
     private SpecializeTypes(Context context) {
         super(context);
         context.put(specializeTypesKey, this);
@@ -142,9 +139,6 @@
         chk = Check.instance(context);
         compileStates = CompileStates.instance(context);
         log = Log.instance(context);
-        Options options = Options.instance(context);
-        genericClassFile = options.isSet("genericClassFile");
-        desugarGenericMethods = options.isSet("desugarGenericMethods") || genericClassFile;
     }
 
     /** class currently being specialized. */
@@ -178,7 +172,7 @@
                 msym,
                 TreeInfo.args(tree),
                 null,
-                inferredTypeargs(tree.constructorType, msym),
+                inferredTypeargs(msym),
                 tree.unerasedType,
                 tree.varargsElement);
     }
@@ -190,7 +184,7 @@
         Symbol msym = TreeInfo.symbol(tree.meth);
         return specializeGenericMethodCallIfNeeded(msym, tree, tree.typeargs.nonEmpty() ?
                 TreeInfo.types(tree.typeargs) :
-                inferredTypeargs(tree.meth.type, msym));
+                inferredTypeargs(msym));
     }
 
     JCMethodInvocation specializeGenericMethodCallIfNeeded(Symbol msym, JCMethodInvocation tree, List<Type> inferredTypeargs) {
@@ -230,7 +224,7 @@
     /**
      * Fetch inferred typeargs from a (possibly inferred) method type.
      */
-    List<Type> inferredTypeargs(Type mtype, Symbol msym) {
+    List<Type> inferredTypeargs(Symbol msym) {
         if (inferenceContext != null) {
             return Tuple2.zip(inferenceContext.instTypes(), inferenceContext.inferenceVars()).stream()
                     .filter(p -> p.elem1.tsym.owner == msym.baseSymbol())
@@ -249,7 +243,6 @@
                                                List<JCExpression> args, JCExpression receiverExpr,
                                                List<Type> typeargs, Type receiverType, Type varargsElement) {
         if (typeargs.nonEmpty()) {
-            boolean altTranslation = desugarGenericMethods;
             if (typeargs.stream().anyMatch(types::isTypeArgumentSpecializable)) {
                 if (!receiverType.hasTag(NONE)) {
                     receiverType = types.capture(types.decorateDescriptor(receiverType, receiverType.tsym.type));
@@ -261,30 +254,15 @@
 
                 Symbol unspecializedMeth = msym.baseSymbol();
 
-                if (!altTranslation) {
-                    staticArgs = staticArgs.prepend(BootstrapArgument.MethodHandle((MethodSymbol)unspecializedMeth));
-                } else {
-                    //use method type instead of method handle to avoid access woes (for now)
-                    //note - this should point to declared method sig in the all-erased species
-                    staticArgs = staticArgs.prepend(BootstrapArgument.MethodType(allErasedSignature(unspecializedMeth)));
-                }
+                //use method type instead of method handle to avoid access woes (for now)
+                //note - this should point to declared method sig in the all-erased species
+                staticArgs = staticArgs.prepend(BootstrapArgument.MethodType(allErasedSignature(unspecializedMeth)));
 
                 //structural info is not required for the generic specialized call case
                 //as there, we should leave the method handle unspecialized, as it should point
                 //to the original version of the method in the template class.
                 staticArgs.head.flags &= ~BootstrapArgument.SPECIALIZABLE;
-
-                if (!altTranslation) {
-                    Type effFinalReceiverType = receiverType;
-                    staticArgs = staticArgs.prepend(new BootstrapArgument<String>(Kind.STRING, types.bytecodeMappingSig(receiverType).toString()) {
-                        @Override
-                        public Optional<Type> asType() {
-                            return Optional.of(effFinalReceiverType);
-                        }
-                    });
-                } else {
-                    staticArgs = staticArgs.prepend(new BootstrapArgument<ClassSymbol>(Kind.CLASS, (ClassSymbol)receiverType.tsym));
-                }
+                staticArgs = staticArgs.prepend(new BootstrapArgument<>(Kind.CLASS, (ClassSymbol)receiverType.tsym));
 
                 Type declared = msym.type;
                 if (!receiverType.hasTag(TypeTag.NONE)) {
@@ -336,12 +314,9 @@
                     indyType = types.createMethodTypeWithReturn(indyType, receiverType);
                 }
 
-                Type bsmType = syms.genericMethodSpecialzer;
-                if (altTranslation) {
-                    bsmType = msym.isStatic() ?
-                            syms.genericStaticDispatch :
-                            syms.genericInstanceDispatch;
-                }
+                Type bsmType = msym.isStatic() ?
+                        syms.genericStaticDispatch :
+                        syms.genericInstanceDispatch;
                 JCMethodInvocation methInv = makeIndyCall(tree, msym.owner, bsmType,
                         names.metafactory, staticArgs, (MethodType)indyType, args, msym.name, msym);
                 methInv.varargsElement = varargsElement;
@@ -350,7 +325,7 @@
                 //set type to be inferred type (instead of indy return type). This will cause
                 //usual checkcast to be generated during TransTypes (where required).
                 return (E)methInv.setType(tree.type);
-            } else if (desugarGenericMethods && !msym.isConstructor() &&
+            } else if (!msym.isConstructor() &&
                     msym.type.getTypeArguments().stream().anyMatch(types::isAnyTypeVar)) {
                 //generic constructors not supported in this scheme
                 TreeInfo.setSymbol(((JCMethodInvocation)tree).meth, genericMethodBridgeSym(msym));
@@ -371,11 +346,11 @@
 
     @SuppressWarnings("unchecked")
     <Z> BootstrapArgument<Z> makeSpecializedTypeArg(Type t) {
-        if (types.isSpecializableTypeVar(types.normalize(t)) && genericClassFile) {
+        if (types.isSpecializableTypeVar(types.normalize(t))) {
             return (BootstrapArgument<Z>)BootstrapArgument.TypeVar((TypeVar)types.normalize(t));
         } else {
             BootstrapArgument<String> bsmArg = new BootstrapArgument<String>(Kind.STRING, types.isTypeArgumentSpecializable(t) ?
-                    types.bytecodeMappingSig(t).toString() : (genericClassFile ? "_" : "")) {
+                    types.bytecodeMappingSig(t).toString() : "_") {
                 public Optional<Type> asType() {
                     return Optional.of(t);
                 }
@@ -462,11 +437,10 @@
 
     @Override
     public void visitMethodDef(JCMethodDecl tree) {
-        if (desugarGenericMethods &&
-                (tree.sym.flags() & (Flags.ABSTRACT | Flags.BRIDGE)) == 0 &&
+        if ((tree.sym.flags() & (Flags.ABSTRACT | Flags.BRIDGE)) == 0 &&
                 tree.typarams != null &&
                 tree.typarams.stream().anyMatch(p -> types.isAnyTypeVar(p.type))) {
-            //desugar specializable method to inner classes (only static for now)
+            //desugar specializable method to inner classes
             tree = makeGenericMethodClass(tree);
         }
         if (TreeInfo.isPeeledMethod(tree)) {
@@ -613,7 +587,7 @@
         }
         tree.meth = translate(tree.meth);
         tree.args = withInferenceContext(tree.meth.type, () -> translate(tree.args));
-        JCMethodInvocation call = withInferenceContext(tree.meth.type, () -> specializeGenericMethodCallIfNeeded(rewriteSuperCallIfNeeded(tree)));
+        JCMethodInvocation call = withInferenceContext(tree.meth.type, () -> specializeGenericMethodCallIfNeeded(tree));
         Symbol meth = TreeInfo.symbol(call.meth);
         if (rs.polymorphicSignatureScope.includes(meth)) {
             //patch unerased type for polysig methods
@@ -625,7 +599,6 @@
             call = makeVirtualAccessorCall((JCFieldAccess)call.meth, tree.args, VirtualKind.METHOD);
         }
         if (!(meth instanceof DynamicMethodSymbol) &&
-                genericClassFile &&
                 call.meth.hasTag(SELECT) &&
                 needsObjectibleCall(((JCFieldAccess)call.meth).selected.type, meth)) {
             call = makeObjectibleCall(call, tree.args);
@@ -644,73 +617,6 @@
                 types.isSameType(sym.enclClass().baseSymbol().type, syms.objectType);
     }
 
-    /**
-     * Rewrites a super call to use a synthetic bridge.
-     */
-    private JCMethodInvocation rewriteSuperCallIfNeeded(JCMethodInvocation tree) {
-        if (currentMethod != null &&
-                !desugarGenericMethods &&
-                currentMethod.type.hasTag(TypeTag.FORALL) &&
-                ((ForAll)currentMethod.type).tvars.stream().anyMatch(types::isAnyTypeVar) &&
-                tree.meth.hasTag(Tag.SELECT) &&
-                TreeInfo.name(((JCFieldAccess)tree.meth).selected) == names._super) {
-
-            JCMethodDecl bridge = makeSuperBridge(tree);
-
-            if (bridge != null) {
-                return make.Apply(List.nil(),
-                        make.Ident(bridge.sym).setType(tree.meth.type),
-                        tree.args).setType(tree.type);
-            }
-        }
-        return tree;
-    }
-
-    /**
-     * Creates a bridge that invokes a given method in a supertype, and caches it for later use.
-     */
-    JCMethodDecl makeSuperBridge(JCMethodInvocation tree) {
-        MethodSymbol invokedSym = (MethodSymbol)TreeInfo.symbol(tree.meth);
-        Type invokedType = tree.meth.type;
-
-        if (invokedSym.type.hasTag(TypeTag.FORALL)) {
-            return null;
-        }
-
-        return superBridges.computeIfAbsent(invokedSym, superSym -> {
-            MethodSymbol bridgeSym = new MethodSymbol(Flags.SYNTHETIC | Flags.PRIVATE,
-                    names.fromString(superSym.owner.enclClass().flatName() +
-                            "$" + superSym.name + "$super"),
-                    superSym.type,
-                    currentClass);
-
-            JCMethodDecl bridge = make.at(0).MethodDef(bridgeSym, bridgeSym.type, null);
-            bridge.params = superSym.params().stream()
-                    .map(s -> {
-                        JCVariableDecl v = make.Param(s.name, s.type, bridgeSym);
-                        v.sym.adr = s.adr;
-                        return v;
-                    })
-                    .collect(List.collector());
-
-            JCExpression superCall =
-                    specializeGenericMethodCallIfNeeded(
-                            make.Apply(
-                                    List.nil(),
-                                    tree.meth,
-                                    bridge.params.stream()
-                                            .map(p -> make.Ident(p.sym))
-                                            .collect(List.collector())));
-            superCall.setType(invokedType);
-
-            bridge.body = make.Block(0, List.of(make.Exec(superCall)));
-            currentClass.members().enter(bridgeSym);
-            pendingDefs = pendingDefs.prepend(bridge);
-
-            return bridge;
-        });
-    }
-
     private static final String statePreviousToFlowAssertMsg =
             "The current compile state [%s] of class %s is previous to FLOW";
 
@@ -1236,7 +1142,7 @@
                 t -> t,
                 (st, s) -> ClassFile.REF_putField),
         /** a boxing bridge */
-        METHOD(s -> true, (t, syms) -> t, t -> t.getReturnType(), SpecializeTypes::referenceKind);
+        METHOD(s -> true, (t, syms) -> t, Type::getReturnType, SpecializeTypes::referenceKind);
 
         final Filter<Symbol> asFilter;
         final BiFunction<Type, Symtab, Type> asType;
@@ -1258,32 +1164,6 @@
      * typing (which erases partial wildcards to the unique type {@code Foo$any}).
      */
     JCMethodInvocation makeVirtualAccessorCall(JCFieldAccess sel, List<JCExpression> args, VirtualKind vk) {
-        if (genericClassFile) {
-            return makeM3VirtualAccessorCall(sel, args, vk);
-        }
-        Symbol accessor = null;
-        for (Symbol s : types.virtualizeClass(sel.selected.type.tsym).members().getSymbols(vk.asFilter)) {
-            if (s.baseSymbol() == sel.sym.baseSymbol()) {
-                accessor = s;
-                break;
-            }
-        }
-        Assert.checkNonNull(accessor, "Cannot get here!");
-        Type indyType = vk.asType.apply(sel.type, syms);
-        //prepend receiver
-        indyType = types.createMethodTypeWithParameters(indyType, indyType.getParameterTypes().prepend(sel.selected.type));
-        List<BootstrapArgument<?>> static_args =
-                List.of(BootstrapArgument.MethodHandle((MethodSymbol)accessor));
-        JCMethodInvocation methInv = makeIndyCall(sel, accessor.owner, syms.virtualAccess,
-                names.metafactory, static_args, (MethodType)indyType, args.prepend(sel.selected), accessor.name, accessor);
-        Type res = vk.asInvType.apply(sel.type);
-        methInv.setType(res);
-        methInv.unerasedType = methInv.type;
-        return methInv;
-    }
-
-    //where
-    JCMethodInvocation makeM3VirtualAccessorCall(JCFieldAccess sel, List<JCExpression> args, VirtualKind vk) {
         Type indyType = vk.asType.apply(sel.type, syms);
         //prepend receiver
         indyType = types.createMethodTypeWithParameters(indyType, indyType.getParameterTypes().prepend(sel.selected.type));
@@ -1318,7 +1198,7 @@
      * {@code Y} in {@code Map<X, Y>} is mapped as {@code #1} or {@code @1} depending on whether
      * the type-var occurs in argument position.
      */
-    class VirtualDescriptorGenerator extends Types.M3MangledDescriptorGenerator {
+    class VirtualDescriptorGenerator extends Types.MangledDescriptorGenerator {
 
         Type site;
         boolean typeArg = false;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Mon Apr 18 17:33:12 2016 +0100
@@ -135,9 +135,6 @@
 
     private final Symtab syms;
 
-    /** Switch: new constant pool mode support */
-    private final boolean genericClassFile;
-
     /** The tags and constants used in compressed stackmap. */
     static final int SAME_FRAME_SIZE = 64;
     static final int SAME_LOCALS_1_STACK_ITEM_EXTENDED = 247;
@@ -174,8 +171,6 @@
         emitSourceFile = options.isUnset(G_CUSTOM) ||
                             options.isSet(G_CUSTOM, "source");
 
-        genericClassFile = options.isSet("genericClassFile");
-
         foldValueAsReference = options.isSet("GenerateValueAsReference");
 
         String dumpModFlags = options.get("dumpmodifiers");
@@ -604,12 +599,8 @@
 
         for (Map.Entry<Symbol, WhereClause.Kind> whereClause : m.whereClauses.entrySet()) {
             Name typeVarName;
-            if (genericClassFile) {
-                int adr = poolwriter.typeVarIndex(whereClause.getKey().type);
-                typeVarName = names.fromString(String.valueOf(adr));
-            } else {
-                typeVarName = typeSig(whereClause.getKey().type);
-            }
+            int adr = poolwriter.typeVarIndex(whereClause.getKey().type);
+            typeVarName = names.fromString(String.valueOf(adr));
             databuf.appendChar(poolwriter.putConstant(typeVarName));
             databuf.appendChar(whereClause.getValue().code());
         }
@@ -993,7 +984,7 @@
             return 0;
         }
 
-        List<Tuple2<Symbol, List<Type>>> varsByOwner = types.typeVarsByOwner(sym, !genericClassFile);
+        List<Tuple2<Symbol, List<Type>>> varsByOwner = types.typeVarsByOwner(sym, false);
         if (varsByOwner.stream().allMatch(p -> p.elem1.isEmpty())) return 0;
         int alenIdx = writeAttr(names.TypeVariablesMap);
 
@@ -1011,11 +1002,7 @@
             for (Type t : vars) {
                 databuf.appendByte((byte)t.tsym.flags() & 0xFF);
                 databuf.appendChar((short)poolwriter.putConstant(t.tsym.name));
-                if (genericClassFile) {
-                    databuf.appendChar((short)poolwriter.putType(types.getBounds((TypeVar)t).head));
-                } else {
-                    databuf.appendChar((short)poolwriter.putConstant(typeSig(types.getBounds((TypeVar)t).head)));
-                }
+                databuf.appendChar((short)poolwriter.putType(types.getBounds((TypeVar)t).head));
             }
         }
         endAttr(alenIdx);
@@ -1384,11 +1371,7 @@
             case TYPEVAR:
                 if (debugstackmap) System.out.print("object(" + types.erasure(t).tsym + ")");
                 databuf.appendByte(7);
-                if (genericClassFile) {
-                    databuf.appendChar(poolwriter.putClass(t));
-                } else {
-                    databuf.appendChar(poolwriter.putSymbol(types.erasure(t).tsym));
-                }
+                databuf.appendChar(poolwriter.putClass(t));
                 break;
             case UNINITIALIZED_THIS:
                 if (debugstackmap) System.out.print("uninit_this");
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Mon Apr 18 17:33:12 2016 +0100
@@ -141,8 +141,6 @@
         genCrt = options.isSet(XJCOV);
         debugCode = options.isSet("debugcode");
         allowBetterNullChecks = target.hasObjects();
-        genericClassFile = options.isSet("genericClassFile");
-        emitTyped = options.isSet("emitTyped");
         foldValueAsReference = options.isSet("GenerateValueAsReference");
         enableValueBuffers = options.isSet("enableValueBuffers");
 
@@ -158,8 +156,6 @@
     private final boolean genCrt;
     private final boolean debugCode;
     private final boolean allowBetterNullChecks;
-    private final boolean genericClassFile;
-    private final boolean emitTyped;
 
     /** Code buffer, set by genMethod.
      */
@@ -647,34 +643,8 @@
                     case TYPE_0:
                         break;
                     case TYPE_1:
-                        if (genericClassFile && pool.needsGenericEntry(type)) {
+                        if (pool.needsGenericEntry(type)) {
                             code.emitop2(typed, pool.putType(type));
-                        } else if (!genericClassFile) {
-                            code.markAny(pc, types.typeSig(type));
-                        }
-                        break;
-                    default:
-                        Assert.error("Cannot get here!");
-                }
-            }
-        });
-    }
-
-    private void emitAndMarkIfNeeded2(DiagnosticPosition pos, Type unerased, int opcode) {
-        emitAndMarkIfNeeded2(pos, unerased, (ref) -> code.emitop2(opcode, ref), null);
-    }
-
-    private void emitAndMarkIfNeeded2(DiagnosticPosition pos, Type unerased, Consumer<Integer> snippet, Function<Type, Type> poolFuncOpt) {
-        boolean needsMangling = types.needsMangling(unerased);
-        Type poolType = poolFuncOpt != null ? poolFuncOpt.apply(unerased) : unerased;
-        int ref = makeRef(pos, poolType);
-        code.withDecorator(() -> snippet.accept(ref), (opcode, pc) -> {
-            OpcodeKind ok = OpcodeKind.of(opcode);
-            if (needsMangling) {
-                switch (ok) {
-                    case TYPE_2:
-                        if (!genericClassFile) {
-                            code.markAny(pc, types.bytecodeMappingSig(unerased));
                         }
                         break;
                     default:
@@ -1197,7 +1167,7 @@
                                         types,
                                         pool.pool,
                                         enableValueBuffers);
-            items = new Items(pool, code, syms, types, names, genericClassFile, emitTyped);
+            items = new Items(pool, code, syms, types, names);
             if (code.debugCode) {
                 System.err.println(meth + " for body " + tree);
             }
@@ -2065,7 +2035,7 @@
             genArgs(tree.args, parameterTypes);
             code.emitVnew(newType, makeRef(tree.pos(), tree.type, parameterTypes), Code.width(parameterTypes));
         } else {
-            emitAndMarkIfNeeded2(tree, newType, new_);
+            code.emitop2(new_, makeRef(tree.pos(), newType));
             code.emitop0(dup);
 
             // Generate code for all arguments, where the expected types are
@@ -2120,24 +2090,22 @@
             if (types.isValue(erasedElementType)) {
                 code.emitVnewarray(makeRef(tree, erasedType), erasedType);
             } else if (elemcode == 0 || (elemcode == 1 && ndims == 1)) {
-                if (genericClassFile) {
-                    Type elem = types.elemtype(sigType);
-                    if (elem.hasTag(TYPEVAR) && pool.needsGenericEntry(elem)) {
-                        //temporary hack: treat this as a type-1 opcode
-                        code.emitop2(typed, pool.putType(elem));
-                    }
+                Type elem = types.elemtype(sigType);
+                if (elem.hasTag(TYPEVAR) && pool.needsGenericEntry(elem)) {
+                    //temporary hack: treat this as a type-1 opcode
+                    code.emitop2(typed, pool.putType(elem));
                 }
-                emitAndMarkIfNeeded2(tree, sigType, (ref) -> code.emitAnewarray(ref, erasedType), t -> types.elemtype(t));
+                code.emitAnewarray(makeRef(tree.pos(), types.elemtype(sigType)), erasedType);
             } else if (elemcode == 1) {
                 // if the ultimate elements are values, use multivnewarray
                 Type u = erasedElementType;
                 while (types.isArray(u)) {
                     u = types.elemtype(u);
                 }
-                if (types.isValue(u)) {
-                    emitAndMarkIfNeeded2(tree, sigType, (ref) -> code.emitMultivnewarray(ndims, ref, erasedType), null);
+                if (!types.isValue(u)) {
+                    code.emitMultianewarray(ndims, makeRef(tree.pos(), sigType), erasedType);
                 } else {
-                    emitAndMarkIfNeeded2(tree, sigType, (ref) -> code.emitMultianewarray(ndims, ref, erasedType), null);
+                    code.emitMultivnewarray(ndims, makeRef(tree.pos(), sigType), erasedType);
                 }
             } else {
                 code.emitNewarray(elemcode, erasedType);
@@ -2373,7 +2341,7 @@
                 (!tree.clazz.type.isPrimitive() &&
                 !types.isSameType(tree.expr.type, tree.clazz.type) &&
                 types.asSuper(tree.expr.type, tree.clazz.type.tsym) == null)) {
-            emitAndMarkIfNeeded2(tree, unerasedType, checkcast);
+            code.emitop2(checkcast, makeRef(tree.pos(), unerasedType));
         }
     }
 
@@ -2385,7 +2353,7 @@
         genExpr(tree.expr, tree.expr.type).load();
         setTypeAnnotationPositions(tree.pos);
         Type unerasedType = TreeInfo.unerasedTypeOrType(tree.clazz);
-        emitAndMarkIfNeeded2(tree, unerasedType, instanceof_);
+        code.emitop2(instanceof_, makeRef(tree.pos(), unerasedType));
         result = items.makeStackItem(syms.booleanType);
     }
 
@@ -2440,7 +2408,7 @@
         Symbol sym = tree.sym;
 
         if (tree.name == names._class) {
-            emitAndMarkIfNeeded2(tree, TreeInfo.unerasedTypeOrType(tree.selected), code::emitLdc, null);
+            code.emitLdc(makeRef(tree.pos(), TreeInfo.unerasedTypeOrType(tree.selected)));
             result = items.makeStackItem(pt);
             return;
        }
@@ -2563,7 +2531,7 @@
             ClassSymbol c = cdef.sym;
             this.toplevel = env.toplevel;
             this.endPosTable = toplevel.endPositions;
-            pool = c.poolWriter = new PoolWriter(cdef.sym, types, genericClassFile);
+            pool = c.poolWriter = new PoolWriter(cdef.sym, types);
             /* method normalizeDefs() can add references to external classes into the constant pool
              */
             cdef.defs = normalizeDefs(cdef.defs, c);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java	Mon Apr 18 17:33:12 2016 +0100
@@ -79,23 +79,15 @@
     /** Name table. */
     Names names;
 
-    /** Switch: new constant pool mode support */
-    boolean genericClassFile;
-
-    /** Switch: force generation of 'typed' opcodes */
-    boolean emitTyped;
-
     /** Items that exist only once (flyweight pattern).
      */
     private final Item voidItem;
     private final Item[] stackItem = new Item[TypeCodeCount];
 
-    public Items(PoolWriter pool, Code code, Symtab syms, Types types, Names names, boolean genericClassFile, boolean emitTyped) {
+    public Items(PoolWriter pool, Code code, Symtab syms, Types types, Names names) {
         this.code = code;
         this.pool = pool;
         this.types = types;
-        this.genericClassFile = genericClassFile;
-        this.emitTyped = emitTyped;
         voidItem = new Item(VOIDcode) {
                 public String toString() { return "void"; }
             };
@@ -139,8 +131,7 @@
     }
     //where
         private boolean isAnyIndy(DynamicMethodSymbol dynSym) {
-            return dynSym.bsm.owner.type == syms.genericMethodSpecialzer ||
-                    types.containsSpecializableTvars(dynSym.type) ||
+            return types.containsSpecializableTvars(dynSym.type) ||
                     Stream.of(dynSym.staticArgs).anyMatch(this::isAnyBoostrapArg);
         }
 
@@ -575,71 +566,16 @@
         protected void decorateOpcode(int opcode, int pc) {
             OpcodeKind kind = OpcodeKind.of(opcode);
             switch (kind) {
-                case TYPE_0:
-                    //do nothing
-                    break;
                 case TYPE_1:
-                    if (genericClassFile && originalType.hasTag(TypeTag.TYPEVAR) &&
+                    if (originalType.hasTag(TypeTag.TYPEVAR) &&
                             pool.needsGenericEntry(originalType)) {
                         //typed
                         code.emitop2(typed, pool.putType(originalType));
-                    } else if (types.isSpecializableTypeVar(originalType)) {
-                        //emit legacy bytecode mapping
-                        code.markAny(pc, types.bytecodeMappingSig(originalType));
-                    }
-                    break;
-                case TYPE_3:
-                    SymbolicItem symbolicItem = (SymbolicItem)delegatedItem;
-                    if (!genericClassFile) {
-                        if (types.needsMangling(symbolicItem.ownerType())) {
-                            code.markAny(pc, names.fromString(String.join("::",
-                                    types.bytecodeMappingSig(symbolicItem.ownerType()),
-                                    types.bytecodeMappingSig(symbolicItem.member.externalType(types)))));
-                        }
-                    }
-                    break;
-                case TYPE_4:
-                    DynamicMethodSymbol dynSym = (DynamicMethodSymbol)((DynamicItem)delegatedItem).member;
-                    if (!genericClassFile) {
-                        Type indyType = dynSym.type;
-                        ListBuffer<String> buf = new ListBuffer<>();
-                        outer:
-                        for (int i = 0; i < dynSym.staticArgs.length; i++) {
-                            BootstrapArgument<?> staticArg = dynSym.staticArgs[i];
-                            if ((staticArg.flags & BootstrapArgument.SPECIALIZABLE) != 0 && isAnyBoostrapArg(staticArg)) {
-                                final String argSig;
-                                switch (staticArg.kind) {
-                                    case METHOD_TYPE:
-                                        argSig = types.bytecodeMappingSig(staticArg.asType().get().baseType()).toString();
-                                        break;
-                                    case CLASS:
-                                        argSig = types.bytecodeMappingSig(staticArg.asType().get()).toString();
-                                        break;
-                                    case METHOD_HANDLE:
-                                        Symbol refSym = staticArg.asSymbol().get();
-                                        //Todo: this code doesn't throw away the ForAll
-                                        argSig = names.fromString(String.join("::",
-                                                types.bytecodeMappingSig(refSym.owner.type),
-                                                types.bytecodeMappingSig(refSym.type))).toString();
-                                        break;
-                                    case STRING:
-                                        argSig = (String)staticArg.data;
-                                        break;
-                                    default:
-                                        //other arguments are not supported
-                                        continue outer;
-                                }
-                                buf.add(String.format("%d=%s", i, argSig));
-                            }
-                        }
-                        Name dynDesc = types.bytecodeMappingSig(indyType);
-                        code.markAny(pc, buf.isEmpty() ?
-                                dynDesc :
-                                dynDesc.append(names.fromString(buf.stream().collect(Collectors.joining("&", "::{", "}")))));
                     }
                     break;
                 default:
-                    Assert.error("Cannot get here!");
+                    //do nothing
+                    break;
             }
         }
 
@@ -840,11 +776,7 @@
 
         Item load() {
             int targetcode = typecode;
-            if (emitTyped) {
-                code.emitop2(typed, pool.putType(typedType()));
-                targetcode = OBJECTcode;
-            }
-            if (!emitTyped && types.isValue(type))
+            if (types.isValue(type))
                 code.emitop1w(vload, reg);
             else if (reg <= 3)
                 code.emitop0(iload_0 + Code.truncate(targetcode) * 4 + reg);
@@ -855,11 +787,7 @@
 
         void store() {
             int targetcode = typecode;
-            if (emitTyped) {
-                code.emitop2(typed, pool.putType(typedType()));
-                targetcode = OBJECTcode;
-            }
-            if (!emitTyped && types.isValue(type))
+            if (types.isValue(type))
                 code.emitop1w(vstore, reg);
             else if (reg <= 3)
                 code.emitop0(istore_0 + Code.truncate(targetcode) * 4 + reg);
@@ -868,24 +796,6 @@
             code.setDefined(reg);
         }
 
-        Type typedType() {
-            switch (typecode) {
-                case BYTEcode:
-                case SHORTcode:
-                case CHARcode:
-                case INTcode:
-                    return syms.intType;
-                case LONGcode:
-                    return syms.longType;
-                case FLOATcode:
-                    return syms.floatType;
-                case DOUBLEcode:
-                    return syms.doubleType;
-                default:
-                    throw new AssertionError("Cannot get here!");
-            }
-        }
-
         void incr(int x) {
             if (typecode == INTcode && x >= -32768 && x <= 32767) {
                 code.emitop1w(iinc, reg, x);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java	Mon Apr 18 17:33:12 2016 +0100
@@ -33,6 +33,7 @@
 import com.sun.tools.javac.code.Symbol.DynamicMethodSymbol.BootstrapArgument;
 import com.sun.tools.javac.code.Symbol.MethodHandleSymbol;
 import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Symbol.VarSymbol;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Type.ArrayType;
@@ -95,9 +96,6 @@
 
     Types types;
 
-    /** Switch: new constant pool mode support */
-    boolean genericClassFile;
-
     /** The inner classes to be written, as an ordered set (enclosing first). */
     LinkedHashSet<ClassSymbol> innerClasses = new LinkedHashSet<>();
 
@@ -109,16 +107,13 @@
 
     Type[] typeVarsByOwner;
 
-    public PoolWriter(ClassSymbol poolClass, Types types, boolean genericClassFile) {
+    public PoolWriter(ClassSymbol poolClass, Types types) {
         this.pool = new Pool();
         this.types = types;
-        this.genericClassFile = genericClassFile;
-        if (genericClassFile) {
-            this.typeVarsByOwner = types.typeVarsByOwner(poolClass).stream()
-                    .filter(p -> p.elem0.kind == Kind.TYP)
-                    .flatMap(t -> t.elem1.stream())
-                    .toArray(Type[]::new);
-        }
+        this.typeVarsByOwner = types.typeVarsByOwner(poolClass).stream()
+                .filter(p -> p.elem0.kind == Kind.TYP)
+                .flatMap(t -> t.elem1.stream())
+                .toArray(Type[]::new);
     }
 
     /**
@@ -292,8 +287,7 @@
         }
         
         private Entry visitDescriptor(Descriptor d) {
-            boolean simpleSite = genericClassFile &&
-                    (d.isStatic() && (d.flags() & Flags.SPECIALIZABLE) == 0);
+            boolean simpleSite = (d.isStatic() && (d.flags() & Flags.SPECIALIZABLE) == 0);
             ClassRef cref = simpleSite ?
                     (ClassRef)visit(d.site.tsym, null) :
                     makeClass(d.site);
@@ -397,9 +391,7 @@
      * Create a new entry entry from given type.
      */
     private Entry makeType(Type t, Function<Type, Name> typeNameFunction) {
-        TypeFactory tf = !genericClassFile ?
-                legacyTypeFactory : genericTypeFactory;
-        return t.accept(tf, typeNameFunction);
+        return t.accept(genericTypeFactory, typeNameFunction);
     }
 
     int typeVarIndex(Type t) {
@@ -569,7 +561,7 @@
 
     private DefaultTypeVisitor<Boolean, Boolean> needsGenericEntry = new DefaultTypeVisitor<Boolean, Boolean>() {
 
-        Set<Type> seen = new HashSet<>();
+        Set<TypeSymbol> seen = new HashSet<>();
 
         @Override
         public Boolean visitType(Type t, Boolean typeArg) {
@@ -604,15 +596,15 @@
 
         @Override
         public Boolean visitTypeVar(TypeVar t, Boolean typeArg) {
-            try {
-                if (seen.add(t)) {
+            if (seen.add(t.tsym)) {
+                try {
                     return visit(types.getBounds(t).head, false) ||
                             (typeVarIndex(t) != -1 && types.isSpecializableTypeVar(t));
-                } else {
-                    return false;
+                } finally {
+                    seen.remove(t.tsym);
                 }
-            } finally {
-                seen.remove(t);
+            } else {
+                return false;
             }
         }
     };
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Apr 18 17:33:12 2016 +0100
@@ -318,10 +318,6 @@
     ({0})
 
 # 0: symbol
-compiler.misc.virtual.non.public=\
-    member {0} is not public
-
-# 0: symbol
 compiler.misc.virtual.anyfied.arrays=\
     type of member {0} contains anyfied arrays
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Mon Apr 18 17:33:12 2016 +0100
@@ -240,7 +240,7 @@
             int p = profiles.getProfile(cs.fullname.toString().replace(".", "/"));
             if (0 < p && p < profileAnnos.length)
                 cs.prependAttributes(List.of(profileAnnos[p]));
-            PoolWriter poolWriter = new PoolWriter(cs, types, false);
+            PoolWriter poolWriter = new PoolWriter(cs, types);
             writeClass(poolWriter, cs, writer);
         }
 
--- a/test/tools/javac/diags/examples/CantSelectNonVirtual.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/diags/examples/CantSelectNonVirtual.java	Mon Apr 18 17:33:12 2016 +0100
@@ -24,17 +24,14 @@
  */
 
 // key: compiler.err.cant.select.non.virtual
-// key: compiler.misc.virtual.non.public
 // key: compiler.misc.virtual.anyfied.arrays
 
 class CantSelectNonVirtual {
     static class Foo<any T> {
-        T t;
         public T[] tarr;
     }
 
     void test(Foo<any> fa) {
-        Object o1 = fa.t;
         Object o2 = fa.tarr;
     }
 }
--- a/test/tools/javac/valhalla/typespec/GenericClassFile01.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericClassFile01.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary check that cast to method type variable does not crash code generation
- * @compile -XDgenericClassFile GenericClassFile01.java
+ * @compile GenericClassFile01.java
  */
 class GenericClassFile01 {
    <X extends Number> void test(Object o) {
--- a/test/tools/javac/valhalla/typespec/GenericClassFile02.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericClassFile02.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary check that enclosing method attribute does not crash code generation
- * @compile -XDgenericClassFile GenericClassFile02.java
+ * @compile GenericClassFile02.java
  */
 class GenericClassFile02<X> {
     void test(X x) {
--- a/test/tools/javac/valhalla/typespec/GenericClassFile03.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericClassFile03.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary check that method handles do not crash code generation
- * @compile -XDgenericClassFile GenericClassFile03.java
+ * @compile GenericClassFile03.java
  */
 class GenericClassFile03 {
     interface Foo<Z> {
--- a/test/tools/javac/valhalla/typespec/GenericClassFile04.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericClassFile04.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary check that cast to array of method type variable does not crash code generation
- * @compile -XDgenericClassFile GenericClassFile04.java
+ * @compile GenericClassFile04.java
  */
 class GenericClassFile04 {
     <X extends GenericClassFile04> void test(Object o) {
--- a/test/tools/javac/valhalla/typespec/GenericClassFile05.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericClassFile05.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary check that 'anyrasure' does not crash code generation
- * @compile -XDgenericClassFile GenericClassFile05.java
+ * @compile GenericClassFile05.java
  */
 class GenericClassFile05<any E> {
     static class Foo<any Z> { }
--- a/test/tools/javac/valhalla/typespec/GenericClassFile06.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericClassFile06.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary check that specializable lambda does not crash code generation
- * @compile -XDgenericClassFile GenericClassFile06.java
+ * @compile GenericClassFile06.java
  */
 class Test {
     interface Comparator<any C> {
--- a/test/tools/javac/valhalla/typespec/GenericMethod01.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericMethod01.java	Mon Apr 18 17:33:12 2016 +0100
@@ -29,9 +29,6 @@
  * @clean .*
  * @compile GenericMethod01.java
  * @run main GenericMethod01 *
- * @clean .*
- * @compile -XDgenericClassFile GenericMethod01.java
- * @run main GenericMethod01
  */
 public class GenericMethod01 {
 
--- a/test/tools/javac/valhalla/typespec/GenericMethod02.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericMethod02.java	Mon Apr 18 17:33:12 2016 +0100
@@ -27,7 +27,7 @@
  * @test
  * @summary smoke test for translation clashes using alt translation scheme
  * @clean .*
- * @compile -XDgenericClassFile GenericMethod02.java
+ * @compile GenericMethod02.java
  * @run main GenericMethod02
  */
 public class GenericMethod02 {
--- a/test/tools/javac/valhalla/typespec/GenericMethod03.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericMethod03.java	Mon Apr 18 17:33:12 2016 +0100
@@ -29,9 +29,6 @@
  * @clean .*
  * @compile GenericMethod03.java
  * @run main GenericMethod03
- * @clean .*
- * @compile -XDgenericClassFile GenericMethod03.java
- * @run main GenericMethod03
  */
 public class GenericMethod03 {
 
--- a/test/tools/javac/valhalla/typespec/GenericPool01.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/GenericPool01.java	Mon Apr 18 17:33:12 2016 +0100
@@ -26,7 +26,7 @@
 /**
  * @test
  * @summary smoke test for generic constant pool forms
- * @compile -XDgenericClassFile GenericPool01.java
+ * @compile GenericPool01.java
  */
 class GenericPool01<any X> {
     X x;
--- a/test/tools/javac/valhalla/typespec/Lambda01.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/Lambda01.java	Mon Apr 18 17:33:12 2016 +0100
@@ -47,11 +47,11 @@
     }
 
     public static void main(String[] args) {
-        new Lambda01<int>().m(1, 1L);
+        new Lambda01<int>().m(1, 1f);
         new Lambda01<int>().m(1, new Object());
-        new Lambda01<String>().m("", 1L);
+        new Lambda01<String>().m("", 1f);
         new Lambda01<String>().m("", new Object());
-        Lambda01.m_static(1L);
+        Lambda01.m_static(1f);
         Lambda01.m_static(new Object());
     }
 }
--- a/test/tools/javac/valhalla/typespec/Lambda03.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/Lambda03.java	Mon Apr 18 17:33:12 2016 +0100
@@ -52,6 +52,6 @@
         Assert.check(fbiI.apply(box) == 42);
         //constructor reference
         Supplier<Box<int>> sbi = Box<int>::new;
-        Assert.check(sbi.get().getClass().getName().contains("Box${0=I}"));
+        Assert.check(sbi.get().getClass().getName().contains("Box$${I}"));
     }
 }
--- a/test/tools/javac/valhalla/typespec/SpecializedAccessors3.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/SpecializedAccessors3.java	Mon Apr 18 17:33:12 2016 +0100
@@ -47,7 +47,7 @@
         Pair.of(v, "");
 
         Pair.ofAny(v, "");
-        Pair.ofAny(v, 2L);
+        Pair.ofAny(v, 2f);
     }
 
     public static class Pair<any U, any V> {
--- a/test/tools/javac/valhalla/typespec/SpecializedAccessors5.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/SpecializedAccessors5.java	Mon Apr 18 17:33:12 2016 +0100
@@ -47,11 +47,11 @@
     private static <any Z> void g_static(Z z) { }
 
     public static void main(String[] args) {
-        m_static(1L);
-        new SpecializedAccessors5<String>().m("", 1L);
-        new SpecializedAccessors5<String>().m2("", 1L);
-        new SpecializedAccessors5<int>().m(1, 1L);
-        new SpecializedAccessors5<int>().m2(1, 1L);
+        m_static(1f);
+        new SpecializedAccessors5<String>().m("", 1f);
+        new SpecializedAccessors5<String>().m2("", 1f);
+        new SpecializedAccessors5<int>().m(1, 1f);
+        new SpecializedAccessors5<int>().m2(1, 1f);
         new SpecializedAccessors5<String>().m("", new Object());
         new SpecializedAccessors5<String>().m2("", new Object());
         new SpecializedAccessors5<int>().m(1, new Object());
--- a/test/tools/javac/valhalla/typespec/TestSuperBridges.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary check that super calls inside generic methods are bridged correctly
- */
-import com.sun.tools.javac.util.Assert;
-
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-public class TestSuperBridges {
-
-    static class Sup<X> {
-        X m() {
-            return null;
-        }
-
-        X m(X x) {
-            return null;
-        }
-
-        <any Z> X g(Z z) {
-            return null;
-        }
-    }
-
-    static class Sub extends Sup<String> {
-        <any Z> void test1() {
-            super.m();
-        }
-
-        <any Z> void test2() {
-            super.m();
-        }
-
-        void test3() {
-            super.m();
-        }
-
-        <any Z> void test4() {
-            super.m("");
-        }
-
-        <any Z> void test5() {
-            super.g("");
-        }
-
-        <any Z> void test6() {
-            super.g(1);
-        }
-    }
-
-    private static final String BRIDGE_METHOD_NAME = "TestSuperBridges$Sup$m$super";
-
-    public static void main(String... args) throws Exception {
-        Class<?> sub = Class.forName("TestSuperBridges$Sub");
-
-        List<Method> bridges = Stream.of(sub.getDeclaredMethods())
-                .filter(m -> m.getName().contains("$"))
-                .collect(Collectors.toList());
-
-        Assert.check(bridges.size() == 2);
-
-        bridges.forEach(m -> Assert.check(m.getName().equals(BRIDGE_METHOD_NAME)));
-    }
-}
--- a/test/tools/javac/valhalla/typespec/Wildcards08.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/Wildcards08.java	Mon Apr 18 17:33:12 2016 +0100
@@ -38,9 +38,9 @@
     }
 
     void test(Box<any> ba) {
-        Object o1 = ba.x; //access of non-public members on anyfied wildcards not supported yet
+        Object o1 = ba.x; //access of non-public members - ok
         Object o2 = ba.xarr; //array access on anyfied wildcards not supported yet
-        ba.m1(null); //access of non-public members on anyfied wildcards not supported yet
+        ba.m1(null); //access of non-public members - ok
         ba.m2(null); //access of members containing anyfied arrays on anyfied wildcards not supported yet
     }
 }
--- a/test/tools/javac/valhalla/typespec/Wildcards08.out	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/Wildcards08.out	Mon Apr 18 17:33:12 2016 +0100
@@ -1,5 +1,3 @@
-Wildcards08.java:41:23: compiler.err.cant.select.non.virtual: (compiler.misc.virtual.non.public: x)
 Wildcards08.java:42:23: compiler.err.cant.select.non.virtual: (compiler.misc.virtual.anyfied.arrays: xarr)
-Wildcards08.java:43:11: compiler.err.cant.select.non.virtual: (compiler.misc.virtual.non.public: m1(X))
 Wildcards08.java:44:11: compiler.err.cant.select.non.virtual: (compiler.misc.virtual.anyfied.arrays: m2(X[]))
-4 errors
+2 errors
--- a/test/tools/javac/valhalla/typespec/Wildcards11.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/Wildcards11.java	Mon Apr 18 17:33:12 2016 +0100
@@ -48,7 +48,7 @@
 
 	public static void main(String[] args) {
 		new Wildcards11<int>(42).test();
-		new Wildcards11<long>(42L).test();
+		new Wildcards11<float>(42f).test();
 		new Wildcards11<String>("").test();
     }
 }
--- a/test/tools/javac/valhalla/typespec/items/BytecodeMapping.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.lang.annotation.*;
-
-@Repeatable(BytecodeMappings.class)
-@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
-@interface BytecodeMapping {
-    Opcodes opcode();
-    String sig() default "";
-}
-
-@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
-@interface BytecodeMappings {
-    BytecodeMapping[] value();
-}
--- a/test/tools/javac/valhalla/typespec/items/BytecodeMappingHarness.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Check that right opcodes are being marked in the generated bytecode
- * @library /tools/javac/lib
- * @build JavacTestingAbstractProcessor BytecodeMappingHarness
- * @run main BytecodeMappingHarness
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.util.Optional;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.function.Supplier;
-import java.util.stream.Collectors;
-
-import javax.lang.model.element.Element;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
-
-import com.sun.source.tree.MethodTree;
-import com.sun.source.tree.Tree;
-import com.sun.source.util.JavacTask;
-import com.sun.source.util.TaskEvent;
-import com.sun.source.util.TaskEvent.Kind;
-import com.sun.source.util.TaskListener;
-import com.sun.source.util.TreeScanner;
-import com.sun.source.util.Trees;
-import com.sun.tools.classfile.AccessFlags;
-import com.sun.tools.classfile.Attribute;
-import com.sun.tools.classfile.BytecodeMapping_attribute;
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.ConstantPool;
-import com.sun.tools.classfile.ConstantPoolException;
-import com.sun.tools.classfile.Code_attribute;
-import com.sun.tools.classfile.Descriptor.InvalidDescriptor;
-import com.sun.tools.classfile.Method;
-import com.sun.tools.javac.api.BasicJavacTask;
-import com.sun.tools.javac.code.Symbol;
-import com.sun.tools.javac.code.Types;
-import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
-
-import static com.sun.tools.classfile.Attribute.BytecodeMapping;
-import static javax.tools.StandardLocation.SOURCE_PATH;
-import static javax.tools.StandardLocation.CLASS_OUTPUT;
-import static javax.tools.JavaFileObject.Kind.SOURCE;
-
-public class BytecodeMappingHarness {
-
-    static int nerrors = 0;
-
-    static final JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
-    static final StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null);
-    static final File outputDir = new File("out");
-
-    public static void main(String[] args) throws Exception {
-
-        String testDir = System.getProperty("test.src");
-        fm.setLocation(SOURCE_PATH, Arrays.asList(new File(testDir, "tests")));
-
-        //init output dir
-        outputDir.mkdir();
-
-        // Make sure classes are written to scratch dir.
-        fm.setLocation(CLASS_OUTPUT, Arrays.asList(new File("out")));
-
-        for (JavaFileObject jfo : fm.list(SOURCE_PATH, "", Collections.singleton(SOURCE), true)) {
-            new BytecodeMappingHarness(jfo).check();
-        }
-        if (nerrors > 0) {
-            throw new AssertionError("Errors were found");
-        }
-    }
-
-
-    JavaFileObject jfo;
-    Map<ElementKey, List<BytecodeMapping>> bytecodeMappings = new HashMap<>();
-    List<ElementKey> seenBytecodeMappings = new ArrayList<>();
-
-    protected BytecodeMappingHarness(JavaFileObject jfo) {
-        this.jfo = jfo;
-    }
-
-    protected void check() throws Exception {
-        JavacTask ct = (JavacTask) comp.getTask(null, fm, null, null,
-                null, Arrays.asList(jfo));
-        ct.addTaskListener(new BytecodeMappingFinder(ct));
-        System.err.println("compiling code " + jfo);
-        if (!ct.call()) {
-            throw new AssertionError("Error during compilation");
-        }
-
-
-        for (File f : outputDir.listFiles()) {
-            checkClassFile(f);
-            f.delete();
-        }
-
-        //check all candidates have been used up
-        for (ElementKey key : bytecodeMappings.keySet()) {
-            if (!seenBytecodeMappings.contains(key)) {
-                error("Redundant @BytecodeMapping annotation on method: " + key);
-            }
-        }
-    }
-
-    void checkClassFile(File file)
-            throws IOException, ConstantPoolException, InvalidDescriptor {
-        ClassFile classFile = ClassFile.read(file);
-        if (classFile.getName().endsWith("$any")) {
-            return; //skip virtual interface
-        }
-        ConstantPool constantPool = classFile.constant_pool;
-        //lets get all the methods in the class file.
-        for (Method method : classFile.methods) {
-            checkMethod(constantPool, method, getMappingsForDescriptor(classFile.getName(), constantPool, method));
-        }
-    }
-
-    LinkedList<BytecodeMapping> getMappingsForDescriptor(String className, ConstantPool constantPool, Method method)
-            throws ConstantPoolException, InvalidDescriptor {
-        String bytecodeDesc = method.descriptor.getValue(constantPool);
-        bytecodeDesc = bytecodeDesc.substring(0, bytecodeDesc.indexOf(')') + 1);
-        for (Map.Entry<ElementKey, List<BytecodeMapping>> entry : bytecodeMappings.entrySet()) {
-            ElementKey key = entry.getKey();
-            if (key.name.equals(method.getName(constantPool)) &&
-                    key.owner.equals(className) &&
-                    key.erasedSig.equals(bytecodeDesc)) {
-                seenBytecodeMappings.add(entry.getKey());
-                return new LinkedList<>(entry.getValue());
-            }
-        }
-        return new LinkedList<>();
-    }
-
-    void checkMethod(ConstantPool cp, Method method, LinkedList<BytecodeMapping> expectedMappings)
-            throws ConstantPoolException, InvalidDescriptor {
-        String mname = method.getName(cp);
-        if (mname.endsWith("$get") || mname.endsWith("$set") || method.access_flags.is(AccessFlags.ACC_SYNTHETIC)) {
-            //skip virtualized accessors
-            return;
-        }
-        Code_attribute code = (Code_attribute) method.attributes.get(Attribute.Code);
-        BytecodeMapping_attribute bytecodeMapping =
-            (BytecodeMapping_attribute) (method.attributes.get(Attribute.BytecodeMapping));
-
-        Map<Integer, String> instructionMap = new HashMap<>();
-        if (code == null) {
-            System.err.println("Skipping abstract method: " +
-                    method.getName(cp) + method.descriptor.getParameterTypes(cp));
-            return;
-        }
-
-        code.getInstructions().forEach(i->{ instructionMap.put(i.getPC(), i.getMnemonic()); });
-
-        if (bytecodeMapping != null) {
-            for (BytecodeMapping_attribute.Entry entry : bytecodeMapping.bytecode_mapping_table) {
-                if (expectedMappings.isEmpty()) {
-                    error("Missing BytecodeMapping annotations in method: " +
-                            method.getName(cp) + method.descriptor.getParameterTypes(cp));
-                    break;
-                }
-                String mnemonic = instructionMap.get(entry.pc);
-                BytecodeMapping mapping = expectedMappings.peek();
-                if (!mnemonic.equals(mapping.opcode().mnemonic)) {
-                    error("Bad mnemonic @ pc " + entry.pc + ": expected: " +
-                            mapping.opcode().mnemonic +
-                            " - found: " + mnemonic);
-                }
-                String expectedSig = mapping.sig();
-                String foundSig = cp.getUTF8Value(entry.descriptor_index);
-                if (!expectedSig.isEmpty() && !foundSig.equals(expectedSig)) {
-                    error("Bad siganture @ pc " + entry.pc + ": expected: " +
-                            mapping.sig() +
-                            " - found: " + foundSig);
-                }
-                expectedMappings.removeFirst();
-            }
-        }
-
-        if (expectedMappings.size() != 0) {
-            error("Unmatched BytecodeMapping annotations in method: " +
-                    method.getName(cp) + method.descriptor.getParameterTypes(cp));
-        }
-    }
-
-    protected void error(String msg) {
-        nerrors++;
-        System.err.printf("Error occurred while checking file: %s\nreason: %s\n",
-                jfo.getName(), msg);
-    }
-
-    enum AnnotationKind {
-        BYTECODE_MAPPING(BytecodeMapping.class) {
-            List<BytecodeMapping> getMappings(Annotation anno) {
-                return Collections.singletonList((BytecodeMapping)anno);
-            }
-        },
-        BYTECODE_MAPPINGS(BytecodeMappings.class) {
-            List<BytecodeMapping> getMappings(Annotation anno) {
-                return Arrays.asList(((BytecodeMappings)anno).value());
-            }
-        };
-
-        Class<? extends Annotation> annoClass;
-
-        AnnotationKind(Class<? extends Annotation> annoClass) {
-            this.annoClass = annoClass;
-        }
-
-        abstract List<BytecodeMapping> getMappings(Annotation anno);
-    }
-
-    class BytecodeMappingFinder implements TaskListener {
-
-        Types types;
-        Trees trees;
-
-        BytecodeMappingFinder(JavacTask jt) {
-            types = Types.instance(((BasicJavacTask)jt).getContext());
-            trees = Trees.instance(jt);
-        }
-
-        @Override
-        public void started(TaskEvent e) {
-            //do nothing
-        }
-
-        @Override
-        public void finished(TaskEvent e) {
-            if (e.getKind() == Kind.ANALYZE) {
-                Tree tree = trees.getTree(e.getTypeElement());
-                new TreeScanner<Object, Object>() {
-                    @Override
-                    public Object visitMethod(MethodTree node, Object o) {
-                        Element e = ((JCMethodDecl)node).sym;
-                        for (AnnotationKind ak : AnnotationKind.values()) {
-                            Annotation annotation = e.getAnnotation(ak.annoClass);
-                            if (annotation != null) {
-                                bytecodeMappings.put(new ElementKey(e, types), ak.getMappings(annotation));
-                            }
-                        }
-                        return super.visitMethod(node, o);
-                    }
-                }.scan(tree, null);
-            }
-        }
-    }
-
-    class ElementKey {
-
-        String erasedSig;
-        String name;
-        String owner;
-
-        public ElementKey(Element elem, Types types) {
-            Optional<TemplateMethod> templateMethod = Optional.ofNullable(elem.getAnnotation(TemplateMethod.class));
-            this.name = choose(templateMethod, TemplateMethod::name, () -> elem.getSimpleName().toString());
-            this.owner = choose(templateMethod, TemplateMethod::owner, () -> ((Symbol)elem.getEnclosingElement()).flatName().toString());
-            this.erasedSig = choose(templateMethod, TemplateMethod::sig, () -> computeErasedSignature(elem, types));
-            System.err.println("Entry = " + toString());
-        }
-
-        private String choose(Optional<TemplateMethod> templateMethod, Function<TemplateMethod, String> func, Supplier<String> defaultFunc) {
-            return templateMethod.<String>flatMap(templateMethod1 -> {
-                String val = func.apply(templateMethod.get());
-                return val.isEmpty() ? Optional.empty() : Optional.of(val);
-            }).orElseGet(defaultFunc);
-        }
-
-        private String computeErasedSignature(Element elem, Types types) {
-            return ((Symbol)elem).externalType(types).getParameterTypes().stream()
-                    .map(types::typeSig)
-                    .collect(Collectors.joining("", "(", ")"));
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj instanceof ElementKey) {
-                ElementKey other = (ElementKey)obj;
-                return other.owner.equals(owner) &&
-                        other.name.equals(name) &&
-                        other.erasedSig.equals(erasedSig);
-            }
-            return false;
-        }
-
-        @Override
-        public int hashCode() {
-            return owner.hashCode() << 8
-                    + name.hashCode() << 16
-                    + erasedSig.hashCode();
-        }
-
-        @Override
-        public String toString() {
-            return String.format("Key{name=%s;owner=%s;desc=%s}", name, owner, erasedSig);
-        }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/Opcodes.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-enum Opcodes {
-    ACONST_NULL("aconst_null"),
-    ALOAD("aload"),
-    ALOAD_0("aload_0"),
-    ALOAD_1("aload_1"),
-    ALOAD_2("aload_2"),
-    ALOAD_3("aload_3"),
-    ASTORE("astore"),
-    ASTORE_0("astore_0"),
-    ASTORE_1("astore_1"),
-    ASTORE_2("astore_2"),
-    ASTORE_3("astore_3"),
-    AALOAD("aaload"),
-    AASTORE("aastore"),
-    ARETURN("areturn"),
-    DUP("dup"),
-    DUP_X1("dup_x1"),
-    DUP_X2("dup_x2"),
-    POP("pop"),
-    LDC("ldc"),
-    LDC_W("ldc_w"),
-    IF_ACMPEQ("if_acmpeq"),
-    IF_ACMPNE("if_acmpne"),
-    CHECKCAST("checkcast"),
-    INSTANCEOF("instanceof"),
-    ANEWARRAY("anewarray"),
-    MULTIANEWARRAY("multianewarray"),
-    NEW("new"),
-    GETFIELD("getfield"),
-    PUTFIELD("putfield"),
-    INVOKEVIRTUAL("invokevirtual"),
-    INVOKEINTERFACE("invokeinterface"),
-    INVOKESPECIAL("invokespecial"),
-    INVOKEDYNAMIC("invokedynamic");
-
-    String mnemonic;
-
-    Opcodes(String mnemonic) {
-        this.mnemonic = mnemonic;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/TemplateMethod.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.lang.annotation.*;
-
-@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
-@interface TemplateMethod {
-    String name() default "";
-    String sig() default "";
-    String owner() default "";
-}
--- a/test/tools/javac/valhalla/typespec/items/m3/PoolMappingHarness.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/items/m3/PoolMappingHarness.java	Mon Apr 18 17:33:12 2016 +0100
@@ -146,7 +146,7 @@
     }
 
     protected void check() throws Exception {
-        JavacTask ct = (JavacTask) comp.getTask(null, fm, null, Arrays.asList("-XDgenericClassFile"),
+        JavacTask ct = (JavacTask) comp.getTask(null, fm, null, null,
                 null, Arrays.asList(jfo));
         ct.addTaskListener(new PoolMappingFinder(ct));
         System.err.println("compiling code " + jfo);
--- a/test/tools/javac/valhalla/typespec/items/tests/TestAnyMembers.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestAnyMembers {
-
-    static class AnyClass<any T> {
-        T t;
-        void test() { }
-    }
-
-    interface AnyInterface<any T> {
-        T test();
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD, sig = "LTestAnyMembers$AnyClass<TZ;>;::TZ;")
-    @BytecodeMapping(opcode=Opcodes.ASTORE_2, sig = "TZ;")
-    <any Z> void testField(AnyClass<Z> ac) {
-        Z z = ac.t;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEVIRTUAL, sig = "LTestAnyMembers$AnyClass<TZ;>;::()V")
-    <any Z> void testInvokeVirtual(AnyClass<Z> ac) {
-        ac.test();
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEINTERFACE, sig = "LTestAnyMembers$AnyInterface<TZ;>;::()TZ;")
-    @BytecodeMapping(opcode=Opcodes.ASTORE_2, sig = "TZ;")
-    <any Z> void testInvokeInterface(AnyInterface<Z> ai) {
-        Z z = ai.test();
-    }
-
-    <Z> void testNegField(AnyClass<Z> ac) {
-        Z z = ac.t;
-    }
-
-    <Z> void testNegInvokeVirtual(AnyClass<Z> ac) {
-        ac.test();
-    }
-
-    <Z> void testNegInvokeInterface(AnyInterface<Z> ai) {
-        ai.test();
-    }
-
-    <Z> void testNegInvokeVirtualArrayAnyClass(AnyClass<Z>[] ac_arr) {
-        ac_arr.toString();
-    }
-
-    <Z> void testNegInvokeVirtualArrayAnyVar(Z[] z_arr) {
-        z_arr.toString();
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD, sig = "LTestAnyMembers$AnyClass<+TZ;>;::TZ;")
-    @BytecodeMapping(opcode=Opcodes.ASTORE_2, sig = "TZ;")
-    <any Z> void testExtField(AnyClass<? extends Z> ac) {
-        Z z = ac.t;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEVIRTUAL, sig = "LTestAnyMembers$AnyClass<+TZ;>;::()V")
-    <any Z> void testExtInvokeVirtual(AnyClass<? extends Z> ac) {
-        ac.test();
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEINTERFACE, sig = "LTestAnyMembers$AnyInterface<+TZ;>;::()TZ;")
-    <any Z> void testExtInvokeInterface(AnyInterface<? extends Z> ai) {
-        ai.test();
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2, sig = "TZ;")
-    @BytecodeMapping(opcode=Opcodes.PUTFIELD, sig = "LTestAnyMembers$AnyClass<-TZ;>;::TZ;")
-    <any Z> void testSupField(AnyClass<? super Z> ac, Z z) {
-        ac.t = z;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEVIRTUAL, sig = "LTestAnyMembers$AnyClass<-TZ;>;::()V")
-    <any Z> void testSupInvokeVirtual(AnyClass<? super Z> ac) {
-        ac.test();
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEINTERFACE, sig = "LTestAnyMembers$AnyInterface<-TZ;>;::()TZ;")
-    <any Z> void testSupInvokeInterface(AnyInterface<? super Z> ai) {
-        ai.test();
-    }
-
-    void testUnboundField(AnyClass<?> ac) {
-        Object z = ac.t;
-    }
-
-    void testUnboundInvokeVirtual(AnyClass<?> ac) {
-        ac.test();
-    }
-
-    void testUnboundInvokeInterface(AnyInterface<?> ai) {
-        ai.test();
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestArrayLoadAndStore.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestArrayLoadAndStore {
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.AASTORE)
-    @BytecodeMapping(opcode=Opcodes.AALOAD)
-    @BytecodeMapping(opcode=Opcodes.ASTORE_1)
-    static <any T> void test(T[] tarr, T t) {
-        tarr[0] = t;
-        t = tarr[0];
-    }
-
-    static <T> void testNeg(T[] tarr, T t) {
-        tarr[0] = t;
-        t = tarr[0];
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestBinary.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestBinary<any T> {
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPNE, sig = "TT;")
-    public boolean testAnd01(T t, Object obj) {
-        return obj != null && t == t;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPNE, sig = "TT;")
-    public boolean testAnd10(T t, Object obj) {
-        return t == t && obj != null;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPNE, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPNE, sig = "TT;")
-    public boolean testAnd11(T t, Object obj) {
-        return t == t && t == t;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPNE, sig = "TT;")
-    public boolean testOr01(T t, Object obj) {
-        return obj != null || t == t;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPEQ, sig = "TT;")
-    public boolean testOr10(T t, Object obj) {
-        return t == t || obj != null;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPEQ, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.IF_ACMPNE, sig = "TT;")
-    public boolean testOr11(T t, Object obj) {
-        return t == t || t == t;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestCapture.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestCapture<any X> {
-    static class AnyClass<any X> { }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC, sig = "(LTestCapture<TX;>;LTestCapture$AnyClass<-TX;>;)V::{0=LTestCapture<TX;>;&2=TX;}")
-    void testInvokeSuper(AnyClass<? super X> a) {
-        m(a);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC, sig = "(LTestCapture<TX;>;LTestCapture$AnyClass<+TX;>;)V::{0=LTestCapture<TX;>;&2=TX;}")
-    void testInvokeExtends(AnyClass<? extends X> a) {
-        m(a);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.NEW, sig = "LTestCapture$Wrap<-TX;>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL, sig = "LTestCapture$Wrap<-TX;>;::(LTestCapture$AnyClass<-TX;>;)V")
-    void testNewSuper(AnyClass<? super X> a) {
-        new Wrap<>(a);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.NEW, sig = "LTestCapture$Wrap<+TX;>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL, sig = "LTestCapture$Wrap<+TX;>;::(LTestCapture$AnyClass<+TX;>;)V")
-    void testNewExtends(AnyClass<? extends X> a) {
-        new Wrap<>(a);
-    }
-
-    static class Wrap<any X> {
-        Wrap(AnyClass<X> a) { }
-    }
-
-    <any Z> void m(AnyClass<Z> anyClass) { }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestCast.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestCast {
-
-    static class AnyClass<any T> { }
-
-    void test1(AnyClass<int> li) {
-        Object o = (AnyClass<int>)li;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    <any Z> void test2() {
-        Object o = (AnyClass<Z>)null;
-    }
-
-    <Z> void test3() {
-        Object o = (AnyClass<Z>)null;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    <any Z> void test4() {
-        Object o = (Z[])null;
-        o = (Z[][])null;
-    }
-
-    <Z> void test5() {
-        Object o = (Z[])null;
-        o = (Z[][])null;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestClassLit.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestClassLit {
-
-    static class AnyClass<any T> { }
-
-    @BytecodeMapping(opcode = Opcodes.LDC, sig = "LTestClassLit$AnyClass<TZ;>;")
-    <any Z> void testAny() {
-        Class<?> c = AnyClass<Z>.class;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.LDC, sig = "[LTestClassLit$AnyClass<TZ;>;")
-    <any Z> void testAnyArray() {
-        Class<?> c = AnyClass<Z>[].class;
-    }
-
-    void testSpecialized() {
-        Class<?> c = AnyClass<int>.class;
-    }
-
-    void testSpecializedArray() {
-        Class<?> c = AnyClass<int>[].class;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestCmp.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestCmp {
-
-    static class AnyClass<any T> {
-        boolean cond;
-        T t;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNe(T t1, T t2) {
-        boolean b = t1 == t2;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEq(T t1, T t2) {
-        boolean b = t1 != t2;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeWhile(T t1, T t2) {
-        while (t1 == t2) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqWhile(T t1, T t2) {
-        while (t1 != t2) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeDo(T t1, T t2) {
-        do { } while (t1 != t2);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqDo(T t1, T t2) {
-        do { } while (t1 == t2);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeFor(T t1, T t2) {
-        for (; t1 == t2 ;) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqFor(T t1, T t2) {
-        for (; t1 != t2 ;) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeIf(T t1, T t2) {
-        if (t1 == t2) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqIf(T t1, T t2) {
-        if (t1 != t2) { };
-    }
-
-    <T> void testNegCmpNe(T t1, T t2) {
-        boolean b = t1 == t2;
-    }
-
-    <T> void testNegCmpEq(T t1, T t2) {
-        boolean b = t1 != t2;
-    }
-
-    <T> void testNegCmpNeWhile(T t1, T t2) {
-        while (t1 == t2) { };
-    }
-
-    <T> void testNegCmpEqWhile(T t1, T t2) {
-        while (t1 != t2) { };
-    }
-
-    <T> void testNegCmpNeDo(T t1, T t2) {
-        do { } while (t1 != t2);
-    }
-
-    <T> void testNegCmpEqDo(T t1, T t2) {
-        do { } while (t1 == t2);
-    }
-
-    <T> void testNegCmpNeFor(T t1, T t2) {
-        for (; t1 == t2; ) {
-        }
-        ;
-    }
-
-    <T> void testNegCmpEqFor(T t1, T t2) {
-        for (; t1 != t2 ;) { };
-    }
-
-    <T> void testNegCmpNeIf(T t1, T t2) {
-        if (t1 == t2) { };
-    }
-
-    <T> void testNegCmpEqIf(T t1, T t2) {
-        if (t1 != t2) { };
-    }
-    
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeField(AnyClass<T> t1, AnyClass<T> t2) {
-        boolean b = t1.t == t2.t;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqField(AnyClass<T> t1, AnyClass<T> t2) {
-        boolean b = t1.t != t2.t;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeWhileField(AnyClass<T> t1, AnyClass<T> t2) {
-        while (t1.t == t2.t) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqWhileField(AnyClass<T> t1, AnyClass<T> t2) {
-        while (t1.t != t2.t) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeDoField(AnyClass<T> t1, AnyClass<T> t2) {
-        do { } while (t1.t != t2.t);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqDoField(AnyClass<T> t1, AnyClass<T> t2) {
-        do { } while (t1.t == t2.t);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeForField(AnyClass<T> t1, AnyClass<T> t2) {
-        for (; t1.t == t2.t ;) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqForField(AnyClass<T> t1, AnyClass<T> t2) {
-        for (; t1.t != t2.t ;) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPNE)
-    <any T> void testCmpNeIfField(AnyClass<T> t1, AnyClass<T> t2) {
-        if (t1.t == t2.t) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    @BytecodeMapping(opcode=Opcodes.IF_ACMPEQ)
-    <any T> void testCmpEqIfField(AnyClass<T> t1, AnyClass<T> t2) {
-        if (t1.t != t2.t) { };
-    }
-
-    <T> void testNegCmpNeField(AnyClass<T> t1, AnyClass<T> t2) {
-        boolean b = t1.t == t2.t;
-    }
-
-    <T> void testNegCmpEqField(AnyClass<T> t1, AnyClass<T> t2) {
-        boolean b = t1.t != t2.t;
-    }
-
-    <T> void testNegCmpNeWhileField(AnyClass<T> t1, AnyClass<T> t2) {
-        while (t1.t == t2.t) { };
-    }
-
-    <T> void testNegCmpEqWhileField(AnyClass<T> t1, AnyClass<T> t2) {
-        while (t1.t != t2.t) { };
-    }
-
-    <T> void testNegCmpNeDoField(AnyClass<T> t1, AnyClass<T> t2) {
-        do { } while (t1.t != t2.t);
-    }
-
-    <T> void testNegCmpEqDoField(AnyClass<T> t1, AnyClass<T> t2) {
-        do { } while (t1.t == t2.t);
-    }
-
-    <T> void testNegCmpNeForField(AnyClass<T> t1, AnyClass<T> t2) {
-        for (; t1.t == t2.t ;) { };
-    }
-
-    <T> void testNegCmpEqForField(AnyClass<T> t1, AnyClass<T> t2) {
-        for (; t1.t != t2.t ;) { };
-    }
-
-    <T> void testNegCmpNeIfField(AnyClass<T> t1, AnyClass<T> t2) {
-        if (t1.t == t2.t) { };
-    }
-
-    <T> void testNegCmpEqIfField(AnyClass<T> t1, AnyClass<T> t2) {
-        if (t1.t != t2.t) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpNeFieldUnary(AnyClass<T> t1) {
-        boolean b = !t1.cond;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpEqFieldUnary(AnyClass<T> t1) {
-        boolean b = t1.cond;
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpNeWhileFieldUnary(AnyClass<T> t1) {
-        while (!t1.cond) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpEqWhileFieldUnary(AnyClass<T> t1) {
-        while (t1.cond) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpNeDoFieldUnary(AnyClass<T> t1) {
-        do { } while (!t1.cond);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpEqDoFieldUnary(AnyClass<T> t1) {
-        do { } while (t1.cond);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpNeForFieldUnary(AnyClass<T> t1) {
-        for (; !t1.cond ;) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpEqForFieldUnary(AnyClass<T> t1) {
-        for (; t1.cond ;) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpNeIfFieldUnary(AnyClass<T> t1) {
-        if (!t1.cond) { };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.GETFIELD)
-    <any T> void testCmpEqIfFieldUnary(AnyClass<T> t1) {
-        if (t1.cond) { };
-    }
-
-    <T> void testNegCmpNeFieldUnary(AnyClass<T> t1) {
-        boolean b = !t1.cond;
-    }
-
-    <T> void testNegCmpEqFieldUnary(AnyClass<T> t1) {
-        boolean b = t1.cond;
-    }
-
-    <T> void testNegCmpNeWhileFieldUnary(AnyClass<T> t1) {
-        while (!t1.cond) { };
-    }
-
-    <T> void testNegCmpEqWhileFieldUnary(AnyClass<T> t1) {
-        while (t1.cond) { };
-    }
-
-    <T> void testNegCmpNeDoFieldUnary(AnyClass<T> t1) {
-        do { } while (!t1.cond);
-    }
-
-    <T> void testNegCmpEqDoFieldUnary(AnyClass<T> t1) {
-        do { } while (t1.cond);
-    }
-
-    <T> void testNegCmpNeForFieldUnary(AnyClass<T> t1) {
-        for (; !t1.cond ;) { };
-    }
-
-    <T> void testNegCmpEqForFieldUnary(AnyClass<T> t1) {
-        for (; t1.cond ;) { };
-    }
-
-    <T> void testNegCmpNeIfFieldUnary(AnyClass<T> t1) {
-        if (!t1.cond) { };
-    }
-
-    <T> void testNegCmpEqIfFieldUnary(AnyClass<T> t1) {
-        if (t1.cond) { };
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestDefault.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestDefault<any X> {
-
-    <Z> void testNotAny() {
-        Z z = Z.default;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ACONST_NULL)
-    @BytecodeMapping(opcode = Opcodes.ASTORE_1)
-    <any Z> void testAny() {
-        Z z = Z.default;
-    }
-
-    __WhereRef(X) void testRef() {
-        X x = X.default;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ACONST_NULL)
-    @BytecodeMapping(opcode = Opcodes.ASTORE_1)
-    @TemplateMethod(name = "template$testVal")
-    __WhereVal(X) void testVal() {
-        X x = X.default;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestDup.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestDup {
-
-    static class AnyClass<any T> {
-
-        T t;
-
-        @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-        @BytecodeMapping(opcode=Opcodes.DUP)
-        @BytecodeMapping(opcode=Opcodes.ASTORE_1)
-        @BytecodeMapping(opcode=Opcodes.ASTORE_0)
-        static <any T> void test_dup(T t1, T t2, T t3) {
-            t1 = (t2 = t3);
-        }
-
-        @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-        @BytecodeMapping(opcode=Opcodes.DUP_X1)
-        @BytecodeMapping(opcode=Opcodes.PUTFIELD)
-        @BytecodeMapping(opcode=Opcodes.ASTORE_1)
-        void test_dup_x1(T t1, T t2) {
-            t1 = (t = t2);
-        }
-    }
-
-    static class NonAnyClass<T> {
-
-        T t;
-
-        static <T> void testNeg_dup(T t1, T t2, T t3) {
-            t1 = (t2 = t3);
-        }
-
-        void testNeg_dup_x1(T t1, T t2) {
-            t1 = (t = t2);
-        }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestForeach.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestForeach<any T> {
-
-    static class Box<any T> {
-	    void g(T t) { }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.AALOAD, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ASTORE, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.ALOAD, sig = "TT;")
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-    public <any T> void testAnyForEach(T[] t_arr, Box<? super T> b) {
-        for (T t : t_arr) {
-            b.g(t);
-        }
-    }
-
-    public <T> void testPlainForEach(T[] t_arr, Box<? super T> b) {
-        for (T t : t_arr) {
-            b.g(t);
-        }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestGeneric2GenericCall.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestGeneric2GenericCall {
-
-    static class List<any Z> { }
-
-    @BytecodeMapping(opcode=Opcodes.NEW)
-    @BytecodeMapping(opcode=Opcodes.INVOKESPECIAL)
-    @BytecodeMapping(opcode=Opcodes.CHECKCAST, sig = "LTestGeneric2GenericCall$List<TZ;>;")
-    static <any Z> List<Z> list(Z z) { return id(new List<Z>()); }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_0)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    static <any Z> Z id(Z z) { return z; }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_0)
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig = "(TZ;)TZ;::{2=TZ;&3=TZ;}")
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig = "(TZ;)TZ;::{2=TZ;&3=TZ;}")
-    @BytecodeMapping(opcode=Opcodes.POP)
-    static <any Z> void testNestedIdAny(Z z) {
-        id(id(z));
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig = "(I)I")
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig = "(I)I")
-    static void testNestedIdPrimitive() {
-        id(id(1));
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestGenericSpecializedConstructor.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestGenericSpecializedConstructor {
-
-    static class Foo<any X> {
-        <any Z> Foo(Z z) { }
-        <Z> Foo(Z z1, Z z2) { }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(I)LTestGenericSpecializedConstructor$Foo<Ljava/lang/Object;>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(I)LTestGenericSpecializedConstructor$Foo<I>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(I)LTestGenericSpecializedConstructor$Foo<TZ;>;::{0=LTestGenericSpecializedConstructor$Foo<TZ;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(I)LTestGenericSpecializedConstructor$Foo<Ljava/lang/Object;>;")
-    <any Z, V> void testAny() {
-        Foo<String> foo1 = new Foo<String>(1);
-        Foo<int> foo2 = new Foo<int>(1);
-        Foo<Z> foo3 = new Foo<Z>(1);
-        Foo<V> foo4 = new Foo<V>(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.NEW,
-                     sig = "LTestGenericSpecializedConstructor$Foo<TZ;>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL,
-                     sig = "LTestGenericSpecializedConstructor$Foo<TZ;>;::(Ljava/lang/Object;Ljava/lang/Object;)V")
-    <any Z, V> void testNonAny() {
-        Foo<String> foo1 = new Foo<String>(1, 2);
-        Foo<int> foo2 = new Foo<int>(1, 2);
-        Foo<Z> foo3 = new Foo<Z>(1, 2);
-        Foo<V> foo4 = new Foo<V>(1, 2);
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestIndy.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestIndy {
-    static class Box<any T> {
-        <any U> Box<U> dup(U z) { return null; }
-        static <any U> Box<U> dupStatic(U z) { return null; }
-    }
-
-    static class TwoBox<any T, any U> {
-        static <any T, any U> TwoBox<T, U> make(T t, U u) { return null; }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestIndy$Box<TZ;>;I)LTestIndy$Box<I>;::{0=LTestIndy$Box<TZ;>;}")
-    <any Z> void testAny(Box<Z> bz) {
-        Box<int> bi = bz.dup(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(LTestIndy$Box<TZ;>;I)LTestIndy$Box<I>;::{0=LTestIndy$Box<TZ;>;}")
-    <any Z> void testAnyExplicit(Box<Z> bz) {
-        Box<int> bi = bz.<int>dup(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(I)LTestIndy$Box<I>;::{0=LTestIndy$Box<TT;>;}")
-    <any Z> void testAnyStatic() {
-        Box<int> bi = Box.dupStatic(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(I)LTestIndy$Box<I>;::{0=LTestIndy$Box<TT;>;}")
-    <any Z> void testAnyStaticExplicit() {
-        Box<int> bi = Box.<int>dupStatic(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(LTestIndy$Box<J>;I)LTestIndy$Box<I>;")
-    void testSpecialized() {
-        Box<long> bl = null;
-        Box<int> bi = bl.dup(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(LTestIndy$Box<J>;I)LTestIndy$Box<I>;")
-    void testSpecializedExplicit() {
-        Box<long> bl = null;
-        Box<int> bi = bl.<int>dup(1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(ILjava/lang/Object;)LTestIndy$TwoBox<ILjava/lang/Object;>;::{0=LTestIndy$TwoBox<TT;TU;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(Ljava/lang/Object;I)LTestIndy$TwoBox<Ljava/lang/Object;I>;::{0=LTestIndy$TwoBox<TT;TU;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(II)LTestIndy$TwoBox<II>;::{0=LTestIndy$TwoBox<TT;TU;>;}")
-    void testMultipleArgs() {
-        TwoBox.make(1, "");
-        TwoBox.make("", 1);
-        TwoBox.make("", "");
-        TwoBox.make(1, 1);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(ILjava/lang/Object;)LTestIndy$TwoBox<ILjava/lang/Object;>;::{0=LTestIndy$TwoBox<TT;TU;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(Ljava/lang/Object;I)LTestIndy$TwoBox<Ljava/lang/Object;I>;::{0=LTestIndy$TwoBox<TT;TU;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-            sig = "(II)LTestIndy$TwoBox<II>;::{0=LTestIndy$TwoBox<TT;TU;>;}")
-    void testMultipleArgsExplicit() {
-        TwoBox.<int, String>make(1, "");
-        TwoBox.<String, int>make("", 1);
-        TwoBox.<String, String>make("", "");
-        TwoBox.<int, int>make(1, 1);
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestIndyErasure.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestIndyErasure {
-    static class Sup<any X> {
-        @BytecodeMapping(opcode = Opcodes.ALOAD_1)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        <any Z> X m(X x, Z z) { return x; }
-    }
-
-    static class Sub<Y extends Runnable> extends Sup<Y> {
-
-        @BytecodeMapping(opcode = Opcodes.ALOAD_2)
-        @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestIndyErasure$Sub<Ljava/lang/Runnable;>;Ljava/lang/Object;TU;)Ljava/lang/Object;::{2=TU;}")
-        <any U> void test(Y y, U u) {
-            Runnable r = m(y, u);
-        }
-
-        @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestIndyErasure$Sub<Ljava/lang/Runnable;>;Ljava/lang/Object;I)Ljava/lang/Object;")
-        void test2(Y y) {
-            Runnable r = m(y, 1);
-        }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestIndyFactory.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestIndyFactory {
-
-    static class Box<any T> {
-        T t;
-
-        static <any U> Box<U> make(U u) { return null; }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(TZ;)LTestIndyFactory$Box<TZ;>;::{0=LTestIndyFactory$Box<TT;>;&2=TZ;}")
-    @BytecodeMapping(opcode = Opcodes.GETFIELD,
-                     sig = "LTestIndyFactory$Box<TZ;>;::TZ;")
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any Z> void testAny(Z z) {
-        Z z2 = Box.make(z).t;
-    }
-
-    <Z> void testNonAny(Z z) {
-        Z z2 = Box.make(z).t;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestInheritedAnyMembers.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestInheritedAnyMembers {
-    static abstract class Function<any A, any R> {
-	    A a;
-        abstract R apply(A t);
-    }
-
-    static abstract class UnaryOperator<any T> extends Function<T, T> {
-        @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-        UnaryOperator() { }
-    }
-
-    static abstract class IntFunction<any A> extends Function<A, int> {
-        @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-        IntFunction() { }
-    }
-
-    static abstract class IntIntFunction extends IntFunction<int> { }
-
-    @BytecodeMapping(opcode = Opcodes.GETFIELD, sig = "LTestInheritedAnyMembers$UnaryOperator<TE;>;::TE;")
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any E> void var_any(UnaryOperator<E> operator) {
-        E e = operator.a;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.GETFIELD, sig = "LTestInheritedAnyMembers$IntFunction<TE;>;::TE;")
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any E> void var_partial(IntFunction<E> function) {
-        E e = function.a;
-    }
-
-    void var_specialized(IntIntFunction function) {
-        int i = function.a;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL, sig = "LTestInheritedAnyMembers$UnaryOperator<TE;>;::(TE;)TE;")
-    @BytecodeMapping(opcode = Opcodes.POP)
-    <any E> void inv_any(UnaryOperator<E> operator, E e) {
-        operator.apply( e );
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL, sig = "LTestInheritedAnyMembers$IntFunction<TE;>;::(TE;)I")
-    <any E> void inv_partial(IntFunction<E> function, E e) {
-        function.apply( e );
-    }
-
-    void inv_specialized(IntIntFunction function, int i) {
-        function.apply( i );
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestInner.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestInner {
-
-    static class Box<any T> {
-
-        T t;
-
-        class Inner<any U> {
-
-            U u;
-
-            @BytecodeMapping(opcode = Opcodes.PUTFIELD,
-                             sig = "LTestInner$Box<TT;>.Inner<TU;>;::LTestInner$Box<TT;>;")
-            Inner() { }
-
-            @BytecodeMapping(opcode = Opcodes.GETFIELD,
-                             sig = "LTestInner$Box<TT;>.Inner<TU;>;::LTestInner$Box<TT;>;")
-            @BytecodeMapping(opcode = Opcodes.GETFIELD,
-                             sig = "LTestInner$Box<TT;>;::TT;")
-            @BytecodeMapping(opcode = Opcodes.ARETURN,
-                             sig = "TT;")
-            T getT() { return t; }
-
-            @BytecodeMapping(opcode = Opcodes.GETFIELD,
-                             sig = "LTestInner$Box<TT;>.Inner<TU;>;::TU;")
-            @BytecodeMapping(opcode = Opcodes.ARETURN,
-                             sig = "TU;")
-            U getU() { return u; }
-        }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestInstanceof.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestInstanceof {
-
-    static class AnyClass<any T> { }
-
-    @BytecodeMapping(opcode = Opcodes.INSTANCEOF, sig = "TZ;")
-    @BytecodeMapping(opcode = Opcodes.INSTANCEOF, sig = "[TZ;")
-    <any Z> void testAny(Object o) {
-        boolean b1 = o instanceof Z;
-        boolean b2 = o instanceof Z[];
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INSTANCEOF, sig = "LTestInstanceof$AnyClass<TZ;>;")
-    @BytecodeMapping(opcode = Opcodes.INSTANCEOF, sig = "[LTestInstanceof$AnyClass<TZ;>;")
-    <any Z> void testAnyClass(Object o) {
-        boolean b1 = o instanceof AnyClass<Z>;
-        boolean b2 = o instanceof AnyClass<Z>[];
-    }
-
-    <any Z> void testSpecialized(Object o) {
-        boolean b1 = o instanceof AnyClass<int>;
-        boolean b2 = o instanceof AnyClass<int>[];
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestLambda.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-abstract class TestLambda {
-    interface Function<any A, any R> {
-	    R apply(A a);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig="()LTestLambda$Function<TZ;TZ;>;::{0=(TZ;)TZ;&2=(TZ;)TZ;&6=(TZ;)TZ;&9=TZ;}")
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig="(Z)LTestLambda$Function<TZ;TZ;>;::{0=(TZ;)TZ;&2=(TZ;)TZ;&6=(ZTZ;)TZ;&9=TZ;}")
-    <any Z> void test(boolean cond) {
-		Function<Z, Z> fzz1 = x -> x;
-		Function<Z, Z> fzz2 = (x) -> { if (cond) { return x; } else { return x; } };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig="(TZ;)LTestLambda$Function<TZ;TZ;>;::{0=(TZ;)TZ;&2=(TZ;)TZ;&6=(TZ;TZ;)TZ;&9=TZ;}")
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC, sig="(ZTZ;)LTestLambda$Function<TZ;TZ;>;::{0=(TZ;)TZ;&2=(TZ;)TZ;&6=(ZTZ;TZ;)TZ;&9=TZ;}")
-    <any Z> void testCapture(boolean cond, Z z) {
-		Function<Z, Z> fzz1 = x -> z;
-		Function<Z, Z> fzz2 = (x) -> { if (cond) { return z; } else { return z; } };
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_0)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @TemplateMethod(name = "lambda$test$0")
-    Object lambda1(Object o) { return null; }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @TemplateMethod(name = "lambda$test$1")
-    Object lambda2(boolean b, Object o) { return null; }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_0)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @TemplateMethod(name = "lambda$testCapture$2")
-    Object lambda3(Object z, Object o) { return null; }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @TemplateMethod(name = "lambda$testCapture$3")
-    Object lambda4(boolean b, Object z, Object o) { return null; }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestLoadAndStore.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestLoadAndStore {
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_0)
-    @BytecodeMapping(opcode=Opcodes.ASTORE_0)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ASTORE_1)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_2)
-    @BytecodeMapping(opcode=Opcodes.ASTORE_2)
-    @BytecodeMapping(opcode=Opcodes.ALOAD_3)
-    @BytecodeMapping(opcode=Opcodes.ASTORE_3)
-    @BytecodeMapping(opcode=Opcodes.ALOAD)
-    @BytecodeMapping(opcode=Opcodes.ASTORE)
-    static <any T> void test(T t0, T t1, T t2, T t3, T t4) {
-        t0 = t0;
-        t1 = t1;
-        t2 = t2;
-        t3 = t3;
-        t4 = t4;
-    }
-
-    static <T> void testNeg(T t0, T t1, T t2, T t3, T t4) {
-        t0 = t0;
-        t1 = t1;
-        t2 = t2;
-        t3 = t3;
-        t4 = t4;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestNestedGenerics.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestNestedGenerics {
-
-    static class AnyClass<any T> {
-        T t;
-
-        @BytecodeMapping(opcode = Opcodes.GETFIELD)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        T get() { return t; };
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.GETFIELD)
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any Z> void testFieldAny(AnyClass<AnyClass<Z>> z) {
-        Z z2 = z.t.t;
-    }
-
-    <Z> void testFieldNonAny(AnyClass<AnyClass<Z>> z) {
-        Z z2 = z.t.t;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any Z> void testMethodAny(AnyClass<AnyClass<Z>> z) {
-        Z z2 = z.get().get();
-    }
-
-    <Z> void testMethodNonAny(AnyClass<AnyClass<Z>> z) {
-        Z z2 = z.get().get();
-    }
-
-    <any Z> void testNewAny() {
-        new AnyClass<AnyClass<Z>>();
-    }
-
-    <Z> void testNewNonAny() {
-        new AnyClass<AnyClass<Z>>();
-    }
-
-    static <any T> void testLocal() {
-         class Local {
-            private T state;
-
-            @BytecodeMapping(opcode = Opcodes.GETFIELD)
-            @BytecodeMapping(opcode = Opcodes.ARETURN)
-            public T get() {
-                return state; // <-- needs a mapping
-            }
-         }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestNew.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestNew {
-
-    static class AnyClass<any T> {
-        T value;
-
-        @BytecodeMapping(opcode = Opcodes.GETFIELD)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        T get() { return value; }
-
-        @BytecodeMapping(opcode = Opcodes.NEW)
-        @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-        @BytecodeMapping(opcode = Opcodes.GETFIELD)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        T testField() {
-            return new AnyClass<T>().value;
-        }
-
-        @BytecodeMapping(opcode = Opcodes.NEW)
-        @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-        @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        T testMethod() {
-            return new AnyClass<T>().get();
-        }
-    }
-
-    void test1() {
-        new AnyClass<int>();
-    }
-
-    @BytecodeMapping(opcode = Opcodes.NEW)
-    @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-    <any Z> void test2() {
-        new AnyClass<Z>();
-    }
-
-    <Z> void test3() {
-        new AnyClass<Z>();
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestNewArray.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestNewArray {
-
-    static class AnyClass<any T> { }
-
-    @BytecodeMapping(opcode = Opcodes.ANEWARRAY)
-    @BytecodeMapping(opcode = Opcodes.MULTIANEWARRAY)
-    <any Z> void testAnyArray() {
-        Z[] z_arr1 = new Z[2];
-        Z[][] z_arr2 = new Z[2][4];
-    }
-
-    @BytecodeMapping(opcode = Opcodes.ANEWARRAY)
-    @BytecodeMapping(opcode = Opcodes.MULTIANEWARRAY)
-    <any Z> void testAnyClassArray() {
-        AnyClass<Z>[] z_arr1 = new AnyClass<Z>[2];
-        AnyClass<Z>[][] z_arr2 = new AnyClass<Z>[2][4];
-    }
-
-    <any Z> void testSpecializedArray() {
-        AnyClass<int>[] z_arr1 = new AnyClass<int>[2];
-        AnyClass<int>[][] z_arr2 = new AnyClass<int>[2][4];
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestNonSpecializedGenericCall.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestNonSpecializedGenericCall {
-
-    static class Box<any T> {
-        T t;
-
-        @BytecodeMapping(opcode = Opcodes.ALOAD_0)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        static <any Z> Z id(Z z) { return z; }
-
-        @BytecodeMapping(opcode = Opcodes.NEW)
-        @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-        static <any Z> Box<Z> wrap(Z z) { return new Box<>(); }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.GETFIELD)
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any U> void testAnyId(Box<U> z) {
-        U z2 = Box.id(z).t;
-    }
-
-    <U> void testNonAnyId(Box<U> z) {
-        U z2 = Box.id(z).t;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.GETFIELD)
-    @BytecodeMapping(opcode = Opcodes.ASTORE_2)
-    <any U> void testAnyWrap(Box<U> z) {
-        U z2 = Box.wrap(z).t.t;
-    }
-
-    <U> void testNonAnyWrap(Box<U> z) {
-        U z2 = Box.wrap(z).t.t;
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestNonSpecializedMethod.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestNonSpecializedMethod<any X> {
-
-    @BytecodeMapping(opcode = Opcodes.ACONST_NULL)
-    @BytecodeMapping(opcode = Opcodes.ARETURN)
-    <any R> R foo(TestNonSpecializedMethod<R> tr) { return R.default; }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL,
-                     sig = "LTestNonSpecializedMethod<TX;>;::(LTestNonSpecializedMethod<Ljava/lang/Object;>;)Ljava/lang/Object;")
-    <any Z> void test(TestNonSpecializedMethod<Object> t) {
-       foo(t);
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestPop.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestPop<any T> {
-    T t;
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    T m(T t) { return t; };
-
-    String g(T t) { return ""; };
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.INVOKEVIRTUAL)
-    @BytecodeMapping(opcode=Opcodes.POP)
-    void test(T t) {
-        m(t);
-    }
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.INVOKEVIRTUAL)
-    void testNeg(T t) {
-        g(t);
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestRefOnly.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestRefOnly<any T> {
-    T t;
-
-    //no bytecode mappings here!
-    __WhereRef(T) T m1(T t) { return t; };
-
-    //no bytecode mappings here!
-    __WhereRef(T) void m2(T t) { Foo.g(t); };
-
-
-    static class Foo {
-        static <Z> void g(Z z) { }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestRespecialization.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestRespecialization {
-
-    static class MultiBox<any A, any B, any C, any D, any E> {
-        <any Z> MultiBox<Z, B, C, D, E> withA(Z z) { return null; }
-        <any Z> MultiBox<A, Z, C, D, E> withB(Z z) { return null; }
-        <any Z> MultiBox<A, B, Z, D, E> withC(Z z) { return null; }
-        <any Z> MultiBox<A, B, C, Z, E> withD(Z z) { return null; }
-        <any Z> MultiBox<A, B, C, D, Z> withE(Z z) { return null; }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;TB;TC;TD;TE;>;I)LTestRespecialization$MultiBox<ITB;TC;TD;TE;>;::{0=LTestRespecialization$MultiBox<TA;TB;TC;TD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<ITB;TC;TD;TE;>;J)LTestRespecialization$MultiBox<IJTC;TD;TE;>;::{0=LTestRespecialization$MultiBox<ITB;TC;TD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<IJTC;TD;TE;>;F)LTestRespecialization$MultiBox<IJFTD;TE;>;::{0=LTestRespecialization$MultiBox<IJTC;TD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<IJFTD;TE;>;D)LTestRespecialization$MultiBox<IJFDTE;>;::{0=LTestRespecialization$MultiBox<IJFTD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<IJFDTE;>;Z)LTestRespecialization$MultiBox<IJFDZ>;::{0=LTestRespecialization$MultiBox<IJFDTE;>;}")
-    <any A, any B, any C, any D, any E> void testForward(MultiBox<A, B, C, D, E> mb_abcde) {
-        MultiBox<int, long, float, double, boolean> mb_ilfdb =
-                mb_abcde.withA(0)
-                        .withB(0L)
-                        .withC(0f)
-                        .withD(0d)
-                        .withE(false);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;TB;TC;TD;TE;>;Z)LTestRespecialization$MultiBox<TA;TB;TC;TD;Z>;::{0=LTestRespecialization$MultiBox<TA;TB;TC;TD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;TB;TC;TD;Z>;D)LTestRespecialization$MultiBox<TA;TB;TC;DZ>;::{0=LTestRespecialization$MultiBox<TA;TB;TC;TD;Z>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;TB;TC;DZ>;F)LTestRespecialization$MultiBox<TA;TB;FDZ>;::{0=LTestRespecialization$MultiBox<TA;TB;TC;DZ>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;TB;FDZ>;J)LTestRespecialization$MultiBox<TA;JFDZ>;::{0=LTestRespecialization$MultiBox<TA;TB;FDZ>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;JFDZ>;I)LTestRespecialization$MultiBox<IJFDZ>;::{0=LTestRespecialization$MultiBox<TA;JFDZ>;}")
-    <any A, any B, any C, any D, any E> void testBackwards(MultiBox<A, B, C, D, E> mb_abcde) {
-        MultiBox<int, long, float, double, boolean> mb_ilfdb =
-                mb_abcde.withE(false)
-                        .withD(0d)
-                        .withC(0f)
-                        .withB(0L)
-                        .withA(0);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<TA;TB;TC;TD;TE;>;I)LTestRespecialization$MultiBox<ITB;TC;TD;TE;>;::{0=LTestRespecialization$MultiBox<TA;TB;TC;TD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL,
-                     sig = "LTestRespecialization$MultiBox<ITB;TC;TD;TE;>;::" +
-                           "(Ljava/lang/Object;)LTestRespecialization$MultiBox<ILjava/lang/Object;TC;TD;TE;>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<ILjava/lang/Object;TC;TD;TE;>;F)LTestRespecialization$MultiBox<ILjava/lang/Object;FTD;TE;>;::{0=LTestRespecialization$MultiBox<ILjava/lang/Object;TC;TD;TE;>;}")
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL,
-                     sig = "LTestRespecialization$MultiBox<ILjava/lang/Long;FTD;TE;>;::" +
-                           "(Ljava/lang/Object;)LTestRespecialization$MultiBox<ILjava/lang/Object;FLjava/lang/Object;TE;>;")
-    @BytecodeMapping(opcode = Opcodes.INVOKEDYNAMIC,
-                     sig = "(LTestRespecialization$MultiBox<ILjava/lang/Object;FLjava/lang/Object;TE;>;Z)LTestRespecialization$MultiBox<ILjava/lang/Object;FLjava/lang/Object;Z>;::{0=LTestRespecialization$MultiBox<ILjava/lang/Object;FLjava/lang/Object;TE;>;}")
-    <any A, any B, any C, any D, any E> void testHoles(MultiBox<A, B, C, D, E> mb_abcde) {
-        MultiBox<int, Long, float, Double, boolean> mb_iLfDb =
-                mb_abcde.withA(0)
-                        .withB(new Long(0))
-                        .withC(0f)
-                        .withD(new Double(0))
-                        .withE(false);
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestSuper.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestSuper {
-    static class Sup<any T> {
-        void test(T t) { }
-    }
-
-    static class SubInt extends Sup<int> {
-        void test() {
-            super.test(1);
-        }
-    }
-
-    static class SubAny<any Z> extends Sup<Z> {
-
-        @BytecodeMapping(opcode=Opcodes.INVOKESPECIAL)
-        SubAny() {
-            super();
-        }
-
-        @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-        @BytecodeMapping(opcode=Opcodes.INVOKESPECIAL)
-        void test(Z z) {
-            super.test(z);
-        }
-    }
-
-    static class SubNonAny<Z> extends Sup<Z> {
-        void test(Z z) {
-            super.test(z);
-        }
-    }
-
-    static class NestedSub<any Z> extends Sup<NestedSub<Z>> {
-        void test() {
-            super.test(null);
-        }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestSyntheticCast.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestSyntheticCast<any X> {
-    static class Box<any T> {
-        T t;
-
-        @BytecodeMapping(opcode = Opcodes.GETFIELD)
-        @BytecodeMapping(opcode = Opcodes.ARETURN)
-        T get() { return t; }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    <any Z> void testAnyField(Box<Box<Z>> bbz) {
-        Box<Z> bz = bbz.t;
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    <any Z> void testAnyCall(Box<Box<Z>> bbz) {
-        Box<Z> bz = bbz.get();
-    }
-
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    <any Z> void testAnyAssign(Box<Box<Z>> bbz, Box<Z> bz) {
-        Box<Z> z = (bbz.t = bz);
-    }
-
-    <Z> void testNonAnyField(Box<Box<Z>> bbz) {
-        Box<Z> bz = bbz.t;
-    }
-
-    <Z> void testNonAnyCall(Box<Box<Z>> bbz) {
-        Box<Z> bz = bbz.get();
-    }
-
-    <Z> void testNonAnyAssign(Box<Box<Z>> bbz, Box<Z> bz) {
-        Box<Z> z = (bbz.t = bz);
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-    @BytecodeMapping(opcode = Opcodes.NEW)
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL)
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST)
-    @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL)
-    void testMethodContext(X[] zarr) {
-		X[] arr = id(zarr);
-		g(id(zarr));
-		new ArrayHolder<X>(id(zarr));
-    }
-
-	void g(X[] arr) { }
-
-    <Z> Z id(Z z) { return z; }
-
-    static class ArrayHolder<any X> {
-		ArrayHolder(X[] x) { }
-    }
-
-    interface I1<any X> { }
-    interface I2<any X> { }
-
-    static class Sup<any X, K extends I1<X>, Z extends Sup<X, K, Z>> {
-        K m(Z t) { return null; }
-    }
-
-    static class Sub<any Y, K extends I2<Y> & I1<Y>> extends Sup<Y, K, Sub<Y, K>> {
-
-        @BytecodeMapping(opcode = Opcodes.INVOKESPECIAL,
-                         sig = "LTestSyntheticCast$Sup<TY;TK;LTestSyntheticCast$Sub<TY;TK;>;>;::()V")
-        Sub() { }
-
-        @BytecodeMapping(opcode = Opcodes.CHECKCAST) //arg
-        @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL,
-                         sig = "LTestSyntheticCast$Sub<TY;TK;>;::(LTestSyntheticCast$Sub<TY;TK;>;)LTestSyntheticCast$I2<TY;>;") //bridge call
-        @BytecodeMapping(opcode = Opcodes.CHECKCAST) //ret
-        @TemplateMethod(name = "m", sig = "(LTestSyntheticCast$Sup;)") //this is the bridge method
-        K m(Sub<Y, K> s) { return null; }
-    }
-
-    @BytecodeMapping(opcode = Opcodes.INVOKEVIRTUAL, sig = "LTestSyntheticCast<TX;>;::(Ljava/lang/Object;)Ljava/lang/Object;")
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST, sig = "LTestSyntheticCast$Box<TY;>;")
-    @BytecodeMapping(opcode = Opcodes.CHECKCAST, sig = "LTestSyntheticCast$Box<TY;>;")
-    <any X, any Y> void testDoubleCast(Box<X> b) {
-       Box<Y> by = (Box<Y>)id(b);
-    }
-}
--- a/test/tools/javac/valhalla/typespec/items/tests/TestValOnly.java	Fri Apr 15 17:24:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-class TestValOnly<any T> {
-    T t;
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.ARETURN)
-    @TemplateMethod(name = "template$m1")
-    __WhereVal(T) T m1(T t) { return t; };
-
-    @BytecodeMapping(opcode=Opcodes.ALOAD_1)
-    @BytecodeMapping(opcode=Opcodes.INVOKEDYNAMIC)
-    @TemplateMethod(name = "template$m2")
-    __WhereVal(T) void m2(T t) { Foo.g(t); };
-
-    @TemplateMethod(name = "template$m3")
-    @BytecodeMapping(opcode=Opcodes.INVOKEVIRTUAL, sig = "LTestValOnly$Box<TT;>;::()TT;")
-    @BytecodeMapping(opcode=Opcodes.ASTORE_2)
-    __WhereVal(T) void m3(Box<T> bt) {
-        T t = bt.get();
-    }
-
-    static class Foo {
-        static <any Z> void g(Z z) { }
-    }
-
-    static class Box<any X> {
-        X x;
-
-        @BytecodeMapping(opcode=Opcodes.GETFIELD)
-        @BytecodeMapping(opcode=Opcodes.ARETURN)
-        X get() { return x; }
-    }
-}
--- a/test/tools/javac/valhalla/typespec/separate06/Separate06.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/separate06/Separate06.java	Mon Apr 18 17:33:12 2016 +0100
@@ -27,8 +27,8 @@
  * @test
  * @summary smoke test for separate compilation with new constant pool forms
  *
- * @compile -XDgenericClassFile Foo.java
- * @compile -XDgenericClassFile Separate06.java
+ * @compile Foo.java
+ * @compile Separate06.java
  */
 class Separate06<any X> {
     void test() {
--- a/test/tools/javac/valhalla/typespec/separate07/Separate07.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/typespec/separate07/Separate07.java	Mon Apr 18 17:33:12 2016 +0100
@@ -27,8 +27,8 @@
  * @test
  * @summary smoke test for separate compilation with new constant pool forms
  *
- * @compile -XDgenericClassFile GenericPool.java
- * @compile -XDgenericClassFile Separate07.java
+ * @compile GenericPool.java
+ * @compile Separate07.java
  */
 class Separate06<any X> {
     void test() {
--- a/test/tools/javac/valhalla/values/CheckNoDups.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/values/CheckNoDups.java	Mon Apr 18 17:33:12 2016 +0100
@@ -205,7 +205,7 @@
             out = s.toString();
         }
         for (String eo: expectedOut) {
-            if (!out.contains(eo))
+            if (!out.contains(eo) && !out.contains("typed")) //skip typed instructions
                 throw new AssertionError("Unexpected output: " + out);
         }
     }
--- a/test/tools/javac/valhalla/values/CheckValueBuffersAny.java	Fri Apr 15 17:24:24 2016 +0100
+++ b/test/tools/javac/valhalla/values/CheckValueBuffersAny.java	Mon Apr 18 17:33:12 2016 +0100
@@ -73,6 +73,7 @@
 
         runCheck(params, new String [] {
                // goo's code:
+
                "0: aload_1",
                "1: iconst_0",
                "2: aaload",
@@ -137,7 +138,7 @@
             out = s.toString();
         }
         for (String eo: expectedOut) {
-            if (!out.contains(eo))
+            if (!out.contains(eo) && !out.contains("typed")) //skip typed instructions
                 throw new AssertionError("Unexpected output: " + out);
         }
     }