changeset 48835:8157f7244278 exp

Reverse inadvertent push to exp branch that was meant for lworld branch instead
author sadayapalam
date Mon, 05 Feb 2018 09:38:14 +0530
parents c4f88c1fb99b
children 386aad4f99d4
files src/java.compiler/share/classes/javax/lang/model/element/Modifier.java src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.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/Check.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java test/langtools/tools/javac/diags/examples.not-yet.txt test/langtools/tools/javac/diags/examples/ValuesNotSupported.java test/langtools/tools/javac/valhalla/lworld-values/CheckClone.java test/langtools/tools/javac/valhalla/lworld-values/CheckClone.out test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.java test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.out test/langtools/tools/javac/valhalla/lworld-values/CheckEquals.java test/langtools/tools/javac/valhalla/lworld-values/CheckEquals.out test/langtools/tools/javac/valhalla/lworld-values/CheckExtends.java test/langtools/tools/javac/valhalla/lworld-values/CheckExtends.out test/langtools/tools/javac/valhalla/lworld-values/CheckFinal.java test/langtools/tools/javac/valhalla/lworld-values/CheckFinal.out test/langtools/tools/javac/valhalla/lworld-values/CheckFinalize.java test/langtools/tools/javac/valhalla/lworld-values/CheckFinalize.out test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash.java test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash.out test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash01.java test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash01.out test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.out test/langtools/tools/javac/valhalla/lworld-values/CheckNullAssign.java test/langtools/tools/javac/valhalla/lworld-values/CheckNullAssign.out test/langtools/tools/javac/valhalla/lworld-values/CheckNullCastable.java test/langtools/tools/javac/valhalla/lworld-values/CheckNullCastable.out test/langtools/tools/javac/valhalla/lworld-values/CheckStaticValueFactory.java test/langtools/tools/javac/valhalla/lworld-values/CheckStaticValueFactory.out test/langtools/tools/javac/valhalla/lworld-values/CheckSuperCompileOnly.java test/langtools/tools/javac/valhalla/lworld-values/CheckSync.java test/langtools/tools/javac/valhalla/lworld-values/CheckSync.out test/langtools/tools/javac/valhalla/lworld-values/CheckSynchronized.java test/langtools/tools/javac/valhalla/lworld-values/CheckSynchronized.out test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.java test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.out test/langtools/tools/javac/valhalla/lworld-values/CheckValueModifier.java test/langtools/tools/javac/valhalla/lworld-values/CheckValueModifier.out test/langtools/tools/javac/valhalla/lworld-values/Point.java
diffstat 53 files changed, 25 insertions(+), 907 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java	Mon Feb 05 09:38:14 2018 +0530
@@ -58,14 +58,6 @@
      * @since 1.8
      */
      DEFAULT,
-    /**
-     * The modifier {@code __ByValue}
-     */
-    VALUE,
-    /**
-     * The modifier {@code __ValueFactory}
-     */
-    STATICVALUEFACTORY,
     /** The modifier {@code static} */          STATIC,
     /** The modifier {@code final} */           FINAL,
     /** The modifier {@code transient} */       TRANSIENT,
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.java	Mon Feb 05 09:38:14 2018 +0530
@@ -49,18 +49,6 @@
  * @since 1.6
  */
 public interface NewClassTree extends ExpressionTree {
-
-    /**
-     * There are two kinds of new class trees: (i) references (new String("Foo"))
-     * (ii) default values (__MakeDefault Point())
-     */
-    public enum CreationMode {
-        /** enum constant for reference creation. */
-        NEW,
-        /** enum constant for default value creation. */
-        DEFAULT_VALUE,
-    }
-
     /**
      * Returns the enclosing expression, or {@code null} if none.
      * @return the enclosing expression
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java	Mon Feb 05 09:38:14 2018 +0530
@@ -98,9 +98,6 @@
     /** Added in SE8, represents constructs implicitly declared in source. */
     public static final int MANDATED     = 1<<15;
 
-    /** Marks a type as a value-type */
-    public static final int VALUE        = 1<<16;
-
     public static final int StandardFlags = 0x0fff;
 
     // Because the following access flags are overloaded with other
@@ -110,7 +107,6 @@
     public static final int ACC_SUPER    = 0x0020;
     public static final int ACC_BRIDGE   = 0x0040;
     public static final int ACC_VARARGS  = 0x0080;
-    public static final int ACC_VALUE    = 0x0100;
     public static final int ACC_MODULE   = 0x8000;
 
     /*****************************************
@@ -126,11 +122,6 @@
      */
     public static final int HASINIT          = 1<<18;
 
-    /** Flag is set for a method symbol that acts as a static factory method for a value type
-     *  (contrast with vminit methods flagged as STATICVALUEFACTORY)
-     */
-    public static final int STATICVALUEFACTORY = 1<<19;
-
     /** Flag is set for compiler-generated anonymous method symbols
      *  that `own' an initializer block.
      */
@@ -326,7 +317,7 @@
      */
     public static final int
         AccessFlags           = PUBLIC | PROTECTED | PRIVATE,
-        LocalClassFlags       = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC | VALUE,
+        LocalClassFlags       = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC,
         MemberClassFlags      = LocalClassFlags | INTERFACE | AccessFlags,
         ClassFlags            = LocalClassFlags | INTERFACE | PUBLIC | ANNOTATION,
         InterfaceVarFlags     = FINAL | STATIC | PUBLIC,
@@ -335,9 +326,9 @@
         ConstructorFlags      = AccessFlags,
         InterfaceMethodFlags  = ABSTRACT | PUBLIC,
         MethodFlags           = AccessFlags | ABSTRACT | STATIC | NATIVE |
-                                SYNCHRONIZED | FINAL | STRICTFP | STATICVALUEFACTORY;
+                                SYNCHRONIZED | FINAL | STRICTFP;
     public static final long
-        ExtendedStandardFlags       = (long)StandardFlags | DEFAULT | VALUE | STATICVALUEFACTORY,
+        ExtendedStandardFlags       = (long)StandardFlags | DEFAULT,
         ModifierFlags               = ((long)StandardFlags & ~INTERFACE) | DEFAULT,
         InterfaceMethodMask         = ABSTRACT | PRIVATE | STATIC | PUBLIC | STRICTFP | DEFAULT,
         AnnotationTypeElementMask   = ABSTRACT | PUBLIC,
@@ -362,8 +353,6 @@
             if (0 != (flags & NATIVE))    modifiers.add(Modifier.NATIVE);
             if (0 != (flags & STRICTFP))  modifiers.add(Modifier.STRICTFP);
             if (0 != (flags & DEFAULT))   modifiers.add(Modifier.DEFAULT);
-            if (0 != (flags & VALUE))     modifiers.add(Modifier.VALUE);
-            if (0 != (flags & STATICVALUEFACTORY))     modifiers.add(Modifier.STATICVALUEFACTORY);
             modifiers = Collections.unmodifiableSet(modifiers);
             modifierSets.put(flags, modifiers);
         }
@@ -405,11 +394,9 @@
         ANNOTATION(Flags.ANNOTATION),
         DEPRECATED(Flags.DEPRECATED),
         HASINIT(Flags.HASINIT),
-        STATICVALUEFACTORY(Flags.STATICVALUEFACTORY),
         BLOCK(Flags.BLOCK),
         ENUM(Flags.ENUM),
         MANDATED(Flags.MANDATED),
-        VALUE(Flags.VALUE),
         NOOUTERTHIS(Flags.NOOUTERTHIS),
         EXISTS(Flags.EXISTS),
         COMPOUND(Flags.COMPOUND),
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Mon Feb 05 09:38:14 2018 +0530
@@ -181,8 +181,7 @@
         DIAMOND_WITH_ANONYMOUS_CLASS_CREATION(JDK9, Fragments.FeatureDiamondAndAnonClass, DiagKind.NORMAL),
         UNDERSCORE_IDENTIFIER(MIN, JDK8),
         PRIVATE_INTERFACE_METHODS(JDK9, Fragments.FeaturePrivateIntfMethods, DiagKind.PLURAL),
-        LOCAL_VARIABLE_TYPE_INFERENCE(JDK10),
-        VALUE_TYPES(JDK11, Fragments.FeatureValueTypes, DiagKind.NORMAL);
+        LOCAL_VARIABLE_TYPE_INFERENCE(JDK10);
 
         enum DiagKind {
             NORMAL,
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Mon Feb 05 09:38:14 2018 +0530
@@ -983,10 +983,6 @@
        }
     }
 
-    public boolean isValue(Type t) {
-        return t.tsym != null && (t.tsym.flags_field & Flags.VALUE) != 0;
-    }
-
     // <editor-fold defaultstate="collapsed" desc="isSubtype">
     /**
      * Is t an unchecked subtype of s?
@@ -1107,7 +1103,7 @@
                      return isSubtypeNoCapture(t.getUpperBound(), s);
                  case BOT:
                      return
-                         s.hasTag(BOT) || (s.hasTag(CLASS) && !isValue(s)) ||
+                         s.hasTag(BOT) || s.hasTag(CLASS) ||
                          s.hasTag(ARRAY) || s.hasTag(TYPEVAR);
                  case WILDCARD: //we shouldn't be here - avoids crash (see 7034495)
                  case NONE:
@@ -1677,7 +1673,7 @@
 
             @Override
             public Boolean visitClassType(ClassType t, Type s) {
-                if (s.hasTag(ERROR) || s.hasTag(BOT) && !isValue(t))
+                if (s.hasTag(ERROR) || s.hasTag(BOT))
                     return true;
 
                 if (s.hasTag(TYPEVAR)) {
@@ -5038,11 +5034,6 @@
                     break;
                 case CLASS:
                     append('L');
-                    // TODO(Srikanth): Fix commented if statement below.
-//                    if (types.isValue(type))
-//                        append('Q');
-//                    else
-//                        append('L');
                     assembleClassSig(type);
                     append(';');
                     break;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Feb 05 09:38:14 2018 +0530
@@ -33,7 +33,6 @@
 import com.sun.source.tree.IdentifierTree;
 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 import com.sun.source.tree.MemberSelectTree;
-import com.sun.source.tree.NewClassTree.CreationMode;
 import com.sun.source.tree.TreeVisitor;
 import com.sun.source.util.SimpleTreeVisitor;
 import com.sun.tools.javac.code.*;
@@ -295,19 +294,7 @@
             if (v.isResourceVariable()) { //TWR resource
                 log.error(pos, Errors.TryResourceMayNotBeAssigned(v));
             } else {
-                boolean complain = true;
-                /* Allow updates to blank final fields inside value factories.
-                   This really results in copy on write and not mutation of the
-                   final field
-                */
-                if (v.getKind() == ElementKind.FIELD && (v.flags() & HASINIT) == 0) {
-                    if (env.enclMethod != null && (env.enclMethod.mods.flags & STATICVALUEFACTORY) != 0) {
-                        if (v.owner == env.enclMethod.sym.owner)
-                            complain = false;
-                    }
-                }
-                if (complain)
-                    log.error(pos, Errors.CantAssignValToFinalVar(v));
+                log.error(pos, Errors.CantAssignValToFinalVar(v));
             }
         }
     }
@@ -1152,9 +1139,6 @@
                 annotate.queueScanTreeAndTypeAnnotate(tree.init, env, tree.sym, tree.pos());
                 annotate.flush();
             }
-            if (types.isValue(tree.sym.owner.type) && (tree.mods.flags & (Flags.FINAL | Flags.STATIC)) == 0) {
-                log.error(tree.pos(), "value.field.must.be.final");
-            }
         }
 
         VarSymbol v = tree.sym;
@@ -2032,39 +2016,6 @@
 
             chk.checkRefTypes(tree.typeargs, typeargtypes);
 
-            // FIXME(Srikanth): Above checkRefTypes call is missing in mvt branch ??
-            // identity hash code is uncomputable for value instances.
-            final Symbol symbol = TreeInfo.symbol(tree.meth);
-            if (symbol != null && symbol.name == names.identityHashCode && symbol.owner.flatName() == names.java_lang_System) {
-                if (tree.args.length() == 1 && types.isValue(tree.args.head.type))
-                    log.error(tree.pos(), "value.does.not.support", "identityHashCode");
-            }
-
-            /* Is this an ill conceived attempt to invoke jlO methods not available on value types ??
-            */
-            if (types.isValue(qualifier)) {
-                int argSize = argtypes.size();
-                Name name = symbol.name;
-                switch (name.toString()) {
-                    case "wait":
-                        if (argSize == 0
-                                || (types.isConvertible(argtypes.head, syms.longType) &&
-                                (argSize == 1 || (argSize == 2 && types.isConvertible(argtypes.tail.head, syms.intType))))) {
-                            log.error(tree.pos(),"value.does.not.support", name);
-                        }
-                        break;
-                    case "notify":
-                    case "notifyAll":
-                    case "clone":
-                    case "finalize":
-                        if (argSize == 0)
-                            log.error(tree.pos(),"value.does.not.support", name);
-                        break;
-                }
-            }
-
-
-
             // Check that value of resulting type is admissible in the
             // current context.  Also, capture the return type
             Type capturedRes = resultInfo.checkContext.inferenceContext().cachedCapture(tree, restype, true);
@@ -2249,10 +2200,6 @@
                  ((JCVariableDecl) env.tree).init != tree))
                 log.error(tree.pos(), Errors.EnumCantBeInstantiated);
 
-            if (tree.creationMode == CreationMode.NEW && types.isValue(clazztype)) {
-                log.error(tree.pos(), Errors.GarbledValueReferenceInstantiation);
-            }
-
             boolean isSpeculativeDiamondInferenceRound = TreeInfo.isDiamond(tree) &&
                     resultInfo.checkContext.deferredAttrContext().mode == DeferredAttr.AttrMode.SPECULATIVE;
             boolean skipNonDiamondPath = false;
@@ -2353,22 +2300,6 @@
                         tree.constructorType = instantiatedContext.asInstType(tree.constructorType);
                     });
         }
-        if (tree.creationMode == CreationMode.DEFAULT_VALUE) {
-            if (tree.constructor != null && tree.constructor.isConstructor()) {
-                final List<Type> parameterTypes = tree.constructorType.getParameterTypes();
-                if (!parameterTypes.isEmpty()) {
-                    log.error(tree.pos, "invalid.arguments.to.make.default");
-                }
-                if (!types.isValue(TreeInfo.symbol(tree.clazz).type)) {
-                    log.error(tree.pos, "make.default.with.nonvalue");
-                } else if (env.enclMethod != null && env.enclMethod.sym.owner != TreeInfo.symbol(tree.clazz)) {
-                    log.error(tree.pos, "make.default.with.wrong.value.type", TreeInfo.symbol(tree.clazz));
-                }
-            }
-            if (env.enclMethod != null && (env.enclMethod.mods.flags & STATICVALUEFACTORY) == 0) {
-                log.error(tree.pos, "make.default.in.nonfactory");
-            }
-        }
         chk.validate(tree.typeargs, localEnv);
     }
 
@@ -3477,9 +3408,6 @@
                 if (!types.isCastable(left, right, new Warner(tree.pos()))) {
                     log.error(tree.pos(), Errors.IncomparableTypes(left, right));
                 }
-                if (types.isValue(left) || types.isValue(right)) {
-                    log.error(tree.pos(), "value.does.not.support", tree.operator.name.toString());
-                }
             }
 
             chk.checkDivZero(tree.rhs.pos(), operator, right);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Mon Feb 05 09:38:14 2018 +0530
@@ -730,7 +730,7 @@
      *  @param t             The type to be checked.
      */
     Type checkRefType(DiagnosticPosition pos, Type t) {
-        if (t.isReference() && !types.isValue(t))
+        if (t.isReference())
             return t;
         else
             return typeTagError(pos,
@@ -1162,9 +1162,7 @@
                     mask = implicit = InterfaceMethodFlags;
                 }
             } else {
-                // instance methods of value types do not have a monitor associated with their `this'
-                mask = ((sym.owner.flags_field & VALUE) != 0 && (flags & Flags.STATIC) == 0) ?
-                        MethodFlags & ~SYNCHRONIZED : MethodFlags;
+                mask = MethodFlags;
             }
             // Imply STRICTFP if owner has STRICTFP set.
             if (((flags|implicit) & Flags.ABSTRACT) == 0 ||
@@ -1193,8 +1191,8 @@
             if ((flags & INTERFACE) != 0) implicit |= ABSTRACT;
 
             if ((flags & ENUM) != 0) {
-                // enums can't be declared abstract or final or value type
-                mask &= ~(ABSTRACT | FINAL | VALUE);
+                // enums can't be declared abstract or final
+                mask &= ~(ABSTRACT | FINAL);
                 implicit |= implicitEnumFinalFlag(tree);
             }
             // Imply STRICTFP if owner has STRICTFP set.
@@ -1227,7 +1225,7 @@
                  &&
                  checkDisjoint(pos, flags,
                                ABSTRACT | INTERFACE,
-                               FINAL | NATIVE | SYNCHRONIZED | VALUE)
+                               FINAL | NATIVE | SYNCHRONIZED)
                  &&
                  checkDisjoint(pos, flags,
                                PUBLIC,
@@ -2165,45 +2163,6 @@
         }
     }
 
-    // A value class cannot contain a field of its own type either or indirectly.
-    void checkNonCyclicMembership(JCClassDecl tree) {
-        Assert.check((tree.sym.flags_field & LOCKED) == 0);
-        try {
-            tree.sym.flags_field |= LOCKED;
-            for (List<? extends JCTree> l = tree.defs; l.nonEmpty(); l = l.tail) {
-                if (l.head.hasTag(VARDEF)) {
-                    JCVariableDecl field = (JCVariableDecl) l.head;
-                    if (!field.sym.isStatic()) {
-                        Type fieldType = field.sym.type;
-                        if (types.isValue(fieldType)) {
-                            checkNonCyclicMembership((ClassSymbol) fieldType.tsym, field.pos());
-                        }
-                    }
-                }
-            }
-        } finally {
-            tree.sym.flags_field &= ~LOCKED;
-        }
-
-    }
-    // where
-    private void checkNonCyclicMembership(ClassSymbol c, DiagnosticPosition pos) {
-        if ((c.flags_field & LOCKED) != 0) {
-            log.error(pos, Errors.CyclicValueTypeMembership(c));
-            return;
-        }
-        try {
-            c.flags_field |= LOCKED;
-            for (Symbol fld : c.members().getSymbols(s -> s.kind == VAR &&
-                    !s.isStatic() &&
-                    (types.isValue(s.type)), NON_RECURSIVE)) {
-                checkNonCyclicMembership((ClassSymbol) fld.type.tsym, pos);
-            }
-        } finally {
-            c.flags_field &= ~LOCKED;
-        }
-    }
-
     void checkNonCyclicDecl(JCClassDecl tree) {
         CycleChecker cc = new CycleChecker();
         cc.scan(tree);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Mon Feb 05 09:38:14 2018 +0530
@@ -41,7 +41,6 @@
 
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.tree.JCTree.*;
-import javax.lang.model.element.ElementKind;
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Flags.BLOCK;
@@ -1540,7 +1539,6 @@
         }
 
         private boolean isInitialConstructor = false;
-        private JCMethodDecl enclMethod = null;
 
         @Override
         protected void markDead() {
@@ -1626,15 +1624,7 @@
                 }
                 inits.incl(sym.adr);
             } else if ((sym.flags() & FINAL) != 0) {
-                boolean complain = true;
-                if (sym.getKind() == ElementKind.FIELD && (sym.flags() & HASINIT) == 0) {
-                    if (enclMethod != null && (enclMethod.mods.flags & STATICVALUEFACTORY) != 0) {
-                        if (sym.owner == enclMethod.sym.owner)
-                            complain = false;
-                    }
-                }
-                if (complain)
-                    log.error(pos, Errors.VarMightAlreadyBeAssigned(sym));
+                log.error(pos, Errors.VarMightAlreadyBeAssigned(sym));
             }
         }
         //where
@@ -1874,10 +1864,8 @@
 
                 Assert.check(pendingExits.isEmpty());
                 boolean lastInitialConstructor = isInitialConstructor;
-                JCMethodDecl lastEnclMethod = enclMethod;
                 try {
                     isInitialConstructor = TreeInfo.isInitialConstructor(tree);
-                    enclMethod = tree;
 
                     if (!isInitialConstructor) {
                         firstadr = nextadr;
@@ -1933,7 +1921,6 @@
                     firstadr = firstadrPrev;
                     returnadr = returnadrPrev;
                     isInitialConstructor = lastInitialConstructor;
-                    enclMethod = lastEnclMethod;
                 }
             } finally {
                 lint = lintPrev;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Feb 05 09:38:14 2018 +0530
@@ -228,15 +228,6 @@
             m.defaultValue = annotate.unfinishedDefaultValue(); // set it to temporary sentinel for now
             annotate.annotateDefaultValueLater(tree.defaultValue, localEnv, m, tree.pos());
         }
-        if ((tree.mods.flags & STATICVALUEFACTORY) != 0) {
-            if ((tree.mods.flags & STATIC) == 0) {
-                log.error(tree.pos(), "value.factory.must.be.static");
-            }
-            final Type returnType = m.getReturnType();
-            if (returnType != null && returnType.tsym != m.owner) {
-                log.error(tree.restype != null ? tree.restype.pos() : tree.pos(), "type.found.req", returnType.tsym, m.owner);
-            }
-        }
     }
 
     /** Create a fresh environment for method bodies.
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Mon Feb 05 09:38:14 2018 +0530
@@ -672,11 +672,8 @@
             // Determine supertype.
             Type supertype;
             JCExpression extending;
-            final boolean isValueType = (tree.mods.flags & Flags.VALUE) != 0;
 
             if (tree.extending != null) {
-                if (isValueType)
-                    log.error(tree.pos(), "value.may.not.extend");
                 extending = clearTypeParams(tree.extending);
                 supertype = attr.attribBase(extending, baseEnv, true, false, true);
             } else {
@@ -849,9 +846,6 @@
                 !env.toplevel.sourcefile.isNameCompatible(sym.name.toString(),JavaFileObject.Kind.SOURCE)) {
                 sym.flags_field |= AUXILIARY;
             }
-            if ((tree.mods.flags & Flags.VALUE) != 0 && (tree.mods.flags & Flags.FINAL) == 0) {
-                log.error(tree.pos(), "value.must.be.final");
-            }
         }
     }
 
@@ -949,9 +943,6 @@
                 typeAnnotations.organizeTypeAnnotationsSignatures(env, (JCClassDecl)env.tree);
                 typeAnnotations.validateTypeAnnotationsSignatures(env, (JCClassDecl)env.tree);
             }
-            if (types.isValue(tree.sym.type)) {
-                chk.checkNonCyclicMembership(tree);
-            }
         }
 
         /** Enter members for a class.
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Feb 05 09:38:14 2018 +0530
@@ -33,8 +33,6 @@
 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 import com.sun.source.tree.ModuleTree.ModuleKind;
 
-import com.sun.source.tree.NewClassTree.CreationMode;
-
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Source.Feature;
 import com.sun.tools.javac.parser.Tokens.*;
@@ -355,7 +353,6 @@
                 case THIS:
                 case SUPER:
                 case NEW:
-                case VDEFAULT:
                     if (stopAtStatement)
                         return;
                     break;
@@ -1157,14 +1154,12 @@
             } else return illegal();
             break;
         case NEW:
-        case VDEFAULT:
             if (typeArgs != null) return illegal();
             if ((mode & EXPR) != 0) {
                 mode = EXPR;
-                CreationMode creationMode = getCreationMode(token);
                 nextToken();
                 if (token.kind == LT) typeArgs = typeArguments(false);
-                t = creator(pos, creationMode, typeArgs);
+                t = creator(pos, typeArgs);
                 typeArgs = null;
             } else return illegal();
             break;
@@ -1283,10 +1278,9 @@
                                 if (typeArgs != null) return illegal();
                                 mode = EXPR;
                                 int pos1 = token.pos;
-                                CreationMode creationMode = getCreationMode(token);
                                 nextToken();
                                 if (token.kind == LT) typeArgs = typeArguments(false);
-                                t = innerCreator(pos1, creationMode, typeArgs, t);
+                                t = innerCreator(pos1, typeArgs, t);
                                 typeArgs = null;
                                 break loop;
                             }
@@ -1378,10 +1372,6 @@
         return term3Rest(t, typeArgs);
     }
 
-    private CreationMode getCreationMode(Token token) {
-        return token.kind == NEW ? CreationMode.NEW : CreationMode.DEFAULT_VALUE;
-    }
-
     JCExpression term3Rest(JCExpression t, List<JCExpression> typeArgs) {
         if (typeArgs != null) illegal();
         while (true) {
@@ -1423,14 +1413,13 @@
                     nextToken();
                     t = arguments(typeArgs, t);
                     typeArgs = null;
-                } else if ((token.kind == NEW || token.kind == VDEFAULT) && (mode & EXPR) != 0) {
+                } else if (token.kind == NEW && (mode & EXPR) != 0) {
                     if (typeArgs != null) return illegal();
                     mode = EXPR;
                     int pos2 = token.pos;
-                    CreationMode creationMode = getCreationMode(token);
                     nextToken();
                     if (token.kind == LT) typeArgs = typeArguments(false);
-                    t = innerCreator(pos2, creationMode, typeArgs, t);
+                    t = innerCreator(pos2, typeArgs, t);
                     typeArgs = null;
                 } else {
                     List<JCAnnotation> tyannos = null;
@@ -1584,7 +1573,7 @@
                         case INTLITERAL: case LONGLITERAL: case FLOATLITERAL:
                         case DOUBLELITERAL: case CHARLITERAL: case STRINGLITERAL:
                         case TRUE: case FALSE: case NULL:
-                        case NEW: case VDEFAULT: case IDENTIFIER: case ASSERT: case ENUM: case UNDERSCORE:
+                        case NEW: case IDENTIFIER: case ASSERT: case ENUM: case UNDERSCORE:
                         case BYTE: case SHORT: case CHAR: case INT:
                         case LONG: case FLOAT: case DOUBLE: case BOOLEAN: case VOID:
                             return ParensResult.CAST;
@@ -2012,8 +2001,8 @@
         }
         Name refName;
         ReferenceMode refMode;
-        if (token.kind == NEW || token.kind == VDEFAULT) {
-            refMode = ReferenceMode.NEW; // TODO(Srikanth): What is the right thing to do here ?
+        if (token.kind == NEW) {
+            refMode = ReferenceMode.NEW;
             refName = names.init;
             nextToken();
         } else {
@@ -2025,7 +2014,7 @@
 
     /** Creator = [Annotations] Qualident [TypeArguments] ( ArrayCreatorRest | ClassCreatorRest )
      */
-    JCExpression creator(int newpos, CreationMode creationMode, List<JCExpression> typeArgs) {
+    JCExpression creator(int newpos, List<JCExpression> typeArgs) {
         List<JCAnnotation> newAnnotations = typeAnnotationsOpt();
 
         switch (token.kind) {
@@ -2099,7 +2088,7 @@
             }
             return e;
         } else if (token.kind == LPAREN) {
-            JCNewClass newClass = classCreatorRest(newpos, creationMode, null, typeArgs, t);
+            JCNewClass newClass = classCreatorRest(newpos, null, typeArgs, t);
             if (newClass.def != null) {
                 assert newClass.def.mods.annotations.isEmpty();
                 if (newAnnotations.nonEmpty()) {
@@ -2128,7 +2117,7 @@
 
     /** InnerCreator = [Annotations] Ident [TypeArguments] ClassCreatorRest
      */
-    JCExpression innerCreator(int newpos, CreationMode creationMode, List<JCExpression> typeArgs, JCExpression encl) {
+    JCExpression innerCreator(int newpos, List<JCExpression> typeArgs, JCExpression encl) {
         List<JCAnnotation> newAnnotations = typeAnnotationsOpt();
 
         JCExpression t = toP(F.at(token.pos).Ident(ident()));
@@ -2142,7 +2131,7 @@
             t = typeArguments(t, true);
             mode = oldmode;
         }
-        return classCreatorRest(newpos, creationMode, encl, typeArgs, t);
+        return classCreatorRest(newpos, encl, typeArgs, t);
     }
 
     /** ArrayCreatorRest = [Annotations] "[" ( "]" BracketsOpt ArrayInitializer
@@ -2222,7 +2211,6 @@
     /** ClassCreatorRest = Arguments [ClassBody]
      */
     JCNewClass classCreatorRest(int newpos,
-                                  CreationMode creationMode,
                                   JCExpression encl,
                                   List<JCExpression> typeArgs,
                                   JCExpression t)
@@ -2235,9 +2223,7 @@
             JCModifiers mods = F.at(Position.NOPOS).Modifiers(0);
             body = toP(F.at(pos).AnonymousClassDef(mods, defs));
         }
-        JCNewClass newClass = toP(F.at(newpos).NewClass(encl, typeArgs, t, args, body));
-        newClass.creationMode = creationMode;
-        return newClass;
+        return toP(F.at(newpos).NewClass(encl, typeArgs, t, args, body));
     }
 
     /** ArrayInitializer = "{" [VariableInitializer {"," VariableInitializer}] [","] "}"
@@ -2377,7 +2363,6 @@
         case ASSERT:
             return List.of(parseSimpleStatement());
         case MONKEYS_AT:
-        case VALUE:
         case FINAL: {
             Comment dc = token.comment(CommentStyle.JAVADOC);
             JCModifiers mods = modifiersOpt();
@@ -2814,8 +2799,6 @@
             case STRICTFP    : flag = Flags.STRICTFP; break;
             case MONKEYS_AT  : flag = Flags.ANNOTATION; break;
             case DEFAULT     : checkSourceLevel(Feature.DEFAULT_METHODS); flag = Flags.DEFAULT; break;
-            case VALUE       : checkSourceLevel(Feature.VALUE_TYPES); flag = Flags.VALUE; break;
-            case STATICVALUEFACTORY: flag = Flags.STATICVALUEFACTORY; break;
             case ERROR       : flag = 0; nextToken(); break;
             default: break loop;
             }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java	Mon Feb 05 09:38:14 2018 +0530
@@ -163,9 +163,6 @@
         THROWS("throws"),
         TRANSIENT("transient"),
         TRY("try"),
-        VALUE("__ByValue"),
-        STATICVALUEFACTORY("__ValueFactory"),
-        VDEFAULT("__MakeDefault"),
         VOID("void", Tag.NAMED),
         VOLATILE("volatile"),
         WHILE("while"),
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Feb 05 09:38:14 2018 +0530
@@ -353,10 +353,6 @@
     cyclic inheritance involving {0}
 
 # 0: symbol
-compiler.err.cyclic.value.type.membership=\
-    cyclic value type membership involving {0}
-
-# 0: symbol
 compiler.err.cyclic.annotation.element=\
     type of element {0} is cyclic
 
@@ -2703,9 +2699,6 @@
 compiler.misc.feature.private.intf.methods=\
     private interface methods
 
-compiler.misc.feature.value.types=\
-    value types
-
 compiler.warn.underscore.as.identifier=\
     as of release 9, ''_'' is a keyword, and may not be used as an identifier
 
@@ -3184,66 +3177,3 @@
 # 0: string, 1: string
 compiler.err.illegal.argument.for.option=\
     illegal argument for {0}: {1}
-
-
-compiler.err.garbled.value.reference.instantiation=\
-    Mismatched instantiation syntax between value and reference types.
-
-# 0: name (of method)
-compiler.err.value.does.not.support=\
-    value types do not support {0}
-
-compiler.err.value.must.be.final=\
-    value type must be declared final
-
-compiler.err.value.field.must.be.final=\
-    value-type field must be declared final
-
-compiler.err.value.factory.must.be.static=\
-    Value factory must be a static method
-
-compiler.err.invalid.arguments.to.make.default=\
-    Superfluous arguments to default value creation
-
-compiler.err.make.default.in.nonfactory=\
-    Illegal attempt to create a default value outside of value factory
-
-compiler.err.make.default.with.nonvalue=\
-    Default value creation requires a value type
-
-# 0: symbol
-compiler.err.make.default.with.wrong.value.type=\
-    This value factory cannot create values of type {0}
-
-compiler.err.value.may.not.extend=\
-    value type may not extend another value or class
-
-# 0: name (of method)
-compiler.warn.value.does.not.support=\
-    value types do not support {0}
-
-compiler.warn.value.must.be.final=\
-    value type must be declared final
-
-compiler.warn.value.field.must.be.final=\
-    value-type field must be declared final
-
-compiler.warn.value.may.not.extend=\
-    value type may not extend another value or class
-
-compiler.warn.mod.not.allowed.here=\
-    modifier {0} not allowed here
-
-# 0: message segment or type, 1: message segment
-compiler.warn.type.found.req=\
-    unexpected type\n\
-    required: {1}\n\
-    found:    {0}
-
-# 0: type, 1: type
-compiler.warn.incomparable.types=\
-    incomparable types: {0} and {1}
-
-# 0: symbol
-compiler.warn.cyclic.value.type.membership=\
-    cyclic value type membership involving {0}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Mon Feb 05 09:38:14 2018 +0530
@@ -1669,7 +1669,6 @@
         public JCExpression clazz;
         public List<JCExpression> args;
         public JCClassDecl def;
-        public CreationMode creationMode;    // <- temporary
         public Symbol constructor;
         public Type varargsElement;
         public Type constructorType;
@@ -1685,7 +1684,6 @@
             this.clazz = clazz;
             this.args = args;
             this.def = def;
-            this.creationMode = CreationMode.NEW;    // <- temporary
         }
         @Override
         public void accept(Visitor v) { v.visitNewClass(this); }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java	Mon Feb 05 09:38:14 2018 +0530
@@ -99,7 +99,6 @@
     public final Name getMessage;
     public final Name hasNext;
     public final Name hashCode;
-    public final Name identityHashCode;
     public final Name init;
     public final Name initCause;
     public final Name iterator;
@@ -121,7 +120,6 @@
     public final Name java_lang_Enum;
     public final Name java_lang_Object;
     public final Name java_lang_invoke_MethodHandle;
-    public final Name java_lang_System;
 
     // names of builtin classes
     public final Name Array;
@@ -263,7 +261,6 @@
         getMessage = fromString("getMessage");
         hasNext = fromString("hasNext");
         hashCode = fromString("hashCode");
-        identityHashCode = fromString("identityHashCode");
         init = fromString("<init>");
         initCause = fromString("initCause");
         iterator = fromString("iterator");
@@ -286,7 +283,6 @@
         java_lang_Enum = fromString("java.lang.Enum");
         java_lang_Object = fromString("java.lang.Object");
         java_lang_invoke_MethodHandle = fromString("java.lang.invoke.MethodHandle");
-        java_lang_System = fromString("java.lang.System");
 
         // names of builtin classes
         Array = fromString("Array");
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Mon Feb 05 09:38:14 2018 +0530
@@ -89,7 +89,6 @@
 import jdk.javadoc.internal.doclets.toolkit.WorkArounds;
 import jdk.javadoc.internal.tool.DocEnvImpl;
 
-import static com.sun.source.doctree.DocTree.Kind.VALUE;
 import static javax.lang.model.element.ElementKind.*;
 import static javax.lang.model.element.Modifier.*;
 import static javax.lang.model.type.TypeKind.*;
--- a/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java	Fri Feb 02 13:28:39 2018 +0100
+++ b/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java	Mon Feb 05 09:38:14 2018 +0530
@@ -198,9 +198,6 @@
         ERROR(TokenKind.ERROR, XERRO),  //
         IDENTIFIER(TokenKind.IDENTIFIER, XEXPR1|XDECL1|XTERM),  //
         UNDERSCORE(TokenKind.UNDERSCORE, XERRO),  //  _
-        VALUE(TokenKind.VALUE, XEXPR1|XDECL1|XTERM),  //  "__ByValue"
-        VALUEFACTORY(TokenKind.STATICVALUEFACTORY, XDECL1),  //  "__ValueFactory" (a la public)
-        VDEFAULT(TokenKind.VDEFAULT, XEXPR1|XDECL1|XTERM),  //  "__MakeDefault" a la __Make
         CLASS(TokenKind.CLASS, XEXPR|XDECL1|XBRACESNEEDED),  //  class decl (MAPPED: DOTCLASS)
         MONKEYS_AT(TokenKind.MONKEYS_AT, XEXPR|XDECL1),  //  @
         IMPORT(TokenKind.IMPORT, XDECL1|XSTART),  //  import -- consider declaration
--- a/test/langtools/tools/javac/diags/examples.not-yet.txt	Fri Feb 02 13:28:39 2018 +0100
+++ b/test/langtools/tools/javac/diags/examples.not-yet.txt	Mon Feb 05 09:38:14 2018 +0530
@@ -154,24 +154,3 @@
 compiler.err.locn.module-info.not.allowed.on.patch.path
 compiler.misc.cant.resolve.modules
 compiler.misc.file.does.not.contain.module
-
-# Value types
-compiler.err.cyclic.value.type.membership
-compiler.err.garbled.value.reference.instantiation
-compiler.err.value.does.not.support
-compiler.err.value.factory.must.be.static
-compiler.err.value.field.must.be.final
-compiler.err.value.must.be.final
-compiler.err.invalid.arguments.to.make.default
-compiler.err.make.default.in.nonfactory
-compiler.err.make.default.with.nonvalue
-compiler.err.make.default.with.wrong.value.type
-compiler.err.value.may.not.extend
-compiler.warn.cyclic.value.type.membership
-compiler.warn.incomparable.types
-compiler.warn.mod.not.allowed.here
-compiler.warn.type.found.req
-compiler.warn.value.does.not.support
-compiler.warn.value.field.must.be.final
-compiler.warn.value.may.not.extend
-compiler.warn.value.must.be.final
--- a/test/langtools/tools/javac/diags/examples/ValuesNotSupported.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2018, 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.
- */
-
-// key: compiler.err.feature.not.supported.in.source
-// key: compiler.misc.feature.value.types
-// key: compiler.warn.source.no.bootclasspath
-// options: -source 10
-
-__ByValue final class ValuesNotSupported {}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckClone.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types do not support clone
- *
- * @compile/fail/ref=CheckClone.out -XDrawDiagnostics CheckClone.java
- */
-
-final __ByValue class CheckClone {
-    final __ByValue class InnerValue {
-        void foo(InnerValue iv) {
-            iv.clone();
-            clone();
-        }
-    }
-    void foo(CheckClone v) {
-        v.clone();
-        clone();
-    }
-    @Override
-    protected Object clone() { return null; }
-}
\ No newline at end of file
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckClone.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-CheckClone.java:11:21: compiler.err.value.does.not.support: clone
-CheckClone.java:12:18: compiler.err.value.does.not.support: clone
-CheckClone.java:16:16: compiler.err.value.does.not.support: clone
-CheckClone.java:17:14: compiler.err.value.does.not.support: clone
-4 errors
\ No newline at end of file
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types may not declare fields of its own type either directly or indirectly.
- *
- * @compile/fail/ref=CheckCyclicMembership.out -XDrawDiagnostics CheckCyclicMembership.java
- */
-
-final __ByValue class CheckCyclicMembership {
-    class InnerRef {
-        CheckCyclicMembership ccm;
-    }
-    __ByValue final class InnerValue {
-        final CheckCyclicMembership ccm = __MakeDefault CheckCyclicMembership(); // Error.
-    }
-    final CheckCyclicMembership ccm = __MakeDefault CheckCyclicMembership(); // Error.
-    final int i = 10;
-    final String s = "blah";
-    final InnerRef ir = new InnerRef(); // OK.
-    final InnerValue iv = __MakeDefault InnerValue(); // Error. Some Order dependancy hides this. FIXME.
-}
\ No newline at end of file
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-CheckCyclicMembership.java:15:33: compiler.err.cyclic.value.type.membership: CheckCyclicMembership
-CheckCyclicMembership.java:13:37: compiler.err.cyclic.value.type.membership: CheckCyclicMembership.InnerValue
-2 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckEquals.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types do not support == or !=
- *
- * @compile/fail/ref=CheckEquals.out -XDrawDiagnostics CheckEquals.java
- */
-
-final __ByValue class CheckEquals {
-    boolean foo(CheckEquals a, CheckEquals b) {
-        return (a == b) || (a != b);
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckEquals.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-CheckEquals.java:10:19: compiler.err.value.does.not.support: ==
-CheckEquals.java:10:31: compiler.err.value.does.not.support: !=
-2 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckExtends.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Values may not extend
- *
- * @compile/fail/ref=CheckExtends.out -XDrawDiagnostics CheckExtends.java
- */
-
-final __ByValue class CheckExtends extends Object {
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckExtends.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-CheckExtends.java:8:17: compiler.err.value.may.not.extend
-1 error
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckFinal.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types and their instance fields must be final
- *
- * @compile/fail/ref=CheckFinal.out -XDrawDiagnostics CheckFinal.java
- */
-
-__ByValue class CheckFinal {  // <- error
-    int x;          // <- error
-    void f(int x) { // <- ok
-        int y;      // <- ok
-        __ByValue final class CheckLocalFinal {
-            int x; // <- error.
-        }
-    }
-    final Object o = new Object() { int i; }; // <- ok
-    static int xs; // OK.
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckFinal.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-CheckFinal.java:8:11: compiler.err.value.must.be.final
-CheckFinal.java:9:9: compiler.err.value.field.must.be.final
-CheckFinal.java:13:17: compiler.err.value.field.must.be.final
-3 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckFinalize.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types do not support finalize
- *
- * @compile/fail/ref=CheckFinalize.out -XDrawDiagnostics CheckFinalize.java
- */
-
-final __ByValue class CheckFinalize {
-    @Override
-    protected void finalize() {}
-
-    final __ByValue class CheckFinalizeInner {}
-
-    void foo(CheckFinalizeInner cfi, CheckFinalize cf) {
-        cfi.finalize();          // Error
-        cf.finalize();           // Error.
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckFinalize.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-CheckFinalize.java:15:12: compiler.err.report.access: finalize(), protected, java.lang.Object
-CheckFinalize.java:15:21: compiler.err.value.does.not.support: finalize
-CheckFinalize.java:16:20: compiler.err.value.does.not.support: finalize
-- compiler.note.deprecated.filename: CheckFinalize.java
-- compiler.note.deprecated.recompile
-3 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types do not support identityHashCode
- *
- * @compile/fail/ref=CheckIdentityHash.out -XDrawDiagnostics CheckIdentityHash.java
- */
-
-final __ByValue class CheckIdentityHash {
-    int identityHashCode(CheckIdentityHash x) {
-        return 0;
-    }
-    void test(CheckIdentityHash v) {
-        this.identityHashCode(v);      // <- ok
-        System.identityHashCode(v);    // <- error
-        System.identityHashCode(this); // <- error
-        java.lang.System.identityHashCode(v);    // <- error
-        java.lang.System.identityHashCode(this); // <- error
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-CheckIdentityHash.java:14:32: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash.java:15:32: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash.java:16:42: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash.java:17:42: compiler.err.value.does.not.support: identityHashCode
-4 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash01.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Value types do not support identityHashCode
- *
- * @compile/fail/ref=CheckIdentityHash01.out -XDrawDiagnostics CheckIdentityHash01.java
- */
-
-import static java.lang.System.*;
-
-final __ByValue class CheckIdentityHash01 {
-    void test(CheckIdentityHash01 v) {
-
-        identityHashCode(v);      // <- error
-        identityHashCode(this);   // <- error
-
-        System system = null;
-        system.identityHashCode(v);      // <- error
-        system.identityHashCode(this);   // <- error
-
-        System.identityHashCode(v);      // <- error
-        System.identityHashCode(this);   // <- error
-
-        java.lang.System.identityHashCode(v);    // <- error
-        java.lang.System.identityHashCode(this); // <- error
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash01.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-CheckIdentityHash01.java:13:25: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:14:25: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:17:32: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:18:32: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:20:32: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:21:32: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:23:42: compiler.err.value.does.not.support: identityHashCode
-CheckIdentityHash01.java:24:42: compiler.err.value.does.not.support: identityHashCode
-8 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Check various semantic constraints on value creation via __MakeDefault
- *
- * @compile/fail/ref=CheckMakeDefault.out -XDrawDiagnostics CheckMakeDefault.java
- */
-__ByValue final class Point {
-
-    static final class Sinner {
-        __ValueFactory static Sinner make() {
-            return __MakeDefault Sinner(); // NO: Sinner is not a value class.
-        }
-    }
-
-    __ByValue static final class SinnerValue {
-        __ValueFactory static SinnerValue make() {
-            return __MakeDefault SinnerValue(); // OK.
-        }
-    }
-
-    final int x;
-    final int y;
-
-    Point() {}
-    Point (int x, int y) {}
-
-    Point badFactory(int x, int y) {
-        return __MakeDefault Point(); // NO: Value created in a non-factory.
-    }
-
-    __ValueFactory static Point make(int x, int y) {
-       Point p = __MakeDefault Point(10, 20); // NO arguments to default value creation
-       String s = __MakeDefault String(); // NO: String cannot be produced in this factory.
-       __MakeDefault SinnerValue(); // NO: Wrong factory.
-       p = __MakeDefault Point();
-       p.x = x;
-       p.y = y;
-       return p;
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-CheckMakeDefault.java:11:20: compiler.err.make.default.with.nonvalue
-CheckMakeDefault.java:28:16: compiler.err.make.default.in.nonfactory
-CheckMakeDefault.java:32:18: compiler.err.invalid.arguments.to.make.default
-CheckMakeDefault.java:33:19: compiler.err.make.default.with.nonvalue
-CheckMakeDefault.java:34:8: compiler.err.make.default.with.wrong.value.type: Point.SinnerValue
-5 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckNullAssign.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Assignment of null to value types should be disallowed.
- *
- * @compile/fail/ref=CheckNullAssign.out -XDrawDiagnostics CheckNullAssign.java
- */
-
-final __ByValue class CheckNullAssign {
-    CheckNullAssign foo(CheckNullAssign cna) {
-        // All of the below involve subtype/assignability checks and should be rejected.
-        cna = null;
-        foo(null);
-        if (null instanceof CheckNullAssign) {}
-        return null;
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckNullAssign.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-CheckNullAssign.java:11:15: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.null, CheckNullAssign)
-CheckNullAssign.java:12:9: compiler.err.cant.apply.symbol: kindname.method, foo, CheckNullAssign, compiler.misc.type.null, kindname.class, CheckNullAssign, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.null, CheckNullAssign))
-CheckNullAssign.java:13:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.null, CheckNullAssign)
-CheckNullAssign.java:14:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.null, CheckNullAssign)
-4 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckNullCastable.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary null cannot be casted to and compared with value types.
- *
- * @compile/fail/ref=CheckNullCastable.out -XDrawDiagnostics CheckNullCastable.java
- */
-
-__ByValue final class CheckNullCastable {
-    void foo(CheckNullCastable cnc) {
-        CheckNullCastable cncl = (CheckNullCastable) null;
-        if (cnc != null) {};
-        if (null != cnc) {};
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckNullCastable.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-CheckNullCastable.java:10:54: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.null, CheckNullCastable)
-CheckNullCastable.java:11:17: compiler.err.incomparable.types: CheckNullCastable, compiler.misc.type.null
-CheckNullCastable.java:12:18: compiler.err.incomparable.types: compiler.misc.type.null, CheckNullCastable
-3 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckStaticValueFactory.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Check various semantic constraints on static value factory method
- *
- * @compile/fail/ref=CheckStaticValueFactory.out -XDrawDiagnostics CheckStaticValueFactory.java
- */
-__ByValue __ValueFactory final class Point { // NO: A type cannot be __ValueFactory
-
-    static class Sinner {
-        final int x;
-    }
-
-    interface I {
-        default __ValueFactory I foo() { // No: an interface method cannot be value factory
-            return null;
-        }
-    }
-
-    __ValueFactory final int x; // NO: A field cannot be value factory
-
-    final int y;
-    final int z = 0;
-
-    __ValueFactory Point() { // NO: A constructor cannot be value factory
-    }
-
-    __ValueFactory Point badFactory(int x, int y) { // No: factory must be a static method
-        return __MakeDefault Point();
-    }
-
-    __ValueFactory static String makeString(int x, int y) { // NO: bad return type for factory
-        String s = __MakeDefault String(); // NO: String is not a value type
-        return s;
-    }
-
-    __ValueFactory static Point make(int x, int y, int z) {
-       Point p = __MakeDefault Point();
-       p.x = x; // OK: allow update to blank final field via copy on write`
-       p.y = y; // OK: allow update to blank final field via copy on write`
-       p.z = z; // !OK, do not allow update to a non blank final even in a value factory.
-       Sinner s = new Sinner();
-       s.x = 10; // NO: No write to final field.
-       return p;
-    }
-
-    static Point nonFactory(int x, int y, int z) {
-       Point p = __MakeDefault Point(); // NO: cannot create default value in non-factory
-       p.x = x; // Error: No write to final field.
-       p.y = y; // Error: No write to final field.
-       p.z = z; // Error: No write to final field.
-       return p;
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckStaticValueFactory.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-CheckStaticValueFactory.java:7:32: compiler.err.mod.not.allowed.here: staticvaluefactory
-CheckStaticValueFactory.java:19:30: compiler.err.mod.not.allowed.here: staticvaluefactory
-CheckStaticValueFactory.java:24:20: compiler.err.mod.not.allowed.here: staticvaluefactory
-CheckStaticValueFactory.java:27:26: compiler.err.value.factory.must.be.static
-CheckStaticValueFactory.java:31:27: compiler.err.type.found.req: java.lang.String, Point
-CheckStaticValueFactory.java:14:34: compiler.err.mod.not.allowed.here: staticvaluefactory
-CheckStaticValueFactory.java:32:20: compiler.err.make.default.with.nonvalue
-CheckStaticValueFactory.java:40:9: compiler.err.cant.assign.val.to.final.var: z
-CheckStaticValueFactory.java:42:9: compiler.err.cant.assign.val.to.final.var: x
-CheckStaticValueFactory.java:47:18: compiler.err.make.default.in.nonfactory
-CheckStaticValueFactory.java:48:9: compiler.err.cant.assign.val.to.final.var: x
-CheckStaticValueFactory.java:49:9: compiler.err.cant.assign.val.to.final.var: y
-CheckStaticValueFactory.java:50:9: compiler.err.cant.assign.val.to.final.var: z
-13 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSuperCompileOnly.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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.
- */
-
-/*
- * @test
- * @summary Check that value types have their super types wired to be j.l.Object
- *
- * @compile Point.java
- * @compile CheckSuperCompileOnly.java
- */
-
-public class CheckSuperCompileOnly {
-    public static void main(String... args) {
-        final Point p = Point.makePoint(100, 200);
-        Object v = p;
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSync.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary May not synchronize on value types
- *
- * @compile/fail/ref=CheckSync.out -XDrawDiagnostics CheckSync.java
- */
-
-/* Note: ATM, value types do not have jlO in their lineage. So they anyway
-   cannot synchronize using the methods declared on jlO.
-*/
-
-public final __ByValue class CheckSync {
-
-    final __ByValue class Val {
-
-        void foo() {
-            // All calls below are bad.
-            wait();
-            wait(10);
-            wait(10, 10);
-            notify();
-            notifyAll();
-            finalize();
-            clone();
-        }
-    }
-
-    final Val val = __MakeDefault Val();
-
-    void test() throws InterruptedException {
-        // All calls below are bad.
-        val.wait();
-        val.wait(10);
-        val.wait(new Integer(10));
-        val.wait(new Long(10));
-        val.wait(10L);
-        val.wait(10L, 10);
-        val.notify();
-        val.notifyAll();
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSync.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-CheckSync.java:18:17: compiler.err.value.does.not.support: wait
-CheckSync.java:19:17: compiler.err.value.does.not.support: wait
-CheckSync.java:20:17: compiler.err.value.does.not.support: wait
-CheckSync.java:21:19: compiler.err.value.does.not.support: notify
-CheckSync.java:22:22: compiler.err.value.does.not.support: notifyAll
-CheckSync.java:23:21: compiler.err.value.does.not.support: finalize
-CheckSync.java:24:18: compiler.err.value.does.not.support: clone
-CheckSync.java:32:17: compiler.err.value.does.not.support: wait
-CheckSync.java:33:17: compiler.err.value.does.not.support: wait
-CheckSync.java:34:17: compiler.err.value.does.not.support: wait
-CheckSync.java:35:17: compiler.err.value.does.not.support: wait
-CheckSync.java:36:17: compiler.err.value.does.not.support: wait
-CheckSync.java:37:17: compiler.err.value.does.not.support: wait
-CheckSync.java:38:19: compiler.err.value.does.not.support: notify
-CheckSync.java:39:22: compiler.err.value.does.not.support: notifyAll
-- compiler.note.deprecated.filename: CheckSync.java
-- compiler.note.deprecated.recompile
-15 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSynchronized.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Check behavior of synzhronized key word on value instances and methods.
- *
- * @compile/fail/ref=CheckSynchronized.out -XDrawDiagnostics CheckSynchronized.java
- */
-
-__ByValue final class CheckSynchronized {
-    synchronized void foo() { // <<-- ERROR, no monitor associated with `this'
-    }
-    void goo() {
-        synchronized(this) {} // <<-- ERROR, no monitor associated with `this'
-    }
-    synchronized static void zoo(CheckSynchronized cs) { // OK, static method.
-        synchronized(cs) {    // <<-- ERROR, no monitor associated with value instance.
-        }
-    }
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSynchronized.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-CheckSynchronized.java:9:23: compiler.err.mod.not.allowed.here: synchronized
-CheckSynchronized.java:12:9: compiler.err.type.found.req: CheckSynchronized, (compiler.misc.type.req.ref)
-CheckSynchronized.java:15:9: compiler.err.type.found.req: CheckSynchronized, (compiler.misc.type.req.ref)
-3 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Do not allow mismatched instantiation syntax between value & reference types.
- *
- * @compile/fail/ref=CheckValueFactoryWithReference.out -XDrawDiagnostics CheckValueFactoryWithReference.java
- */
-
-final class CheckValueFactoryWithReference {
-    final Object o = __MakeDefault Object();
-    __ByValue final class Point {}
-    Point p = new Point();
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-CheckValueFactoryWithReference.java:9:22: compiler.err.make.default.with.nonvalue
-CheckValueFactoryWithReference.java:11:15: compiler.err.garbled.value.reference.instantiation
-2 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckValueModifier.java	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @summary Compiler should reject value modifier when it features in illegal contexts.
- *
- * @compile/fail/ref=CheckValueModifier.out -XDrawDiagnostics CheckValueModifier.java
- */
-
-/* Note: __ByValue as a modifier will be rejected by the parser if it features as a
-   modifier of a (a) catch parameter, (b) resource variable, (c) for loop's init section
-   declarators and (d) formal parameters. We test here only for the other illegal places.
-
-   All uses of __ByValue below should trigger errors.
-*/
-class CheckValueModifier {
-   __ByValue int x;
-   __ByValue int foo() {
-       __ByValue String local;
-   }
-   __ByValue interface IFace {}
-   __ByValue @interface Annot {}
-   __ByValue enum Enum {}
-   __ByValue abstract class Inner {}
-}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckValueModifier.out	Fri Feb 02 13:28:39 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-CheckValueModifier.java:19:14: compiler.err.illegal.combination.of.modifiers: interface, value
-CheckValueModifier.java:20:15: compiler.err.illegal.combination.of.modifiers: interface, value
-CheckValueModifier.java:21:14: compiler.err.mod.not.allowed.here: value
-CheckValueModifier.java:22:23: compiler.err.illegal.combination.of.modifiers: abstract, value
-CheckValueModifier.java:15:18: compiler.err.mod.not.allowed.here: value
-CheckValueModifier.java:16:18: compiler.err.mod.not.allowed.here: value
-CheckValueModifier.java:17:25: compiler.err.mod.not.allowed.here: value
-7 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/Point.java	Fri Feb 02 13:28:39 2018 +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.
- */
-
-/*
- * @test
- * @summary Test basic syntax of values
- *
- * @compile Point.java
- */
-
-final __ByValue class Point {
-    static final Point origin = makePoint(10, 20);
-    final int x;
-    final int y;
-    Point () {
-        x = 10;
-        y = 20;
-    }
-    __ValueFactory static Point makePoint(int x, int y) {
-        Point p = __MakeDefault Point();
-        p.x = x;
-        p.y = y;
-        return p;
-    }
-}
\ No newline at end of file