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

Print this page

        

*** 33,57 **** 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 ! } private final HotSpotResolvedObjectTypeImpl holder; private final String name; private JavaType type; private final int offset; --- 33,52 ---- 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; /** * Represents a field in a HotSpot type. */ class HotSpotResolvedJavaFieldImpl implements HotSpotResolvedJavaField, HotSpotProxified { ! /** ! * 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,211 **** public boolean isStable() { if ((config().jvmAccFieldStable & modifiers) != 0) { return true; } assert getAnnotation(Stable.class) == null; ! if (Options.ImplicitStableValues.getValue() && isImplicitStableField()) { return true; } return false; } --- 196,206 ---- public boolean isStable() { if ((config().jvmAccFieldStable & modifiers) != 0) { return true; } assert getAnnotation(Stable.class) == null; ! if (ImplicitStableValues && isImplicitStableField()) { return true; } return false; }