Package com.oracle.truffle.api.dsl
Class InlineSupport.ReferenceField<T>
java.lang.Object
com.oracle.truffle.api.dsl.InlineSupport.InlinableField
com.oracle.truffle.api.dsl.InlineSupport.ReferenceField<T>
- Enclosing class:
InlineSupport
Represents a field for references in inlined nodes.
- Since:
- 23.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
compareAndSet
(Node node, T expect, T update) This method sets the value of the target field giving the a target node and expected value using compare and set semantics.static <T> InlineSupport.ReferenceField
<T> create
(MethodHandles.Lookup declaringLookup, String field, Class<T> valueClass) This method creates a new field given a lookup class, field name and value class.createParentAccessor
(Class<? extends Node> parentClass) Deprecated.in 23.1 - no longer neededThis method returns the value of the target field given a target node.getVolatile
(Node node) This method returns the value of the target field given a target node using volatile semantics.void
This method sets the value of the target field giving the a target node.Methods inherited from class com.oracle.truffle.api.dsl.InlineSupport.InlinableField
validate
-
Method Details
-
createParentAccessor
@Deprecated public InlineSupport.ReferenceField<T> createParentAccessor(Class<? extends Node> parentClass) Deprecated.in 23.1 - no longer neededThis method creates a parent accessor field. A parent accessor allows access to a field through a parent pointer. The given class must exactly match the given receiver. This method is intended to be used by the DSL-generated code.- Since:
- 23.0
-
get
This method returns the value of the target field given a target node. The node parameter must match the class the field was created with. If the type is not compatible, anClassCastException
is thrown. Ifnull
is provided, then aNullPointerException
is thrown.- Since:
- 23.0
-
set
This method sets the value of the target field giving the a target node. The node parameter must match the class the field was created with. If the type is not compatible, anClassCastException
is thrown. Ifnull
is provided, then aNullPointerException
is thrown.- Since:
- 23.0
-
getVolatile
This method returns the value of the target field given a target node using volatile semantics. The node parameter must match the class the field was created with. If the type is not compatible, anClassCastException
is thrown. Ifnull
is provided, then aNullPointerException
is thrown.- Since:
- 23.0
-
compareAndSet
This method sets the value of the target field giving the a target node and expected value using compare and set semantics. The node parameter must match the class the field was created with. If the type is not compatible, anClassCastException
is thrown. Ifnull
is provided, then aNullPointerException
is thrown.- Since:
- 23.0
-
create
public static <T> InlineSupport.ReferenceField<T> create(MethodHandles.Lookup declaringLookup, String field, Class<T> valueClass) This method creates a new field given a lookup class, field name and value class. The lookup class requires access to the field and must be directly accessible. If the field is not found or the field type is not compatible, then anIllegalArgumentException
is thrown. The given field must not be final. This method is intended to be used by DSL-generated code only.- Since:
- 23.0
-