--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionKey.java 2019-03-12 08:10:00.947737641 +0100 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options/src/org/graalvm/compiler/options/OptionKey.java 2019-03-12 08:10:00.587735308 +0100 @@ -141,6 +141,18 @@ } /** + * Gets the value of this option in {@code values} if it is present, otherwise + * {@link #getDefaultValue()}. + */ + @SuppressWarnings("unchecked") + public T getValueOrDefault(EconomicMap, Object> values) { + if (!values.containsKey(this)) { + return defaultValue; + } + return (T) values.get(this); + } + + /** * Sets the value of this option in a given map. The * {@link #onValueUpdate(EconomicMap, Object, Object)} method is called once the value is set. *