Class InlineSupport.StateField

java.lang.Object
com.oracle.truffle.api.dsl.InlineSupport.InlinableField
com.oracle.truffle.api.dsl.InlineSupport.StateField
Enclosing class:
InlineSupport

public static final class InlineSupport.StateField extends InlineSupport.InlinableField
Represents a field for updating state fields in inlined nodes.
Since:
23.0
  • Method Details

    • createParentAccessor

      @Deprecated public InlineSupport.StateField createParentAccessor(Class<? extends Node> parentClass)
      Deprecated.
      in 23.1 - no longer needed
      This 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
    • subUpdater

      public InlineSupport.StateField subUpdater(int newOffset, int newLength)
      Creates a sub updater for a subset of bits in a state field. This method is intended to be used by DSL-generated code only.
      Since:
      23.0
    • get

      public int get(Node node)
      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, an ClassCastException is thrown. If null is provided, then a NullPointerException is thrown.
      Since:
      23.0
    • set

      public void set(Node node, int value)
      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, an ClassCastException is thrown. If null is provided, then a NullPointerException is thrown.
      Since:
      23.0
    • create

      public static InlineSupport.StateField create(MethodHandles.Lookup declaringLookup, String field)
      This method creates a new field given a lookup class and a field name. 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 an IllegalArgumentException is thrown. The given field must not be final. This method is intended to be used by DSL-generated code only.
      Since:
      23.0