changeset 52022:418f9790c907 lworld

8207168:[LWorld] Withdraw support for __MakeDefault and add support for ValueType.default
author sadayapalam
date Fri, 14 Sep 2018 11:31:36 +0530
parents b826402f953a
children f770953cd104
files src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.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/jvm/Gen.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/TransValues.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/tree/TreeMaker.java src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value1.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value2.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value8.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapIteratorCursor.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueCursor.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueEntry.java test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueTotal.java test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue1.java test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue2.java test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue3.java test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue4.java test/hotspot/jtreg/compiler/valhalla/valuetypes/SimpleValueType.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNewAcmp.java test/hotspot/jtreg/runtime/valhalla/valuetypes/Empty.java test/hotspot/jtreg/runtime/valhalla/valuetypes/IntValue.java test/hotspot/jtreg/runtime/valhalla/valuetypes/JumboValue.java test/hotspot/jtreg/runtime/valhalla/valuetypes/Long8Value.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ObjectMethods.java test/hotspot/jtreg/runtime/valhalla/valuetypes/Person.java test/hotspot/jtreg/runtime/valhalla/valuetypes/Point.java test/hotspot/jtreg/runtime/valhalla/valuetypes/QuickeningTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/Test8186715.java test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue1.java test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue2.java test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue3.java test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue4.java test/hotspot/jtreg/runtime/valhalla/valuetypes/VDefaultTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/VWithFieldTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeArray.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeCreation.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeDensity.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeGenerator.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueWithJni.java test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod test/hotspot/jtreg/runtime/valhalla/valuetypes/consistency/ValuePoint.java test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/verifierTests.jcod test/jdk/java/lang/invoke/VarHandles/Value.java test/jdk/valhalla/valuetypes/Line.java test/jdk/valhalla/valuetypes/NonFlattenValue.java test/jdk/valhalla/valuetypes/Point.java test/jdk/valhalla/valuetypes/ValueArray.java test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java test/langtools/tools/javac/diags/examples.not-yet.txt test/langtools/tools/javac/valhalla/lworld-values/CastNullCheckTest.java test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.java test/langtools/tools/javac/valhalla/lworld-values/CheckFlattenableCycles.java 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/CheckStaticFinalAssign.java test/langtools/tools/javac/valhalla/lworld-values/CheckSync.java 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/IllegalByValueTest.java test/langtools/tools/javac/valhalla/lworld-values/IllegalByValueTest.out test/langtools/tools/javac/valhalla/lworld-values/Point.java test/langtools/tools/javac/valhalla/lworld-values/ValueBootstrapMethodsTest.java test/langtools/tools/javac/valhalla/lworld-values/ValueCreationTest.java test/langtools/tools/javac/valhalla/lworld-values/ValuesAsRefs.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldAccessorTest.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldNegativeTests.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfGenericType.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfImplicitThis.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldOperatorTest.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldRuntimeTest.java
diffstat 77 files changed, 163 insertions(+), 227 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/source/tree/NewClassTree.java	Fri Sep 14 11:31:36 2018 +0530
@@ -51,17 +51,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/comp/Attr.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Sep 14 11:31:36 2018 +0530
@@ -36,7 +36,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.*;
@@ -2499,7 +2498,7 @@
                  ((JCVariableDecl) env.tree).init != tree))
                 log.error(tree.pos(), Errors.EnumCantBeInstantiated);
 
-            if (tree.creationMode == CreationMode.NEW && types.isValue(clazztype)) {
+            if (types.isValue(clazztype)) {
                 if (!allowValueConstructors)
                     log.error(tree.pos(), Errors.GarbledValueReferenceInstantiation);
             }
@@ -2604,17 +2603,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");
-                }
-            }
-        }
         chk.validate(tree.typeargs, localEnv);
     }
 
@@ -3882,7 +3870,7 @@
         // Determine the expected kind of the qualifier expression.
         KindSelector skind = KindSelector.NIL;
         if (tree.name == names._this || tree.name == names._super ||
-                tree.name == names._class)
+                tree.name == names._class || tree.name == names._default)
         {
             skind = KindSelector.TYP;
         } else {
@@ -4051,6 +4039,13 @@
                     // In this case, we have already made sure in
                     // visitSelect that qualifier expression is a type.
                     return syms.getClassField(site, types);
+                } else if (name == names._default) {
+                    if (!types.isValue(site)) {
+                        log.error(pos, Errors.MakeDefaultWithNonvalue);
+                        return syms.errSymbol;
+                    } else {
+                        return new VarSymbol(STATIC, names._default, site, site.tsym);
+                    }
                 } else {
                     // We are seeing a plain identifier as selector.
                     Symbol sym = rs.findIdentInType(env, site, name, resultInfo.pkind);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Fri Sep 14 11:31:36 2018 +0530
@@ -3711,7 +3711,9 @@
             if (warned) return; // suppress redundant diagnostics
             switch (lint) {
                 case UNCHECKED:
-                    Check.this.warnUnchecked(pos(), Warnings.ProbFoundReq(diags.fragment(uncheckedKey), found, expected));
+                    JCTree tree;
+                    if (!(tree = pos().getTree()).hasTag(Tag.SELECT) || ((JCFieldAccess) tree).name != names._default)
+                        Check.this.warnUnchecked(pos(), Warnings.ProbFoundReq(diags.fragment(uncheckedKey), found, expected));
                     break;
                 case VARARGS:
                     if (method != null &&
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Fri Sep 14 11:31:36 2018 +0530
@@ -25,7 +25,6 @@
 
 package com.sun.tools.javac.jvm;
 
-import com.sun.source.tree.NewClassTree.CreationMode;
 import com.sun.tools.javac.tree.TreeInfo.PosKind;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -1855,23 +1854,16 @@
         Assert.check(tree.encl == null && tree.def == null);
         setTypeAnnotationPositions(tree.pos);
 
-        Type newType = tree.type;
+        code.emitop2(new_, makeRef(tree.pos(), tree.type));
+        code.emitop0(dup);
 
-        if (types.isValue(newType)) {
-            Assert.check(tree.creationMode == CreationMode.DEFAULT_VALUE);
-            Assert.check(tree.constructorType.getParameterTypes().isEmpty());
-            code.emitop2(defaultvalue, makeRef(tree.pos(), newType));
-        } else {
-            code.emitop2(new_, makeRef(tree.pos(), tree.type));
-            code.emitop0(dup);
+        // Generate code for all arguments, where the expected types are
+        // the parameters of the constructor's external type (that is,
+        // any implicit outer instance appears as first parameter).
+        genArgs(tree.args, tree.constructor.externalType(types).getParameterTypes());
 
-            // Generate code for all arguments, where the expected types are
-            // the parameters of the constructor's external type (that is,
-            // any implicit outer instance appears as first parameter).
-            genArgs(tree.args, tree.constructor.externalType(types).getParameterTypes());
+        items.makeMemberItem(tree.constructor, true).invoke();
 
-            items.makeMemberItem(tree.constructor, true).invoke();
-        }
         result = items.makeStackItem(tree.type);
     }
 
@@ -2201,7 +2193,11 @@
             code.emitLdc(makeRef(tree.pos(), tree.selected.type));
             result = items.makeStackItem(pt);
             return;
-       }
+        } else if (tree.name == names._default) {
+            code.emitop2(defaultvalue, makeRef(tree.pos(), tree.type));
+            result = items.makeStackItem(tree.type);
+            return;
+        }
 
         Symbol ssym = TreeInfo.symbol(tree.selected);
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/TransValues.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/TransValues.java	Fri Sep 14 11:31:36 2018 +0530
@@ -25,7 +25,6 @@
 
 package com.sun.tools.javac.jvm;
 
-import com.sun.source.tree.NewClassTree.CreationMode;
 import com.sun.tools.javac.code.Flags;
 import com.sun.tools.javac.code.Scope.LookupKind;
 import com.sun.tools.javac.code.Scope.WriteableScope;
@@ -202,13 +201,11 @@
                 final Name name = TreeInfo.name(call.meth);
                 MethodSymbol symbol = (MethodSymbol)TreeInfo.symbol(call.meth);
                 if (names._super.equals(name)) { // "initial" constructor.
-                    // Synthesize code to allocate factory "product" via: V $this = __MakeDefault V();
+                    // Synthesize code to allocate factory "product" via: V $this = V.default;
                     Assert.check(symbol.owner == syms.objectType.tsym);
                     Assert.check(symbol.type.getParameterTypes().size() == 0);
-                    MethodSymbol ctor = getDefaultConstructor(currentClass.sym);
-                    JCNewClass newClass = (JCNewClass) make.Create(ctor, List.nil(), CreationMode.DEFAULT_VALUE);
-                    newClass.constructorType = ctor.type;
-                    rhs = newClass;
+                    final JCExpression type = make.Type(currentClass.type);
+                    rhs = make.Select(type, new VarSymbol(Flags.STATIC, names._default, currentClass.type, currentClass.sym));
                 } else {
                     // This must be a chained call of form `this(args)'; Mutate it into a factory invocation i.e V $this = V.$makeValue$(args);
                     Assert.check(TreeInfo.name(TreeInfo.firstConstructorCall(tree).meth) == names._this);
@@ -349,7 +346,7 @@
     // Translate a reference style instance creation attempt on a value type to a static factory call.
     @Override
     public void visitNewClass(JCNewClass tree) {
-        if (tree.creationMode == CreationMode.NEW && types.isValue(tree.clazz.type)) {
+        if (types.isValue(tree.clazz.type)) {
             tree.encl = translate(tree.encl);
             tree.args = translate(tree.args);
             Assert.check(tree.def == null);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Sep 14 11:31:36 2018 +0530
@@ -33,7 +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.Flags.Flag;
 import com.sun.tools.javac.code.Source.Feature;
@@ -380,7 +379,6 @@
                 case THIS:
                 case SUPER:
                 case NEW:
-                case VDEFAULT:
                     if (stopAtStatement)
                         return;
                     break;
@@ -1185,14 +1183,12 @@
             } else return illegal();
             break;
         case NEW:
-        case VDEFAULT:
             if (typeArgs != null) return illegal();
             if ((mode & EXPR) != 0) {
                 selectExprMode();
-                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;
@@ -1289,6 +1285,12 @@
                         mode = oldmode;
                         if ((mode & EXPR) != 0) {
                             switch (token.kind) {
+                            case DEFAULT:
+                                if (typeArgs != null) return illegal();
+                                selectExprMode();
+                                t = F.at(pos).Select(t, names._default);
+                                nextToken();
+                                break loop;
                             case CLASS:
                                 if (typeArgs != null) return illegal();
                                 selectExprMode();
@@ -1311,10 +1313,9 @@
                                 if (typeArgs != null) return illegal();
                                 selectExprMode();
                                 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;
                             }
@@ -1430,10 +1431,6 @@
         return term3Rest(t, typeArgs);
     }
 
-    private CreationMode getCreationMode(Token token) {
-        return token.kind == NEW ? CreationMode.NEW : CreationMode.DEFAULT_VALUE;
-    }
-
     private List<JCCase> switchExpressionStatementGroup() {
         ListBuffer<JCCase> caseExprs = new ListBuffer<>();
         int casePos = token.pos;
@@ -1521,14 +1518,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();
                     selectExprMode();
                     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;
@@ -1683,7 +1679,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;
@@ -2191,8 +2187,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 {
@@ -2204,20 +2200,17 @@
 
     /** Creator = [Annotations] Qualident [TypeArguments] ( ArrayCreatorRest | ClassCreatorRest )
      */
-    JCExpression creator(int newpos, CreationMode creationMode, List<JCExpression> typeArgs) {
+    JCExpression creator(int newpos, List<JCExpression> typeArgs) {
         int valueModifierPos = Position.NOPOS;
         if (token.kind == VALUE) {
             checkSourceLevel(Feature.VALUE_TYPES);
-            if (creationMode == CreationMode.DEFAULT_VALUE) {
-                log.error(token.pos, Errors.ModNotAllowedHere(EnumSet.of(Flag.VALUE)));
-            }
             valueModifierPos = token.pos;
             nextToken();
         }
         List<JCAnnotation> newAnnotations = typeAnnotationsOpt();
         if (token.kind == VALUE) {
             checkSourceLevel(Feature.VALUE_TYPES);
-            if (creationMode == CreationMode.DEFAULT_VALUE || valueModifierPos != Position.NOPOS) {
+            if (valueModifierPos != Position.NOPOS) {
                 log.error(token.pos, Errors.ModNotAllowedHere(EnumSet.of(Flag.VALUE)));
             }
             valueModifierPos = token.pos;
@@ -2298,7 +2291,7 @@
             }
             return e;
         } else if (token.kind == LPAREN) {
-            JCNewClass newClass = classCreatorRest(newpos, creationMode, null, typeArgs, t, valueModifierPos == Position.NOPOS ? 0 : (Flags.VALUE | Flags.FINAL));
+            JCNewClass newClass = classCreatorRest(newpos,null, typeArgs, t, valueModifierPos == Position.NOPOS ? 0 : (Flags.VALUE | Flags.FINAL));
             if (newClass.def != null) {
                 assert newClass.def.mods.annotations.isEmpty();
                 if (newAnnotations.nonEmpty()) {
@@ -2330,7 +2323,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()));
@@ -2344,7 +2337,7 @@
             t = typeArguments(t, true);
             mode = oldmode;
         }
-        return classCreatorRest(newpos, creationMode, encl, typeArgs, t, 0);
+        return classCreatorRest(newpos, encl, typeArgs, t, 0);
     }
 
     /** ArrayCreatorRest = [Annotations] "[" ( "]" BracketsOpt ArrayInitializer
@@ -2424,7 +2417,6 @@
     /** ClassCreatorRest = Arguments [ClassBody]
      */
     JCNewClass classCreatorRest(int newpos,
-                                CreationMode creationMode,
                                   JCExpression encl,
                                   List<JCExpression> typeArgs,
                                   JCExpression t,
@@ -2438,7 +2430,7 @@
             JCModifiers mods = F.at(Position.NOPOS).Modifiers(flags);
             body = toP(F.at(pos).AnonymousClassDef(mods, defs));
         }
-        JCNewClass newClass = toP(F.at(newpos).NewClass(encl, typeArgs, t, args, body, creationMode));
+        JCNewClass newClass = toP(F.at(newpos).NewClass(encl, typeArgs, t, args, body));
         return newClass;
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java	Fri Sep 14 11:31:36 2018 +0530
@@ -166,7 +166,6 @@
         NOTFLATTENED("__NotFlattened"),
         TRY("try"),
         VALUE("__ByValue"),
-        VDEFAULT("__MakeDefault"),
         VOID("void", Tag.NAMED),
         VOLATILE("volatile"),
         WHILE("while"),
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Sep 14 11:31:36 2018 +0530
@@ -3464,9 +3464,6 @@
 compiler.err.value.does.not.support=\
     value types do not support {0}
 
-compiler.err.invalid.arguments.to.make.default=\
-    Superfluous arguments to default value creation
-
 compiler.err.make.default.with.nonvalue=\
     Default value creation requires a value type
 
@@ -3501,4 +3498,4 @@
 
 # 0: type
 compiler.err.generic.parameterization.with.value.type=\
-    Inferred type {0} involves generic parameterization by a value type; This is allowed only with -XDallowGenericsOverValues
\ No newline at end of file
+    Inferred type {0} involves generic parameterization by a value type; This is allowed only with -XDallowGenericsOverValues
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Fri Sep 14 11:31:36 2018 +0530
@@ -1779,7 +1779,6 @@
         public JCExpression clazz;
         public List<JCExpression> args;
         public JCClassDecl def;
-        public CreationMode creationMode;    // <- temporary
         public Symbol constructor;
         public Type varargsElement;
         public Type constructorType;
@@ -1787,8 +1786,7 @@
                            List<JCExpression> typeargs,
                            JCExpression clazz,
                            List<JCExpression> args,
-                           JCClassDecl def,
-                           CreationMode creationMode)
+                           JCClassDecl def)
         {
             this.encl = encl;
             this.typeargs = (typeargs == null) ? List.nil()
@@ -1796,7 +1794,6 @@
             this.clazz = clazz;
             this.args = args;
             this.def = def;
-            this.creationMode = creationMode;
         }
         @Override
         public void accept(Visitor v) { v.visitNewClass(this); }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Fri Sep 14 11:31:36 2018 +0530
@@ -29,7 +29,6 @@
 
 import com.sun.source.tree.CaseTree.CaseKind;
 import com.sun.source.tree.ModuleTree.ModuleKind;
-import com.sun.source.tree.NewClassTree.CreationMode;
 import com.sun.source.tree.Tree.Kind;
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Attribute.UnresolvedClass;
@@ -385,19 +384,7 @@
                              List<JCExpression> args,
                              JCClassDecl def)
     {
-        JCNewClass tree = new JCNewClass(encl, typeargs, clazz, args, def, CreationMode.NEW);
-        tree.pos = pos;
-        return tree;
-    }
-
-    public JCNewClass NewClass(JCExpression encl,
-                               List<JCExpression> typeargs,
-                               JCExpression clazz,
-                               List<JCExpression> args,
-                               JCClassDecl def,
-                               CreationMode creationMode)
-    {
-        JCNewClass tree = new JCNewClass(encl, typeargs, clazz, args, def, creationMode);
+        JCNewClass tree = new JCNewClass(encl, typeargs, clazz, args, def);
         tree.pos = pos;
         return tree;
     }
@@ -748,14 +735,8 @@
     /** Create a method invocation from a method tree and a list of argument trees.
      */
     public JCExpression Create(Symbol ctor, List<JCExpression> args) {
-        return Create(ctor, args, CreationMode.NEW);
-    }
-
-    /** Create a method invocation from a method tree and a list of argument trees.
-     */
-    public JCExpression Create(Symbol ctor, List<JCExpression> args, CreationMode creationMode) {
         Type t = ctor.owner.erasure(types);
-        JCNewClass newclass = NewClass(null, null, Type(t), args, null, creationMode);
+        JCNewClass newclass = NewClass(null, null, Type(t), args, null);
         newclass.constructor = ctor;
         newclass.setType(t);
         return newclass;
--- a/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java	Fri Sep 14 11:31:36 2018 +0530
@@ -184,7 +184,6 @@
         IDENTIFIER(TokenKind.IDENTIFIER, XEXPR1|XDECL1|XTERM),  //
         UNDERSCORE(TokenKind.UNDERSCORE, XERRO),  //  _
         VALUE(TokenKind.VALUE, XEXPR1|XDECL1|XTERM),  //  "__ByValue"
-        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/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value1.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value1.java	Fri Sep 14 11:31:36 2018 +0530
@@ -11,7 +11,7 @@
     }
 
     public static Value1 of(int f0) {
-        Value1 v = __MakeDefault Value1();
+        Value1 v = Value1.default;
         v = __WithField(v.f0, f0);
         return v;
     }
--- a/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value2.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value2.java	Fri Sep 14 11:31:36 2018 +0530
@@ -13,7 +13,7 @@
     }
 
     public static Value2 of(int f0, int f1) {
-        Value2 v = __MakeDefault Value2();
+        Value2 v = Value2.default;
         v = __WithField(v.f0, f0);
         v = __WithField(v.f1, f1);
         return v;
--- a/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value8.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/types/Value8.java	Fri Sep 14 11:31:36 2018 +0530
@@ -25,7 +25,7 @@
     }
 
     public static Value8 of(int f0,int f1,int f2,int f3,int f4,int f5,int f6,int f7) {
-        Value8 v = __MakeDefault Value8();
+        Value8 v = Value8.default;
         v = __WithField(v.f0, f0);
         v = __WithField(v.f1, f1);
         v = __WithField(v.f2, f2);
--- a/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapIteratorCursor.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapIteratorCursor.java	Fri Sep 14 11:31:36 2018 +0530
@@ -260,7 +260,7 @@
         }
 
         public static <K,V> EntryCursor<K,V> of(HashMapIteratorCursor<K, V> map, int expectedModCount, int index, Entry<K, V> current) {
-            EntryCursor c = __MakeDefault EntryCursor();
+            EntryCursor c = EntryCursor.default;
             c = __WithField(c.map, map);
             c = __WithField(c.expectedModCount, expectedModCount);
             c = __WithField(c.index, index);
@@ -321,7 +321,7 @@
         }
 
         public static <K,V> KeyCursor<K,V> of(HashMapIteratorCursor<K, V> map, int expectedModCount, int index, Entry<K, V> current) {
-            KeyCursor c = __MakeDefault KeyCursor();
+            KeyCursor c = KeyCursor.default;
             c = __WithField(c.map, map);
             c = __WithField(c.expectedModCount, expectedModCount);
             c = __WithField(c.index, index);
--- a/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueCursor.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueCursor.java	Fri Sep 14 11:31:36 2018 +0530
@@ -278,7 +278,7 @@
         }
 
         public static <K,V> EntryCursor<K,V> of(HashMapValueCursor<K, V> map, int expectedModCount, int index, Entry<K, V> current) {
-            EntryCursor c = __MakeDefault EntryCursor();
+            EntryCursor c = EntryCursor.default;
             c = __WithField(c.map, map);
             c = __WithField(c.expectedModCount, expectedModCount);
             c = __WithField(c.index, index);
@@ -339,7 +339,7 @@
         }
 
         public static <K,V> KeyCursor<K,V> of(HashMapValueCursor<K, V> map, int expectedModCount, int index, Entry<K, V> current) {
-            KeyCursor c = __MakeDefault KeyCursor();
+            KeyCursor c = KeyCursor.default;
             c = __WithField(c.map, map);
             c = __WithField(c.expectedModCount, expectedModCount);
             c = __WithField(c.index, index);
--- a/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueEntry.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueEntry.java	Fri Sep 14 11:31:36 2018 +0530
@@ -39,12 +39,12 @@
         final int hash;
 
         public static <K,V> Entry<K,V> empty() {
-            Entry e = __MakeDefault Entry();
+            Entry e = Entry.default;
             return e;
         }
 
         public static <K,V> Entry<K,V> of(int h, K k, V v, HEntry<K, V> n) {
-            Entry e = __MakeDefault Entry();
+            Entry e = Entry.default;
             e = __WithField(e.key, k);
             e = __WithField(e.value, v);
             e = __WithField(e.next, n);
--- a/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueTotal.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/benchmarks/src/main/java/oracle/micro/valhalla/lworld/util/HashMapValueTotal.java	Fri Sep 14 11:31:36 2018 +0530
@@ -39,12 +39,12 @@
         final int hash;
 
         public static <K,V> Entry<K,V> empty() {
-            Entry e = __MakeDefault Entry();
+            Entry e = Entry.default;
             return e;
         }
 
         public static <K,V> Entry<K,V> of(int h, K k, V v, HEntry<K, V> n) {
-            Entry e = __MakeDefault Entry();
+            Entry e = Entry.default;
             e = __WithField(e.key, k);
             e = __WithField(e.value, v);
             e = __WithField(e.next, n);
@@ -378,7 +378,7 @@
         }
 
         public static <K,V> EntryCursor<K,V> of(HashMapValueTotal<K, V> map, int expectedModCount, int index, HEntry<K, V> current) {
-            EntryCursor c = __MakeDefault EntryCursor();
+            EntryCursor c = EntryCursor.default;
             c = __WithField(c.map, map);
             c = __WithField(c.expectedModCount, expectedModCount);
             c = __WithField(c.index, index);
@@ -437,7 +437,7 @@
         }
 
         public static <K,V> KeyCursor<K,V> of(HashMapValueTotal<K, V> map, int expectedModCount, int index, HEntry<K, V> current) {
-            KeyCursor c = __MakeDefault KeyCursor();
+            KeyCursor c = KeyCursor.default;
             c = __WithField(c.map, map);
             c = __WithField(c.expectedModCount, expectedModCount);
             c = __WithField(c.index, index);
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue1.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue1.java	Fri Sep 14 11:31:36 2018 +0530
@@ -55,7 +55,7 @@
 
     @ForceInline
     static MyValue1 createDefaultInline() {
-        return __MakeDefault MyValue1();
+        return MyValue1.default;
     }
 
     @DontInline
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue2.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue2.java	Fri Sep 14 11:31:36 2018 +0530
@@ -46,7 +46,7 @@
 
     @ForceInline
     public static MyValue2Inline createDefault() {
-        return __MakeDefault MyValue2Inline();
+        return MyValue2Inline.default;
     }
 
     @ForceInline
@@ -71,7 +71,7 @@
 
     @ForceInline
     public static MyValue2 createDefaultInline() {
-        return __MakeDefault MyValue2();
+        return MyValue2.default;
     }
 
     @ForceInline
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue3.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue3.java	Fri Sep 14 11:31:36 2018 +0530
@@ -49,7 +49,7 @@
 
     @ForceInline
     public static MyValue3Inline createDefault() {
-        return __MakeDefault MyValue3Inline();
+        return MyValue3Inline.default;
     }
 
     @ForceInline
@@ -174,7 +174,7 @@
 
     @ForceInline
     public static MyValue3 createDefault() {
-        return __MakeDefault MyValue3();
+        return MyValue3.default;
     }
 
     @ForceInline
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue4.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/MyValue4.java	Fri Sep 14 11:31:36 2018 +0530
@@ -47,7 +47,7 @@
 
     @ForceInline
     public static MyValue4 createDefault() {
-        return __MakeDefault MyValue4();
+        return MyValue4.default;
     }
 
     @ForceInline
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/SimpleValueType.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/SimpleValueType.java	Fri Sep 14 11:31:36 2018 +0530
@@ -29,7 +29,7 @@
     }
 
     static SimpleValueType create() {
-        return __MakeDefault SimpleValueType();
+        return SimpleValueType.default;
     }
 }
 
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java	Fri Sep 14 11:31:36 2018 +0530
@@ -1851,7 +1851,7 @@
     public void test65_verifier(boolean warmup) {
         MyValue1 vt = testValue1;
         MyValue1 def = MyValue1.createDefaultDontInline();
-        Test65Value holder = __MakeDefault Test65Value();
+        Test65Value holder = Test65Value.default;
         Asserts.assertEQ(testValue1.hash(), vt.hash());
         holder = holder.init();
         Asserts.assertEQ(holder.valueField1.hash(), vt.hash());
@@ -1869,7 +1869,7 @@
 
     @DontCompile
     public void test66_verifier(boolean warmup) {
-        Test65Value vt = __MakeDefault Test65Value();
+        Test65Value vt = Test65Value.default;
         test66(vt);
     }
 
@@ -2226,7 +2226,7 @@
     @Test
     @Warmup(0)
     public int test86() {
-        Test86Value vt = __MakeDefault Test86Value();
+        Test86Value vt = Test86Value.default;
         return vt.get();
     }
 
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNewAcmp.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNewAcmp.java	Fri Sep 14 11:31:36 2018 +0530
@@ -81,7 +81,7 @@
     final int x = 42;
 
     static MyValue createDefault() {
-        return __MakeDefault MyValue();
+        return MyValue.default;
     }
 }
 
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/Empty.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/Empty.java	Fri Sep 14 11:31:36 2018 +0530
@@ -29,7 +29,7 @@
     }
 
     public static EmptyValue createEmptyValue() {
-        EmptyValue e = __MakeDefault EmptyValue();
+        EmptyValue e = EmptyValue.default;
         return e;
     }
 }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/IntValue.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/IntValue.java	Fri Sep 14 11:31:36 2018 +0530
@@ -33,7 +33,7 @@
     public int getInt() { return val; }
 
     public static IntValue create(int val) {
-        IntValue iv = __MakeDefault IntValue();
+        IntValue iv = IntValue.default;
         iv.val = val;
         return iv;
     }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/JumboValue.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/JumboValue.java	Fri Sep 14 11:31:36 2018 +0530
@@ -68,7 +68,7 @@
     }
 
     public static JumboValue createJumboValue() {
-        JumboValue j = __MakeDefault JumboValue();
+        JumboValue j = JumboValue.default;
         return j;
     }
 
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/Long8Value.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/Long8Value.java	Fri Sep 14 11:31:36 2018 +0530
@@ -64,7 +64,7 @@
             long long6,
             long long7,
             long long8) {
-        Long8Value l8v = __MakeDefault Long8Value();
+        Long8Value l8v = Long8Value.default;
         l8v = __WithField(l8v.longField1, long1);
         l8v = __WithField(l8v.longField2, long2);
         l8v = __WithField(l8v.longField3, long3);
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ObjectMethods.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ObjectMethods.java	Fri Sep 14 11:31:36 2018 +0530
@@ -214,7 +214,7 @@
         final int value;
         private MyInt() { value = 0; }
         public static MyInt create(int v) {
-            MyInt mi = __MakeDefault MyInt();
+            MyInt mi = MyInt.default;
             mi = __WithField(mi.value, v);
             return mi;
         }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/Person.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/Person.java	Fri Sep 14 11:31:36 2018 +0530
@@ -44,7 +44,7 @@
     }
 
     static Person create(int id, String firstName, String lastName) {
-        Person p = __MakeDefault Person();
+        Person p = Person.default;
         p = __WithField(p.id, id);
         p = __WithField(p.firstName, firstName);
         p = __WithField(p.lastName, lastName);
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/Point.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/Point.java	Fri Sep 14 11:31:36 2018 +0530
@@ -51,7 +51,7 @@
     }
 
     public static Point createPoint(int x, int y) {
-        Point p = __MakeDefault Point();
+        Point p = Point.default;
         p = __WithField(p.x, x);
         p = __WithField(p.y, y);
         return p;
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/QuickeningTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/QuickeningTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -69,7 +69,7 @@
         }
 
         public static Value create() {
-            return __MakeDefault Value();
+            return Value.default;
         }
     }
 
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/Test8186715.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/Test8186715.java	Fri Sep 14 11:31:36 2018 +0530
@@ -53,7 +53,7 @@
     }
 
     static MyValueType testDefault() {
-        return __MakeDefault MyValueType();
+        return MyValueType.default;
     }
 
     static MyValueType testBranchArg1(boolean flag, MyValueType v1) {
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue1.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue1.java	Fri Sep 14 11:31:36 2018 +0530
@@ -41,14 +41,14 @@
     }
 
     public static TestValue1 create(int i) {
-        TestValue1 v = __MakeDefault TestValue1();
+        TestValue1 v = TestValue1.default;
         v = __WithField(v.i, i);
         v = __WithField(v.name, Integer.valueOf(i).toString());
         return v;
     }
 
     public static TestValue1 create() {
-        TestValue1 v = __MakeDefault TestValue1();
+        TestValue1 v = TestValue1.default;
         v = __WithField(v.i, (int)System.nanoTime());
         v = __WithField(v.name, Integer.valueOf(v.i).toString());
         return v;
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue2.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue2.java	Fri Sep 14 11:31:36 2018 +0530
@@ -42,7 +42,7 @@
     }
 
     public static TestValue2 create(long l) {
-        TestValue2 v = __MakeDefault TestValue2();
+        TestValue2 v = TestValue2.default;
         v = __WithField(v.l, l);
         v = __WithField(v.s, Long.valueOf(l).toString());
         v = __WithField(v.d, Double.parseDouble(v.s));
@@ -50,7 +50,7 @@
     }
 
     public static TestValue2 create() {
-        TestValue2 v = __MakeDefault TestValue2();
+        TestValue2 v = TestValue2.default;
         v = __WithField(v.l, System.nanoTime());
         v = __WithField(v.s, Long.valueOf(v.l).toString());
         v = __WithField(v.d, Double.parseDouble(v.s));
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue3.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue3.java	Fri Sep 14 11:31:36 2018 +0530
@@ -39,13 +39,13 @@
     }
 
     public static TestValue3 create(byte b) {
-        TestValue3 v = __MakeDefault TestValue3();
+        TestValue3 v = TestValue3.default;
         v = __WithField(v.b, b);
         return v;
     }
 
     public static TestValue3 create() {
-        TestValue3 v = __MakeDefault TestValue3();
+        TestValue3 v = TestValue3.default;
         v = __WithField(v.b, 123);
         return v;
     }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue4.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestValue4.java	Fri Sep 14 11:31:36 2018 +0530
@@ -57,7 +57,7 @@
     }
 
     public static TestValue4 create(int i) {
-        TestValue4 v = __MakeDefault TestValue4();
+        TestValue4 v = TestValue4.default;
         v = __WithField(v.i, i);
         v = __WithField(v.val, Integer.valueOf(i).toString());
         ByteBuffer bf = ByteBuffer.allocate(8);
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/VDefaultTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/VDefaultTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -42,7 +42,7 @@
         final int y;
 
         static Point make() {
-            Point p = __MakeDefault Point();
+            Point p = Point.default;
             return p;
         }
 
@@ -63,7 +63,7 @@
         __Flattenable final Point p;
 
         static Value make() {
-            Value p = __MakeDefault Value();
+            Value p = Value.default;
             return p;
         }
 
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/VWithFieldTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/VWithFieldTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -42,7 +42,7 @@
         final private int y;
 
         static Point make(int x, int y) {
-            Point p = __MakeDefault Point();
+            Point p = Point.default;
             Asserts.assertEquals(p.x, 0, "invalid x default value");
             Asserts.assertEquals(p.y, 0, "invalid y default value");
             p = __WithField(p.x, x);
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java	Fri Sep 14 11:31:36 2018 +0530
@@ -126,7 +126,7 @@
         }
 
         public static Composition create(Person onePerson, Person otherPerson) {
-            Composition comp = __MakeDefault Composition();
+            Composition comp = Composition.default;
             comp = __WithField(comp.onePerson, onePerson);
             comp = __WithField(comp.otherPerson, otherPerson);
             return comp;
@@ -560,7 +560,7 @@
         }
 
         public static FooValue create(int id, String name, String description, long timestamp, String notes) {
-            FooValue f = __MakeDefault FooValue();
+            FooValue f = FooValue.default;
             f = __WithField(f.id, id);
             f = __WithField(f.name, name);
             f = __WithField(f.description, description);
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeArray.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeArray.java	Fri Sep 14 11:31:36 2018 +0530
@@ -208,7 +208,7 @@
         }
 
         public static MyInt create(int v) {
-            MyInt mi = __MakeDefault MyInt();
+            MyInt mi = MyInt.default;
             mi = __WithField(mi.value, v);
             return mi;
         }
@@ -371,12 +371,12 @@
             return false;
         }
         static MyPoint create(int x) {
-            MyPoint mp = __MakeDefault MyPoint();
+            MyPoint mp = MyPoint.default;
             mp = __WithField(mp.x, MyInt.create(x));
             return mp;
         }
         static MyPoint create(int x, int y) {
-            MyPoint mp = __MakeDefault MyPoint();
+            MyPoint mp = MyPoint.default;
             mp = __WithField(mp.x, MyInt.create(x));
             mp = __WithField(mp.y, MyInt.create(y));
             return mp;
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeCreation.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeCreation.java	Fri Sep 14 11:31:36 2018 +0530
@@ -82,7 +82,7 @@
         public String toString() { return "StaticSelf f1=" + f1; }
 
         static StaticSelf create(int f1) {
-            StaticSelf s = __MakeDefault StaticSelf();
+            StaticSelf s = StaticSelf.default;
             s = __WithField(s.f1, f1);
             return s;
         }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeDensity.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeDensity.java	Fri Sep 14 11:31:36 2018 +0530
@@ -82,7 +82,7 @@
         public short getDay()   { return day; }
 
         public static LocalDateValue create(int year, short month, short day) {
-            LocalDateValue localDate = __MakeDefault LocalDateValue();
+            LocalDateValue localDate = LocalDateValue.default;
             localDate = __WithField(localDate.year, year);
             localDate = __WithField(localDate.month, month);
             localDate = __WithField(localDate.day, day);
@@ -109,7 +109,7 @@
         public int getNano()    { return nano; }
 
         public static LocalTimeValue create(byte hour, byte minute, byte second, int nano) {
-            LocalTimeValue localTime = __MakeDefault LocalTimeValue();
+            LocalTimeValue localTime = LocalTimeValue.default;
             localTime = __WithField(localTime.hour, hour);
             localTime = __WithField(localTime.minute, minute);
             localTime = __WithField(localTime.second, second);
@@ -138,7 +138,7 @@
         public int getNano()    { return time.nano; }
 
         public static LocalDateTimeValue create(LocalDateValue date, LocalTimeValue time) {
-            LocalDateTimeValue localDateTime = __MakeDefault LocalDateTimeValue();
+            LocalDateTimeValue localDateTime = LocalDateTimeValue.default;
             localDateTime = __WithField(localDateTime.date, date);
             localDateTime = __WithField(localDateTime.time, time);
             return localDateTime;
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeGenerator.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeGenerator.java	Fri Sep 14 11:31:36 2018 +0530
@@ -139,7 +139,7 @@
         sb.append("\tstatic public ").append(name).append(" ").append("make").append(name).append("(");
         sb.append(fieldsAsArgs(fields));
         sb.append(") {\n");
-        sb.append("\t\t").append(name).append(" v = ").append("__MakeDefault ").append(name).append("();\n");
+        sb.append("\t\t").append(name).append(" v = ").append(name).append(".default;\n");
         for (int i = 0 ; i < fields.length; i++) {
             sb.append("\t\tv = __WithField(v.").append(fields[i].name).append(", ").append(fields[i].name).append(");\n");
         }
@@ -149,7 +149,7 @@
 
         // default factory
         sb.append("\tstatic public ").append(name).append(" ").append("make").append(name).append("() {\n");
-        sb.append("\t\t").append(name).append(" v = ").append("__MakeDefault ").append(name).append("();\n");
+        sb.append("\t\t").append(name).append(" v = ").append(name).append(".default;\n");
         for (int i = 0 ; i < fields.length; i++) {
             sb.append("\t\tv = __WithField(v.").append(fields[i].name).append(", ").append(defaultValue(fields[i].type)).append(");\n");
         }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueWithJni.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueWithJni.java	Fri Sep 14 11:31:36 2018 +0530
@@ -45,7 +45,7 @@
     public native void doJniMonitorExit();
 
     public static ValueWithJni createValueWithJni(int x) {
-        ValueWithJni v = __MakeDefault ValueWithJni();
+        ValueWithJni v = ValueWithJni.default;
         v = __WithField(v.x, x);
         return v;
     }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod	Fri Sep 14 11:31:36 2018 +0530
@@ -36,7 +36,7 @@
 //         int_v = 1;
 //     }
 //     static Value makeValue(int x) {
-//         Value v = __MakeDefault Value();
+//         Value v = Value.default;
 //         v = __WithField(v.int_v, x);
 //         return v;
 //     }
@@ -1285,10 +1285,10 @@
 //     __Flattenable final Circ2 v2;
 //     Circ() {
 //         int_v = 1;
-//         v2 = __MakeDefault Circ2();
+//         v2 = Circ2.default;
 //     }
 //     static Circ makeCirc(int x) {
-//         Circ v = __MakeDefault Circ();
+//         Circ v = Circ.default;
 //         v = __WithField(v.int_v, x);
 //         return v;
 //     }
@@ -1300,10 +1300,10 @@
 //     __Flattenable final Circ vv;
 //     Circ2() {
 //         char_v = 'z';
-//         vv = __MakeDefault Circ();
+//         vv = Circ.default;
 //     }
 //     static Circ2 makeCirc2(char c) {
-//         Circ2 v = __MakeDefault Circ2();
+//         Circ2 v = Circ2.default;
 //         v = __WithField(v.char_v, c);
 //         return v;
 //     }
@@ -1655,12 +1655,12 @@
 // final __ByValue class CircStaticA {
 //     static final CircStaticA VT = makeCircStaticA(0x01234567);
 //     final int int_v;
-//     __Flattenable static final CircStaticB v2 = __MakeDefault CircStaticB();
+//     __Flattenable static final CircStaticB v2 = CircStaticB.default;
 //     CircStaticA() {
 //         int_v = 1;
 //     }
 //     static CircStaticA makeCircStaticA(int x) {
-//         CircStaticA v = __MakeDefault CircStaticA();
+//         CircStaticA v = CircStaticA.default;
 //         v = __WithField(v.int_v, x);
 //         return v;
 //     }
@@ -1669,12 +1669,12 @@
 // final __ByValue class CircStaticB {
 //     static final CircStaticB VT = makeCircStaticB(0x01234567);
 //     final int int_v;
-//     __Flattenable static final CircStaticA v2 = __MakeDefault CircStaticA();
+//     __Flattenable static final CircStaticA v2 = CircStaticA.default;
 //     CircStaticB() {
 //         int_v = 1;
 //     }
 //     static CircStaticB makeCircStaticB(int x) {
-//         CircStaticB v = __MakeDefault CircStaticB();
+//         CircStaticB v = CircStaticB.default;
 //         v = __WithField(v.int_v, x);
 //         return v;
 //     }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/consistency/ValuePoint.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/consistency/ValuePoint.java	Fri Sep 14 11:31:36 2018 +0530
@@ -35,7 +35,7 @@
     public int getY() { return y; }
 
     public static Point createPoint() {
-        Point p = __MakeDefault Point();
+        Point p = Point.default;
         return p;
     }
 }
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/verifierTests.jcod	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/verifier/verifierTests.jcod	Fri Sep 14 11:31:36 2018 +0530
@@ -31,7 +31,7 @@
 //         int_v = 1;
 //     }
 //     static Value makeValue(int x) {
-//         Value v = __MakeDefault Value();
+//         Value v = Value.default;
 //         v = __WithField(v.int_v, x);
 //         return v;
 //     }
--- a/test/jdk/java/lang/invoke/VarHandles/Value.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/Value.java	Fri Sep 14 11:31:36 2018 +0530
@@ -41,7 +41,7 @@
         double_v = 0.2d;
     }
     static Value makeValue(char c, boolean z, byte b, int x, short y, long l, float f, double d) {
-        Value v = __MakeDefault Value();
+        Value v = Value.default;
         v = __WithField(v.char_v, c);
         v = __WithField(v.byte_v, b);
         v = __WithField(v.boolean_v, z);
--- a/test/jdk/valhalla/valuetypes/Line.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/Line.java	Fri Sep 14 11:31:36 2018 +0530
@@ -42,7 +42,7 @@
     }
 
     public static Line makeLine(Point p1, Point p2) {
-        Line l = __MakeDefault Line();
+        Line l = Line.default;
 
         l = __WithField(l.p1, p1);
         l = __WithField(l.p2, p2);
--- a/test/jdk/valhalla/valuetypes/NonFlattenValue.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/NonFlattenValue.java	Fri Sep 14 11:31:36 2018 +0530
@@ -33,7 +33,7 @@
     }
 
     public static NonFlattenValue make(int x, int y) {
-        NonFlattenValue v = __MakeDefault NonFlattenValue();
+        NonFlattenValue v = NonFlattenValue.default;
         v = __WithField(v.nfp, Point.makePoint(x, y));
         return v;
     }
--- a/test/jdk/valhalla/valuetypes/Point.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/Point.java	Fri Sep 14 11:31:36 2018 +0530
@@ -30,7 +30,7 @@
         y = 20;
     }
     public static Point makePoint(int x, int y) {
-        Point p = __MakeDefault Point();
+        Point p = Point.default;
         p = __WithField(p.x, x);
         p = __WithField(p.y, y);
         return p;
--- a/test/jdk/valhalla/valuetypes/ValueArray.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ValueArray.java	Fri Sep 14 11:31:36 2018 +0530
@@ -140,7 +140,7 @@
             points = new Point[0];
         }
         public static PointArray makeArray(Point... points) {
-            PointArray a = __MakeDefault PointArray();
+            PointArray a = PointArray.default;
             a = __WithField(a.points, points);
             return a;
         }
--- a/test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java	Fri Sep 14 11:31:36 2018 +0530
@@ -90,7 +90,7 @@
             this.l = List.of();
         }
         public static Value make(int i, double d, String s, String... items) {
-            Value v = __MakeDefault Value();
+            Value v = Value.default;
             v = __WithField(v.i, i);
             v = __WithField(v.d, d);
             v = __WithField(v.s, s);
--- a/test/langtools/tools/javac/diags/examples.not-yet.txt	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/diags/examples.not-yet.txt	Fri Sep 14 11:31:36 2018 +0530
@@ -198,7 +198,6 @@
 compiler.err.cyclic.value.type.membership
 compiler.err.garbled.value.reference.instantiation
 compiler.err.value.does.not.support
-compiler.err.invalid.arguments.to.make.default
 compiler.err.make.default.with.nonvalue
 compiler.err.value.may.not.extend
 compiler.warn.potential.null.pollution
--- a/test/langtools/tools/javac/valhalla/lworld-values/CastNullCheckTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CastNullCheckTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -55,7 +55,7 @@
             caught++;
         }
 
-        o = __MakeDefault Point();
+        o = Point.default;
         try {
             Point p = (Point) o;
         } catch (NullPointerException npe) {
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.java	Fri Sep 14 11:31:36 2018 +0530
@@ -10,11 +10,11 @@
         CheckCyclicMembership ccm;
     }
     __ByValue final class InnerValue {
-        final CheckCyclicMembership ccm = __MakeDefault CheckCyclicMembership(); // Error.
+        final CheckCyclicMembership ccm = CheckCyclicMembership.default; // Error.
     }
-    final CheckCyclicMembership ccm = __MakeDefault CheckCyclicMembership(); // Error.
+    final CheckCyclicMembership ccm = CheckCyclicMembership.default; // Error.
     final int i = 10;
     final String s = "blah";
     final InnerRef ir = new InnerRef(); // OK.
-    final InnerValue iv = __MakeDefault InnerValue(); // Error
-}
\ No newline at end of file
+    final InnerValue iv = InnerValue.default; // Error
+}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckFlattenableCycles.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckFlattenableCycles.java	Fri Sep 14 11:31:36 2018 +0530
@@ -10,11 +10,11 @@
         CheckFlattenableCycles cfc;
     }
     __ByValue final class InnerValue {
-        final __Flattenable CheckFlattenableCycles cfc = __MakeDefault CheckFlattenableCycles(); // Error.
+        final __Flattenable CheckFlattenableCycles cfc = CheckFlattenableCycles.default; // Error.
     }
-    final __Flattenable CheckFlattenableCycles cfc = __MakeDefault CheckFlattenableCycles(); // Error.
+    final __Flattenable CheckFlattenableCycles cfc = CheckFlattenableCycles.default; // Error.
     final int i = 10;
     final String s = "blah";
     final InnerRef ir = new InnerRef(); // OK.
-    final __Flattenable InnerValue iv = __MakeDefault InnerValue(); // Error
+    final __Flattenable InnerValue iv = InnerValue.default; // Error
 }
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java	Fri Sep 14 11:31:36 2018 +0530
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @summary Check various semantic constraints on value creation via __MakeDefault
+ * @summary Check various semantic constraints on value creation via default
  *
  * @compile/fail/ref=CheckMakeDefault.out -XDrawDiagnostics CheckMakeDefault.java
  */
@@ -10,13 +10,13 @@
     __ByValue abstract class A { int x = 10; } // Error
     static final class Sinner {
         static Sinner make() {
-            return __MakeDefault Sinner(); // NO: Sinner is not a value class.
+            return Sinner.default; // NO: Sinner is not a value class.
         }
     }
 
     __ByValue static final class SinnerValue {
         static SinnerValue make() {
-            return __MakeDefault SinnerValue(); // OK.
+            return SinnerValue.default; // OK.
         } int x = 10;
     }
 
@@ -27,14 +27,14 @@
     Point (int x, int y) {}
 
     Point badFactory(int x, int y) {
-        return __MakeDefault Point();
+        return Point.default;
     }
 
     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();
-       p = __MakeDefault Point();
+       Point p = Point.default;
+       String s = String.default;
+       Object o = SinnerValue.default;
+       p = Point.default;
        p = __WithField(p.x, x);
        p = __WithField(p.y, y);
        return p;
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.out	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.out	Fri Sep 14 11:31:36 2018 +0530
@@ -1,6 +1,5 @@
 CheckMakeDefault.java:9:15: compiler.err.illegal.combination.of.modifiers: interface, value
 CheckMakeDefault.java:10:24: compiler.err.illegal.combination.of.modifiers: abstract, value
-CheckMakeDefault.java:13:20: compiler.err.make.default.with.nonvalue
-CheckMakeDefault.java:34:18: compiler.err.invalid.arguments.to.make.default
-CheckMakeDefault.java:35:19: compiler.err.make.default.with.nonvalue
-5 errors
+CheckMakeDefault.java:13:26: compiler.err.make.default.with.nonvalue
+CheckMakeDefault.java:35:25: compiler.err.make.default.with.nonvalue
+4 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckStaticFinalAssign.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckStaticFinalAssign.java	Fri Sep 14 11:31:36 2018 +0530
@@ -11,7 +11,7 @@
     }
 
     static CheckStaticFinalAssign foo() {
-       CheckStaticFinalAssign x = __MakeDefault CheckStaticFinalAssign();
+       CheckStaticFinalAssign x = CheckStaticFinalAssign.default;
        x.x = 100;
        return x;
     }
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSync.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckSync.java	Fri Sep 14 11:31:36 2018 +0530
@@ -25,7 +25,7 @@
         }
     }
 
-    final Val val = __MakeDefault Val();
+    final Val val = Val.default;
 
     void test() throws InterruptedException {
         // All calls below are bad.
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.java	Fri Sep 14 11:31:36 2018 +0530
@@ -6,7 +6,7 @@
  */
 
 final class CheckValueFactoryWithReference {
-    final Object o = __MakeDefault Object();
+    final Object o = Object.default;
     __ByValue final class Point { int x = 10; }
     Point p = new Point();
 }
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.out	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.out	Fri Sep 14 11:31:36 2018 +0530
@@ -1,3 +1,3 @@
-CheckValueFactoryWithReference.java:9:22: compiler.err.make.default.with.nonvalue
+CheckValueFactoryWithReference.java:9:28: 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/IllegalByValueTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/IllegalByValueTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -17,9 +17,6 @@
 
     public static void main(String[] args) {
         // Error cases.
-        __MakeDefault __ByValue IllegalByValueTest() {};
-        __MakeDefault __ByValue __ByValue IllegalByValueTest() {};
-        __MakeDefault @Annot __ByValue IllegalByValueTest() {};
         new __ByValue @Annot __ByValue Comparable <String>() {};
         int [] ia = new __ByValue int[10];
         new __ByValue String("Hello");
--- a/test/langtools/tools/javac/valhalla/lworld-values/IllegalByValueTest.out	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/IllegalByValueTest.out	Fri Sep 14 11:31:36 2018 +0530
@@ -1,8 +1,4 @@
-IllegalByValueTest.java:20:23: compiler.err.mod.not.allowed.here: value
-IllegalByValueTest.java:21:23: compiler.err.mod.not.allowed.here: value
-IllegalByValueTest.java:21:33: compiler.err.mod.not.allowed.here: value
-IllegalByValueTest.java:22:30: compiler.err.mod.not.allowed.here: value
-IllegalByValueTest.java:23:30: compiler.err.mod.not.allowed.here: value
-IllegalByValueTest.java:24:25: compiler.err.mod.not.allowed.here: value
-IllegalByValueTest.java:25:13: compiler.err.mod.not.allowed.here: value
-7 errors
+IllegalByValueTest.java:20:30: compiler.err.mod.not.allowed.here: value
+IllegalByValueTest.java:21:25: compiler.err.mod.not.allowed.here: value
+IllegalByValueTest.java:22:13: compiler.err.mod.not.allowed.here: value
+3 errors
--- a/test/langtools/tools/javac/valhalla/lworld-values/Point.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/Point.java	Fri Sep 14 11:31:36 2018 +0530
@@ -39,7 +39,7 @@
         y = 20;
     }
     static Point makePoint(int x, int y) {
-        Point p = __MakeDefault Point();
+        Point p = Point.default;
         p = __WithField(p.x, x);
         p = __WithField(p.y, y);
         return p;
--- a/test/langtools/tools/javac/valhalla/lworld-values/ValueBootstrapMethodsTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/ValueBootstrapMethodsTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -45,7 +45,7 @@
             this.l = List.of();
         }
         public static Value make(int i, double d, String s, String... items) {
-            Value v = __MakeDefault Value();
+            Value v = Value.default;
             v = __WithField(v.i, i);
             v = __WithField(v.d, d);
             v = __WithField(v.s, s);
--- a/test/langtools/tools/javac/valhalla/lworld-values/ValueCreationTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/ValueCreationTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -48,7 +48,7 @@
         }
 
         static Point makePoint(int x, int y) {
-           Point p = __MakeDefault Point();
+           Point p = Point.default;
            p = __WithField(p.x, x);
            return __WithField(p.y, y);
         }
--- a/test/langtools/tools/javac/valhalla/lworld-values/ValuesAsRefs.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/ValuesAsRefs.java	Fri Sep 14 11:31:36 2018 +0530
@@ -38,7 +38,8 @@
     }
 
     void foo() {
-        I i = this.__MakeDefault I();  // values can be enclosing instances.
+        I i = this.new I();  // values can be enclosing instances.
+        i = ValuesAsRefs.I.default;
         Object o = (I & java.io.Serializable) i; // values can be used in intersection casts
     }
     <T> void goo() {
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldAccessorTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldAccessorTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -37,7 +37,7 @@
         }
 
         public static V make(int i) {
-            V v = __MakeDefault V();
+            V v = V.default;
             v = __WithField(v.i, i);
             return v;
         }
@@ -48,4 +48,4 @@
         if (!v.toString().equals("[value class WithFieldAccessorTest$V, 20]"))
             throw new AssertionError("Withfield didn't work!" + v.toString());
     }
-}
\ No newline at end of file
+}
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldNegativeTests.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldNegativeTests.java	Fri Sep 14 11:31:36 2018 +0530
@@ -11,7 +11,7 @@
 
     __ByValue final class B {
 
-        final A a = __MakeDefault A();
+        final A a = A.default;
 
         void foo(A a) {
             a.x = 100;
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfGenericType.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfGenericType.java	Fri Sep 14 11:31:36 2018 +0530
@@ -33,7 +33,7 @@
   private final boolean value;
 
   public static <E> WithFieldOfGenericType<E> create() {
-    WithFieldOfGenericType<E> bug = __MakeDefault WithFieldOfGenericType<E>();
+    WithFieldOfGenericType<E> bug = WithFieldOfGenericType.default;
     bug = __WithField(bug.value, true);
     return bug;
   }
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfImplicitThis.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfImplicitThis.java	Fri Sep 14 11:31:36 2018 +0530
@@ -45,7 +45,7 @@
         }
         
         X getX(Integer xVal, int xi) {
-            X xl = __MakeDefault X();
+            X xl = X.default;
             xl = __WithField(x, xi);
             xl = __WithField(x, xVal);
             return xl;
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOperatorTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOperatorTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -17,11 +17,11 @@
 
         X() {
             x = 10;
-            v = __MakeDefault V();
+            v = V.default;
         }
         
         X getX(int xVal, WithFieldOperatorTest wfot) {
-            X x = __MakeDefault X();
+            X x = X.default;
             x = __WithField(new Y(), null);  // not a variable at all.
             x = __WithField(wfot.xs, 10); // not an instance field.
             x = __WithField(wfot.ifld, 10); // not a field of value type
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldRuntimeTest.java	Wed Sep 12 16:54:40 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldRuntimeTest.java	Fri Sep 14 11:31:36 2018 +0530
@@ -40,7 +40,7 @@
     }
 
     public static void main(String [] args) {
-        WithFieldRuntimeTest x = __MakeDefault WithFieldRuntimeTest();
+        WithFieldRuntimeTest x = WithFieldRuntimeTest.default;
         foo(x);
     }
 }