src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java

Print this page

        

@@ -33,25 +33,20 @@
 import jdk.vm.ci.meta.LocationIdentity;
 import jdk.vm.ci.meta.MetaAccessProvider;
 import jdk.vm.ci.meta.ModifiersProvider;
 import jdk.vm.ci.meta.ResolvedJavaField;
 import jdk.vm.ci.meta.ResolvedJavaType;
-import jdk.vm.ci.options.Option;
-import jdk.vm.ci.options.OptionType;
-import jdk.vm.ci.options.OptionValue;
 
 /**
  * Represents a field in a HotSpot type.
  */
 class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField, HotSpotProxified {
 
-    static class Options {
-        //@formatter:off
-        @Option(help = "Mark well-known stable fields as such.", type = OptionType.Debug)
-        public static final OptionValue<Boolean> ImplicitStableValues = new OptionValue<>(true);
-        //@formatter:on
-    }
+    /**
+     * Mark well-known stable fields as such.
+     */
+    private static final boolean ImplicitStableValues = HotSpotJVMCIRuntime.getBooleanProperty("jvmci.ImplicitStableValues", true);
 
     private final HotSpotResolvedObjectTypeImpl holder;
     private final String name;
     private JavaType type;
     private final int offset;

@@ -201,11 +196,11 @@
     public boolean isStable() {
         if ((config().jvmAccFieldStable & modifiers) != 0) {
             return true;
         }
         assert getAnnotation(Stable.class) == null;
-        if (Options.ImplicitStableValues.getValue() && isImplicitStableField()) {
+        if (ImplicitStableValues && isImplicitStableField()) {
             return true;
         }
         return false;
     }