Class AccessNode

All Implemented Interfaces:
FunctionCall, Cloneable

public final class AccessNode extends BaseNode
IR representation of a property access (period operator.)
  • Constructor Details

    • AccessNode

      public AccessNode(long token, int finish, Expression base, com.oracle.truffle.api.strings.TruffleString property, boolean isSuper, boolean isPrivate, boolean optional, boolean optionalChain)
      Constructor
      Parameters:
      token - token
      finish - finish
      base - base node
      property - property
    • AccessNode

      public AccessNode(long token, int finish, Expression base, com.oracle.truffle.api.strings.TruffleString property)
  • Method Details

    • accept

      public Node accept(NodeVisitor<? extends LexicalContext> visitor)
      Assist in IR navigation.
      Specified by:
      accept in class Node
      Parameters:
      visitor - IR navigating visitor.
      Returns:
      node the node or its replacement after visitation, null if no further visitations are required
    • accept

      public <R> R accept(TranslatorNodeVisitor<? extends LexicalContext, R> visitor)
      Description copied from class: Node
      Provides a means to navigate the IR.
      Specified by:
      accept in class Node
      Parameters:
      visitor - Node visitor.
      Returns:
      node the node or its replacement after visitation, null if no further visitations are required
    • toString

      public void toString(StringBuilder sb, boolean printType)
      Description copied from class: Node
      Print logic that decides whether to show the optimistic type or not - for example it should not be printed after just parse, when it hasn't been computed, or has been set to a trivially provable value
      Specified by:
      toString in class Node
      Parameters:
      sb - string builder
      printType - print type?
    • getProperty

      public String getProperty()
      Get the property name
      Returns:
      the property name
    • getPropertyTS

      public com.oracle.truffle.api.strings.TruffleString getPropertyTS()
    • isPrivate

      public boolean isPrivate()
    • getPrivateName

      public String getPrivateName()
    • getPrivateNameTS

      public com.oracle.truffle.api.strings.TruffleString getPrivateNameTS()
    • setIsSuper

      public AccessNode setIsSuper()
      Description copied from class: BaseNode
      Mark this node as being a SuperProperty access.
      Specified by:
      setIsSuper in class BaseNode