public class MatchContext extends Object
| Constructor and Description |
|---|
MatchContext(NodeLIRBuilder builder,
MatchStatement rule,
int index,
Node node,
Block rootBlock,
StructuredGraph.ScheduleResult schedule) |
| Modifier and Type | Method and Description |
|---|---|
org.graalvm.compiler.core.match.MatchPattern.Result |
captureNamedValue(String name,
Class<? extends Node> type,
Node value) |
org.graalvm.compiler.core.match.MatchPattern.Result |
consume(Node node,
boolean ignoresSideEffects,
boolean atRoot,
boolean singleUser)
Mark a node as consumed by the match.
|
Node |
getRoot() |
Node |
namedNode(String name)
Return the named node.
|
void |
setResult(ComplexMatchResult result)
Mark the interior nodes with INTERIOR_MATCH and set the Value of the root to be the result.
|
String |
toString() |
org.graalvm.compiler.core.match.MatchPattern.Result |
validate() |
public MatchContext(NodeLIRBuilder builder, MatchStatement rule, int index, Node node, Block rootBlock, StructuredGraph.ScheduleResult schedule)
public Node getRoot()
public org.graalvm.compiler.core.match.MatchPattern.Result captureNamedValue(String name, Class<? extends Node> type, Node value)
public org.graalvm.compiler.core.match.MatchPattern.Result validate()
public void setResult(ComplexMatchResult result)
result - public org.graalvm.compiler.core.match.MatchPattern.Result consume(Node node, boolean ignoresSideEffects, boolean atRoot, boolean singleUser)
public Node namedNode(String name)
name - the name of a node in the match ruleGraalError - is the named node doesn't exist.