use of org.graalvm.compiler.nodes.java.FinalFieldBarrierNode in project graal by oracle.
the class BytecodeParser method beforeReturn.
private void beforeReturn(ValueNode x, JavaKind kind) {
if (graph.method() != null && graph.method().isJavaLangObjectInit()) {
/*
* Get the receiver from the initial state since bytecode rewriting could do arbitrary
* things to the state of the locals.
*/
ValueNode receiver = graph.start().stateAfter().localAt(0);
assert receiver != null && receiver.getStackKind() == JavaKind.Object;
if (RegisterFinalizerNode.mayHaveFinalizer(receiver, graph.getAssumptions())) {
append(new RegisterFinalizerNode(receiver));
}
}
genInfoPointNode(InfopointReason.METHOD_END, x);
if (finalBarrierRequired) {
assert originalReceiver != null;
/*
* When compiling an OSR with a final field store, don't bother tracking the original
* receiver since the receiver cannot be EA'ed.
*/
append(new FinalFieldBarrierNode(entryBCI == INVOCATION_ENTRY_BCI ? originalReceiver : null));
}
synchronizedEpilogue(BytecodeFrame.AFTER_BCI, x, kind);
}
Aggregations