Class JSNodeUtil

java.lang.Object
com.oracle.truffle.js.nodes.JSNodeUtil

public final class JSNodeUtil extends Object
  • Method Details

    • slowPathException

      public static com.oracle.truffle.api.nodes.SlowPathException slowPathException()
    • hasImportantTag

      public static boolean hasImportantTag(JavaScriptNode node)
      Returns true if this sequence node has an important tag that we must preserve, so we must not eliminate the node during block flattening.
    • resolveName

      public static String resolveName(com.oracle.truffle.api.nodes.RootNode root)
    • formatSourceSection

      public static String formatSourceSection(com.oracle.truffle.api.nodes.Node node)
      Formats a source section of a node in human readable form. If no source section could be found it looks up the parent hierarchy until it finds a source section. Nodes where this was required append a '~' at the end.
      Parameters:
      node - the node to format.
      Returns:
      a formatted source section string
    • hasExactlyOneRootBodyTag

      public static boolean hasExactlyOneRootBodyTag(JavaScriptNode body)
    • isWrapperNode

      public static boolean isWrapperNode(JavaScriptNode node)
      Returns true if node is a JavaScript node that is considered a wrapper.
    • getWrappedNode

      public static JavaScriptNode getWrappedNode(JavaScriptNode node)
      Helper to retrieve the node wrapped by a given JavaScript node.
      Parameters:
      node - a JavaScript node that is possibly a wrapper
      Returns:
      the (delegate) node that is wrapped by the parameter node, or node itself if it is not a wrapper that can be stripped
    • isTaggedNode

      public static boolean isTaggedNode(com.oracle.truffle.api.nodes.Node node)
    • isInputGeneratingNode

      public static boolean isInputGeneratingNode(com.oracle.truffle.api.nodes.Node node)