use of org.graalvm.compiler.nodes.spi.LoweringTool in project graal by oracle.
the class DefaultJavaLoweringProvider method lowerIndexOf.
private void lowerIndexOf(StringIndexOfNode n) {
if (n.getArgument(3).isConstant()) {
SnippetLowering lowering = new SnippetLowering() {
@Override
public void lower(SnippetLowerableMemoryNode node, LoweringTool tool) {
if (tool.getLoweringStage() != LoweringTool.StandardLoweringStage.LOW_TIER) {
return;
}
indexOfSnippets.lower(node, tool);
}
};
SnippetLowerableMemoryNode snippetLower = new SnippetLowerableMemoryNode(lowering, NamedLocationIdentity.getArrayLocation(JavaKind.Char), n.stamp(NodeView.DEFAULT), n.toArgumentArray());
n.graph().add(snippetLower);
n.graph().replaceFixedWithFixed(n, snippetLower);
}
}
Aggregations