changeset 52026:b1fa2b18911d lworld

8210847:[lworld] Javac should accept __WithField operator only with -XDallowWithFieldOperator
author sadayapalam
date Tue, 18 Sep 2018 14:42:52 +0530
parents a790155817c2
children d17f366ae373
files src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties test/hotspot/jtreg/compiler/valhalla/valuetypes/TestArrays.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBasicFunctionality.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConvention.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestIntrinsics.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestMethodHandles.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNewAcmp.java test/hotspot/jtreg/compiler/valhalla/valuetypes/TestOnStackReplacement.java test/hotspot/jtreg/runtime/valhalla/valuetypes/FlattenableSemanticTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ObjectMethods.java test/hotspot/jtreg/runtime/valhalla/valuetypes/QuickeningTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/Test8186715.java test/hotspot/jtreg/runtime/valhalla/valuetypes/TestInheritedValueTypeFields.java test/hotspot/jtreg/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/VDefaultTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/VTBufferTest.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/ValueTypeGetField.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypesTest.java test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueWithJni.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java test/jdk/valhalla/valuetypes/ArrayElementVarHandleTest.java test/jdk/valhalla/valuetypes/MethodHandleTest.java test/jdk/valhalla/valuetypes/ObjectMethods.java test/jdk/valhalla/valuetypes/Reflection.java test/jdk/valhalla/valuetypes/ValueArray.java test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java test/jdk/valhalla/valuetypes/ValueTypesAttributeTest.java test/langtools/tools/javac/diags/examples/ValueInstanceFieldExpectedHere.java test/langtools/tools/javac/diags/examples/WithFieldOperatorDisallowed.java test/langtools/tools/javac/valhalla/lworld-values/CastNoNullCheckTest.java test/langtools/tools/javac/valhalla/lworld-values/CastNullCheckTest.java test/langtools/tools/javac/valhalla/lworld-values/CheckFlags.java test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java test/langtools/tools/javac/valhalla/lworld-values/CheckSuperCompileOnly.java test/langtools/tools/javac/valhalla/lworld-values/DemoteToValueBasedTest.java test/langtools/tools/javac/valhalla/lworld-values/FlattenableNegativeTest.java 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/WithFieldAccessorTest.java test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfExplicitSelector.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 68 files changed, 120 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Sep 18 14:42:52 2018 +0530
@@ -184,6 +184,7 @@
         this.errorTree = F.Erroneous();
         endPosTable = newEndPosTable(keepEndPositions);
         this.allowFlattenabilityModifiers = fac.options.isSet("allowFlattenabilityModifiers");
+        this.allowWithFieldOperator = fac.options.isSet("allowWithFieldOperator");
     }
 
     protected AbstractEndPosTable newEndPosTable(boolean keepEndPositions) {
@@ -204,6 +205,10 @@
     */
     boolean allowFlattenabilityModifiers;
 
+    /** Switch: should we allow withField operator at source level ?
+    */
+    boolean allowWithFieldOperator;
+
     /** Switch: should we keep docComments?
      */
     boolean keepDocComments;
@@ -1106,6 +1111,9 @@
             } else return illegal();
             break;
         case WITHFIELD:
+            if (!allowWithFieldOperator) {
+                log.error(pos, Errors.WithFieldOperatorDisallowed);
+            }
             if (typeArgs == null && (mode & EXPR) != 0) {
                 nextToken();
                 accept(LPAREN);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Sep 14 17:11:12 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue Sep 18 14:42:52 2018 +0530
@@ -3487,6 +3487,9 @@
 compiler.err.flattenability.modifiers.disallowed=\
     This modifier is allowed only with -XDallowFlattenabilityModifiers
 
+compiler.err.with.field.operator.disallowed=\
+    WithField operator is allowed only with -XDallowWithFieldOperator
+
 compiler.err.empty.value.not.yet=\
     Value types with zero instance size are not supported yet
 
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestArrays.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestArrays.java	Tue Sep 18 14:42:52 2018 +0530
@@ -32,7 +32,7 @@
  * @summary Test value type arrays
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @requires os.simpleArch == "x64"
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestArrays.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestArrays.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBasicFunctionality.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestBasicFunctionality.java	Tue Sep 18 14:42:52 2018 +0530
@@ -30,7 +30,7 @@
  * @summary Test the basic value type implementation in C2
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @requires os.simpleArch == "x64"
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestBasicFunctionality.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestBasicFunctionality.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConvention.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestCallingConvention.java	Tue Sep 18 14:42:52 2018 +0530
@@ -32,7 +32,7 @@
  * @summary Test value type calling convention optimizations
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @requires os.simpleArch == "x64"
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestCallingConvention.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestCallingConvention.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestIntrinsics.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestIntrinsics.java	Tue Sep 18 14:42:52 2018 +0530
@@ -35,7 +35,7 @@
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @modules java.base/jdk.internal.misc
  * @requires os.simpleArch == "x64"
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestIntrinsics.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestIntrinsics.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java	Tue Sep 18 14:42:52 2018 +0530
@@ -39,7 +39,7 @@
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @requires os.simpleArch == "x64"
  * @build TestLWorld_mismatched
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestLWorld.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestLWorld.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestMethodHandles.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestMethodHandles.java	Tue Sep 18 14:42:52 2018 +0530
@@ -39,7 +39,7 @@
  * @modules java.base/jdk.experimental.bytecode
  *          java.base/jdk.experimental.value
  *          java.base/jdk.internal.misc:+open
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestMethodHandles.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestMethodHandles.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNewAcmp.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNewAcmp.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
  * @test TestNewAcmp
  * @summary Verifies correctness of the new acmp bytecode.
  * @library /testlibrary /test/lib /compiler/whitebox /
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestNewAcmp.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestNewAcmp.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch
  *                   -XX:+EnableValhalla -XX:TypeProfileLevel=222
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestOnStackReplacement.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestOnStackReplacement.java	Tue Sep 18 14:42:52 2018 +0530
@@ -30,7 +30,7 @@
  * @summary Test on stack replacement (OSR) with value types
  * @library /testlibrary /test/lib /compiler/whitebox /
  * @requires os.simpleArch == "x64"
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestOnStackReplacement.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestOnStackReplacement.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.Platform
  * @run main/othervm/timeout=120 -Xbootclasspath/a:. -ea -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
  *                               -XX:+UnlockExperimentalVMOptions -XX:+WhiteBoxAPI -XX:+EnableValhalla
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/FlattenableSemanticTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/FlattenableSemanticTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -34,8 +34,8 @@
  * @modules java.base/jdk.experimental.bytecode
  *          java.base/jdk.experimental.value
  * @library /test/lib
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers Point.java JumboValue.java
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers FlattenableSemanticTest.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers Point.java JumboValue.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers FlattenableSemanticTest.java
  * @run main/othervm -Xint -XX:ValueFieldMaxFlatSize=64 -XX:+EnableValhalla runtime.valhalla.valuetypes.FlattenableSemanticTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla -XX:ValueFieldMaxFlatSize=64 runtime.valhalla.valuetypes.FlattenableSemanticTest
  * // debug: -XX:+PrintValueLayout -XX:-ShowMessageBoxOnError
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ObjectMethods.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ObjectMethods.java	Tue Sep 18 14:42:52 2018 +0530
@@ -32,7 +32,7 @@
  * @modules java.base/jdk.experimental.bytecode
  *          java.base/jdk.experimental.value
  * @library /test/lib
- * @compile -XDenableValueTypes ObjectMethods.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator ObjectMethods.java
  * @run main/othervm -Xint -XX:+EnableValhalla -XX:+UseBiasedLocking -XX:+UseCompressedClassPointers runtime.valhalla.valuetypes.ObjectMethods
  * @run main/othervm -Xint -XX:+EnableValhalla -XX:-UseBiasedLocking -XX:-UseCompressedClassPointers runtime.valhalla.valuetypes.ObjectMethods
  * @run main/othervm -Xint -XX:+EnableValhalla -noverify runtime.valhalla.valuetypes.ObjectMethods noverify
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/QuickeningTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/QuickeningTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -29,7 +29,7 @@
  * @test QuickeningTest
  * @summary Test quickening of getfield and putfield applied to value fields
  * @library /test/lib
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers Point.java JumboValue.java QuickeningTest.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers Point.java JumboValue.java QuickeningTest.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.QuickeningTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.QuickeningTest
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/Test8186715.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/Test8186715.java	Tue Sep 18 14:42:52 2018 +0530
@@ -27,7 +27,7 @@
  * @test Test8186715
  * @summary test return of buffered value passed in argument by caller
  * @library /test/lib
- * @compile -XDenableValueTypes Test8186715.java
+ * @compile -XDallowWithFieldOperator -XDenableValueTypes Test8186715.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.Test8186715
  * @run main/othervm -XX:+EnableValhalla runtime.valhalla.valuetypes.Test8186715
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestInheritedValueTypeFields.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/TestInheritedValueTypeFields.java	Tue Sep 18 14:42:52 2018 +0530
@@ -29,7 +29,7 @@
  * @test TestInheritedValueTypeFields
  * @summary Test if value field klasses are correctly retrieved for inherited fields
  * @library /test/lib
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers Point.java TestInheritedValueTypeFields.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers Point.java TestInheritedValueTypeFields.java
  * @run main/othervm -XX:+EnableValhalla runtime.valhalla.valuetypes.TestInheritedValueTypeFields
  */
 
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -28,7 +28,7 @@
  * @test
  * @summary Uninitialized value fields test
  * @library /test/lib
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers Point.java JumboValue.java UninitializedValueFieldsTest.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers Point.java JumboValue.java UninitializedValueFieldsTest.java
  * @run main/othervm -Xint -XX:ValueFieldMaxFlatSize=64 -XX:+EnableValhalla runtime.valhalla.valuetypes.UninitializedValueFieldsTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla -XX:ValueFieldMaxFlatSize=64 runtime.valhalla.valuetypes.UninitializedValueFieldsTest
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/VDefaultTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/VDefaultTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -29,8 +29,8 @@
  * @test VDefaultTest
  * @summary vdefault bytecode test
  * @library /test/lib
- * @compile -XDenableValueTypes Point.java
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers VDefaultTest.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator Point.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers VDefaultTest.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.VDefaultTest
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/VTBufferTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/VTBufferTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -26,6 +26,7 @@
  * @summary Value Type interpreter value buffering test
  * @library /test/lib
  * @build ValueTypeGenerator
+ * @compile -XDallowWithFieldOperator VTBufferTest.java
  * @run main/othervm -Xint -XX:+EnableValhalla VTBufferTest generate-and-run
  * @run main/othervm -Xint -XX:+EnableValhalla -XX:ValueTypesBufferMaxMemory=0 VTBufferTest generate-and-run
  */
@@ -234,7 +235,7 @@
             JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
             StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
             List<String> optionList = new ArrayList<String>();
-            optionList.addAll(Arrays.asList("-classpath",".","-XDenableValueTypes"));
+            optionList.addAll(Arrays.asList("-classpath",".","-XDenableValueTypes","-XDallowWithFieldOperator"));
 
             Iterable<? extends JavaFileObject> compilationUnits1 =
                     fileManager.getJavaFileObjectsFromFiles(Arrays.asList(valueSources));
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/VWithFieldTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/VWithFieldTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -29,8 +29,8 @@
  * @test VWithFieldTest
  * @summary vwithfield bytecode test
  * @library /test/lib
- * @compile -XDenableValueTypes Point.java
- * @compile -XDenableValueTypes VWithFieldTest.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator Point.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator VWithFieldTest.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.VWithFieldTest
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.VWithFieldTest
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueOops.java	Tue Sep 18 14:42:52 2018 +0530
@@ -41,8 +41,8 @@
  * @modules java.base/jdk.experimental.bytecode
  *          java.base/jdk.experimental.value
  * @library /test/lib
- * @compile -XDenableValueTypes Person.java
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers ValueOops.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator Person.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers ValueOops.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                   sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xint -XX:+UseSerialGC -Xmx128m -XX:+EnableValhalla
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeArray.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeArray.java	Tue Sep 18 14:42:52 2018 +0530
@@ -34,7 +34,7 @@
  * @test ValueTypeArray
  * @summary Plain array test for Value Types
  * @library /test/lib
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers -XDallowGenericsOverValues ValueTypeArray.java Point.java Long8Value.java Person.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers -XDallowGenericsOverValues ValueTypeArray.java Point.java Long8Value.java Person.java
  * @run main/othervm -Xint -XX:+ValueArrayFlatten -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeArray
  * @run main/othervm -Xint -XX:-ValueArrayFlatten -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeArray
  * @run main/othervm -Xcomp -XX:+ValueArrayFlatten -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeArray
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeCreation.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeCreation.java	Tue Sep 18 14:42:52 2018 +0530
@@ -28,7 +28,7 @@
  * @test ValueTypeCreation
  * @summary Value Type creation test
  * @library /test/lib
- * @compile  -XDenableValueTypes -XDallowFlattenabilityModifiers ValueTypeCreation.java Point.java Long8Value.java Person.java
+ * @compile  -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers ValueTypeCreation.java Point.java Long8Value.java Person.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeCreation
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeCreation
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeDensity.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeDensity.java	Tue Sep 18 14:42:52 2018 +0530
@@ -31,7 +31,7 @@
  * @test ValueTypeDensity
  * @summary Heap density test for ValueTypes
  * @library /test/lib
- * @compile -XDenableValueTypes ValueTypeDensity.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator ValueTypeDensity.java
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xint -XX:+EnableValhalla -XX:+ValueArrayFlatten
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeGetField.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypeGetField.java	Tue Sep 18 14:42:52 2018 +0530
@@ -28,7 +28,7 @@
  * @test ValueTypeGetField
  * @summary Value Type get field test
  * @library /test/lib
- * @compile -XDenableValueTypes Point.java ValueTypeGetField.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator Point.java ValueTypeGetField.java
  * @run main/othervm -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeGetField
  * @run main/othervm -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueTypeGetField
  */
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypesTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueTypesTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -51,7 +51,7 @@
  * @modules java.base/jdk.experimental.bytecode
  *          java.base/jdk.experimental.value
  * @library /test/lib
- * @compile -XDenableValueTypes -XDallowFlattenabilityModifiers TestValue1.java TestValue2.java TestValue3.java TestValue4.java ValueTypesTest.java
+ * @compile -XDenableValueTypes -XDallowWithFieldOperator -XDallowFlattenabilityModifiers TestValue1.java TestValue2.java TestValue3.java TestValue4.java ValueTypesTest.java
  * @run main/othervm -Xint -Xmx128m -XX:+EnableValhalla -XX:-ShowMessageBoxOnError
  *                   -XX:+ExplicitGCInvokesConcurrent
  *                   -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
--- a/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueWithJni.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/hotspot/jtreg/runtime/valhalla/valuetypes/ValueWithJni.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,6 +25,7 @@
 
 /* @test
  * @summary test JNI functions with values
+ * @compile -XDallowWithFieldOperator ValueWithJni.java
  * @run main/othervm/native -Xint -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueWithJni
  * @run main/othervm/native -Xcomp -XX:+EnableValhalla runtime.valhalla.valuetypes.ValueWithJni
  */
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessBoolean
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessBoolean
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessBoolean
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessByte
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessByte
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessByte
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessChar
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessChar
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessChar
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessDouble
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessDouble
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessDouble
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessFloat
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessFloat
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessFloat
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessInt
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessInt
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessInt
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessLong
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessLong
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessLong
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=10    -XX:+EnableValhalla -Xint                   VarHandleTestAccessShort
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla -XX:TieredStopAtLevel=1 VarHandleTestAccessShort
  * @run testng/othervm -Diters=20000 -XX:+EnableValhalla                         VarHandleTestAccessShort
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessBoolean
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessByte
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessChar
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessDouble
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessFloat
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessInt
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessLong
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -XX:+EnableValhalla -Diters=2000 VarHandleTestMethodHandleAccessShort
  */
 
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java	Tue Sep 18 14:42:52 2018 +0530
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @compile -XDallowWithFieldOperator Value.java
  * @run testng/othervm -Diters=20000 VarHandleTestMethodHandleAccessString
  */
 
--- a/test/jdk/valhalla/valuetypes/ArrayElementVarHandleTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ArrayElementVarHandleTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,8 +25,10 @@
 /*
  * @test
  * @summary test VarHandle on value array
- * @build Point Line MutablePath
- * @compile -XDallowFlattenabilityModifiers MixedValues.java NonFlattenValue.java
+ * @compile -XDallowWithFieldOperator Point.java
+ * @compile -XDallowWithFieldOperator Line.java
+ * @compile -XDallowWithFieldOperator MutablePath.java
+ * @compile -XDallowFlattenabilityModifiers -XDallowWithFieldOperator MixedValues.java NonFlattenValue.java
  * @run testng/othervm -XX:+EnableValhalla -XX:+ValueArrayFlatten ArrayElementVarHandleTest
  * @run testng/othervm -XX:+EnableValhalla -XX:-ValueArrayFlatten ArrayElementVarHandleTest
  */
--- a/test/jdk/valhalla/valuetypes/MethodHandleTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/MethodHandleTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
 /*
  * @test
  * @summary test MethodHandle/VarHandle on value types
- * @compile -XDallowFlattenabilityModifiers Point.java Line.java MutablePath.java MixedValues.java
+ * @compile -XDallowWithFieldOperator -XDallowFlattenabilityModifiers Point.java Line.java MutablePath.java MixedValues.java
  * @run testng/othervm -XX:+EnableValhalla MethodHandleTest
  */
 
--- a/test/jdk/valhalla/valuetypes/ObjectMethods.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ObjectMethods.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,6 +25,7 @@
 /*
  * @test
  * @summary test Object methods on value types
+ * @compile -XDallowWithFieldOperator ObjectMethods.java
  * @run testng/othervm -XX:+EnableValhalla ObjectMethods
  */
 
--- a/test/jdk/valhalla/valuetypes/Reflection.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/Reflection.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
 /*
  * @test
  * @summary test reflection on value types
- * @compile Point.java Line.java
+ * @compile -XDallowWithFieldOperator Point.java Line.java
  * @run main/othervm -XX:+EnableValhalla Reflection
  */
 
--- a/test/jdk/valhalla/valuetypes/ValueArray.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ValueArray.java	Tue Sep 18 14:42:52 2018 +0530
@@ -24,7 +24,8 @@
 /*
  * @test
  * @summary Basic test for Array::get, Array::set, Arrays::setAll on value array
- * @compile -XDallowFlattenabilityModifiers Point.java NonFlattenValue.java
+ * @compile -XDallowFlattenabilityModifiers -XDallowWithFieldOperator Point.java NonFlattenValue.java
+ * @compile -XDallowFlattenabilityModifiers -XDallowWithFieldOperator ValueArray.java
  * @run testng/othervm -XX:+EnableValhalla -XX:+ValueArrayFlatten ValueArray
  * @run testng/othervm -XX:+EnableValhalla -XX:-ValueArrayFlatten ValueArray
  */
--- a/test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ValueBootstrapMethods.java	Tue Sep 18 14:42:52 2018 +0530
@@ -26,6 +26,7 @@
  * @test
  * @summary test value bootstrap methods
  * @modules java.base/jdk.internal.org.objectweb.asm
+ * @compile -XDallowWithFieldOperator ValueBootstrapMethods.java
  * @run main/othervm -XX:+EnableValhalla ValueBootstrapMethods
  */
 
--- a/test/jdk/valhalla/valuetypes/ValueTypesAttributeTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/jdk/valhalla/valuetypes/ValueTypesAttributeTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,8 +25,8 @@
  * @test
  * @summary Verify ValueTypes attribute generated by core reflection,
  *          dynamic proxy and lambda proxy classes
- * @build Point Line MutablePath
- * @compile -XDallowFlattenabilityModifiers NonFlattenValue.java
+ * @compile -XDallowFlattenabilityModifiers -XDallowWithFieldOperator Point.java Line.java MutablePath.java
+ * @compile -XDallowFlattenabilityModifiers -XDallowWithFieldOperator NonFlattenValue.java
  * @run testng/othervm -XX:+EnableValhalla -Dsun.reflect.inflationThreshold=0 ValueTypesAttributeTest
  */
 
--- a/test/langtools/tools/javac/diags/examples/ValueInstanceFieldExpectedHere.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/diags/examples/ValueInstanceFieldExpectedHere.java	Tue Sep 18 14:42:52 2018 +0530
@@ -21,6 +21,7 @@
  * questions.
  */
 
+// options: -XDallowWithFieldOperator
 // key: compiler.err.value.instance.field.expected.here
 
 final __ByValue class Blah {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/diags/examples/WithFieldOperatorDisallowed.java	Tue Sep 18 14:42:52 2018 +0530
@@ -0,0 +1,31 @@
+/*
+ * 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.with.field.operator.disallowed
+
+final __ByValue class Blah {
+    final int x;
+    Blah() {
+        Blah b = __WithField(x, 10);
+    }
+}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CastNoNullCheckTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CastNoNullCheckTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -27,8 +27,8 @@
  * @test
  * @summary Check that casting to a value type involves no null check when values are not recognized in source.
  *
- * @compile Point.java
- * @compile -source 10 CastNoNullCheckTest.java
+ * @compile -XDallowWithFieldOperator Point.java
+ * @compile -source 10 -XDallowWithFieldOperator CastNoNullCheckTest.java
  * @run main CastNoNullCheckTest
  */
 
@@ -37,4 +37,4 @@
         Object o = null;
         Point p = (Point) o; // No NPE expected.
     }
-}
\ No newline at end of file
+}
--- a/test/langtools/tools/javac/valhalla/lworld-values/CastNullCheckTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CastNullCheckTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -27,8 +27,8 @@
  * @test
  * @summary Check that casting to a value type involves a null check.
  *
- * @compile Point.java
- * @compile -XDallowValueBasedClasses CastNullCheckTest.java
+ * @compile -XDallowWithFieldOperator Point.java
+ * @compile -XDallowValueBasedClasses -XDallowWithFieldOperator CastNullCheckTest.java
  * @run main/othervm -XX:+EnableValhalla CastNullCheckTest
  */
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckFlags.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckFlags.java	Tue Sep 18 14:42:52 2018 +0530
@@ -27,7 +27,7 @@
  * @test
  * @summary Check value flag in class file
  * @modules jdk.jdeps/com.sun.tools.classfile
- * @compile Point.java
+ * @compile -XDallowWithFieldOperator Point.java
  * @run main CheckFlags
  */
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java	Tue Sep 18 14:42:52 2018 +0530
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @summary Check various semantic constraints on value creation via default
  *
- * @compile/fail/ref=CheckMakeDefault.out -XDrawDiagnostics CheckMakeDefault.java
+ * @compile/fail/ref=CheckMakeDefault.out -XDallowWithFieldOperator -XDrawDiagnostics CheckMakeDefault.java
  */
 __ByValue final class Point {
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/CheckSuperCompileOnly.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/CheckSuperCompileOnly.java	Tue Sep 18 14:42:52 2018 +0530
@@ -27,7 +27,7 @@
  * @test
  * @summary Check that value types have their super types wired to be j.l.Object
  *
- * @compile Point.java
+ * @compile -XDallowWithFieldOperator Point.java
  * @compile CheckSuperCompileOnly.java
  */
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/DemoteToValueBasedTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/DemoteToValueBasedTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -1,7 +1,7 @@
 /*
  * @test /nodynamiccopyright/
  * @summary Test that value classes get demoted to value based classes in -source 10 compiles.
- * @compile Point.java
+ * @compile -XDallowWithFieldOperator Point.java
  * @compile/fail/ref=DemoteToValueBasedTest.out -XDrawDiagnostics -XDdev DemoteToValueBasedTest.java
  * @compile/fail/ref=DemoteToValueBasedTest10.out --should-stop=at=FLOW -Werror -XDallowValueBasedClasses -XDrawDiagnostics -source 10 -XDdev DemoteToValueBasedTest.java
  * @compile/fail/ref=DemoteToValueBasedTest3.out --should-stop=at=FLOW -Werror -XDrawDiagnostics -source 10 -XDdev DemoteToValueBasedTest.java
--- a/test/langtools/tools/javac/valhalla/lworld-values/FlattenableNegativeTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/FlattenableNegativeTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -2,7 +2,7 @@
  * @test /nodynamiccopyright/
  * @bug 8197911
  * @summary Test Javac's treatment of null assignment to value instances
- * @compile/fail/ref=FlattenableNegativeTest.out -XDrawDiagnostics -XDdev FlattenableNegativeTest.java
+ * @compile/fail/ref=FlattenableNegativeTest.out -XDallowWithFieldOperator -XDrawDiagnostics -XDdev FlattenableNegativeTest.java
  */
 
 public class FlattenableNegativeTest {
--- a/test/langtools/tools/javac/valhalla/lworld-values/Point.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/Point.java	Tue Sep 18 14:42:52 2018 +0530
@@ -27,7 +27,7 @@
  * @test
  * @summary Test basic syntax of values
  *
- * @compile Point.java
+ * @compile -XDallowWithFieldOperator Point.java
  */
 
 __ByValue class Point {
--- a/test/langtools/tools/javac/valhalla/lworld-values/ValueBootstrapMethodsTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/ValueBootstrapMethodsTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,6 +25,7 @@
 /*
  * @test
  * @summary test value bootstrap methods
+ * @compile -XDallowWithFieldOperator ValueBootstrapMethodsTest.java
  * @run main/othervm -XX:+EnableValhalla ValueBootstrapMethodsTest
  */
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/ValueCreationTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/ValueCreationTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
  * @test
  * @summary Check code generation for value creation ops
  * @modules jdk.compiler/com.sun.tools.javac.util jdk.jdeps/com.sun.tools.javap
- * @compile ValueCreationTest.java
+ * @compile -XDallowWithFieldOperator ValueCreationTest.java
  * @run main/othervm -Xverify:none -XX:+EnableValhalla ValueCreationTest
  * @modules jdk.compiler
  */
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldAccessorTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldAccessorTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,6 +25,7 @@
  * @test
  * @bug 8206147
  * @summary WithField operation on a private inner field should be enclosed in a suitable accessor method.
+ * @compile -XDallowWithFieldOperator WithFieldAccessorTest.java
  * @run main/othervm -XX:+EnableValhalla WithFieldAccessorTest
  */
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfExplicitSelector.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfExplicitSelector.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
  * @test
  * @summary Check code generation for value creation ops
  * @modules jdk.compiler/com.sun.tools.javac.util jdk.jdeps/com.sun.tools.javap
- * @compile WithFieldOfExplicitSelector.java
+ * @compile -XDallowWithFieldOperator WithFieldOfExplicitSelector.java
  * @run main/othervm -Xverify:none -XX:+EnableValhalla WithFieldOfExplicitSelector
  * @modules jdk.compiler
  */
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfGenericType.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfGenericType.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
  * @test
  * @bug 8205686
  * @summary __WithField seems to have trouble if the value type is a generic type.
- * @compile -XDrawDiagnostics -XDdev WithFieldOfGenericType.java
+ * @compile -XDrawDiagnostics -XDdev -XDallowWithFieldOperator WithFieldOfGenericType.java
  * @run main/othervm -XX:+EnableValhalla WithFieldOfGenericType
  */
 
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfImplicitThis.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOfImplicitThis.java	Tue Sep 18 14:42:52 2018 +0530
@@ -25,7 +25,7 @@
  * @test
  * @summary Check code generation for value creation ops
  * @modules jdk.compiler/com.sun.tools.javac.util jdk.jdeps/com.sun.tools.javap
- * @compile WithFieldOfImplicitThis.java
+ * @compile -XDallowWithFieldOperator WithFieldOfImplicitThis.java
  * @run main/othervm -Xverify:none -XX:+EnableValhalla WithFieldOfImplicitThis
  * @modules jdk.compiler
  */
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOperatorTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldOperatorTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -1,7 +1,7 @@
 /*
  * @test /nodynamiccopyright/
  * @summary Verify that various errors related to __WithField operator are caught.
- * @compile/fail/ref=WithFieldOperatorTest.out -XDrawDiagnostics -XDdev WithFieldOperatorTest.java
+ * @compile/fail/ref=WithFieldOperatorTest.out -XDallowWithFieldOperator -XDrawDiagnostics -XDdev WithFieldOperatorTest.java
  */
 
 public class WithFieldOperatorTest {
--- a/test/langtools/tools/javac/valhalla/lworld-values/WithFieldRuntimeTest.java	Fri Sep 14 17:11:12 2018 +0200
+++ b/test/langtools/tools/javac/valhalla/lworld-values/WithFieldRuntimeTest.java	Tue Sep 18 14:42:52 2018 +0530
@@ -24,6 +24,7 @@
 /**
  * @test
  * @summary Test withfield behavior at runtime.
+ * @compile -XDallowWithFieldOperator WithFieldRuntimeTest.java
  * @run main/othervm -XX:+EnableValhalla WithFieldRuntimeTest
  */