Class StableContextOptionValue<T>
java.lang.Object
com.oracle.truffle.js.runtime.util.StableContextOptionValue<T>
A wrapper around a context option that may be treated as stable, and optionally patchable.
Certain restrictions apply to how these options may be used, and care must be taken not to
sidestep these restrictions to ensure option-dependent behavior is preserved, namely:
Stable options must not be used during language initialization and must not be stored anywhere
else or affect how JS code is parsed and how nodes are created. Dependent compiled code will be
invalidated and interpreted code must observe the new option value immediately.
Patchable options must either not be used during context initialization at all or carefully be
used in such a way that context patching will leave the context not observably different from a
newly created context, as if reversing and reapplying the effects of the option.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStableContextOptionValue(Function<JSContextOptions, T> getter, org.graalvm.options.OptionKey<T> optionKey, String optionName) -
Method Summary
Modifier and TypeMethodDescriptionbooleanget()inthashCode()voidupdate(JSContextOptions contextOptions, StableContextOptionValue.UpdateKind kind)
-
Constructor Details
-
StableContextOptionValue
public StableContextOptionValue(Function<JSContextOptions, T> getter, org.graalvm.options.OptionKey<T> optionKey, String optionName)
-
-
Method Details
-
get
-
getFromContext
-
update
-
hashCode
-
equals
-