use of com.oracle.svm.core.graal.nodes.DeoptSourcePositionInfoNode in project graal by oracle.
the class CollectDeoptimizationSourcePositionsPhase method run.
@Override
protected void run(StructuredGraph graph) {
List<NodeSourcePosition> deoptimzationSourcePositions = new ArrayList<>();
/*
* The debugId 0 is reserved for "unknown" to avoid any possible confusion with an
* uninitialized debugId.
*/
deoptimzationSourcePositions.add(null);
for (DeoptimizeNode node : graph.getNodes(DeoptimizeNode.TYPE)) {
node.setDebugId(deoptimzationSourcePositions.size());
deoptimzationSourcePositions.add(node.getNodeSourcePosition());
}
assert graph.getNodes(DynamicDeoptimizeNode.TYPE).isEmpty() : "must collect NodeSourcePosition before DeoptimizationGroupingPhase";
graph.addAfterFixed(graph.start(), graph.add(new DeoptSourcePositionInfoNode(deoptimzationSourcePositions)));
}
Aggregations