Class JSNodeUtil
java.lang.Object
com.oracle.truffle.js.nodes.JSNodeUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatSourceSection(com.oracle.truffle.api.nodes.Node node) Formats a source section of a node in human readable form.static JavaScriptNodegetWrappedNode(JavaScriptNode node) Helper to retrieve the node wrapped by a given JavaScript node.static booleanstatic booleanReturns true if this sequence node has an important tag that we must preserve, so we must not eliminate the node during block flattening.static booleanisInputGeneratingNode(com.oracle.truffle.api.nodes.Node node) static booleanisTaggedNode(com.oracle.truffle.api.nodes.Node node) static booleanisWrapperNode(JavaScriptNode node) Returnstrueifnodeis a JavaScript node that is considered a wrapper.static StringresolveName(com.oracle.truffle.api.nodes.RootNode root) static com.oracle.truffle.api.nodes.SlowPathException
-
Method Details
-
slowPathException
public static com.oracle.truffle.api.nodes.SlowPathException slowPathException() -
hasImportantTag
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
-
formatSourceSection
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
-
isWrapperNode
Returnstrueifnodeis a JavaScript node that is considered a wrapper. -
getWrappedNode
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, ornodeitself 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)
-