public ThreadDeath createUnwind(Object info, EventBinding<?> unwindBinding) { return eventContext.createUnwind(info, unwindBinding); }
public ThreadDeath createUnwind(Object info, EventBinding<?> unwindBinding) { return eventContext.createUnwind(info, unwindBinding); }
/** * Create an unwind throwable, that when thrown, abruptly breaks execution of a node and unwinds * it off the execution stack. This is a a shortcut for * {@link #createUnwind(Object, EventBinding)} with the current binding, only the event listener * instance that threw the unwind throwable gets called <code>onUnwind</code>. * * @param info an info that is passed into * {@link ExecutionEventListener#onUnwind(EventContext, VirtualFrame, Object)} or * {@link ExecutionEventNode#onUnwind(VirtualFrame, Object)}. It can be used for * arbitrary client data that help to control the unwind process. * @see #createUnwind(Object, EventBinding) * @since 0.31 */ public ThreadDeath createUnwind(Object info) { return createUnwind(info, null); }
/** * Create an unwind throwable, that when thrown, abruptly breaks execution of a node and unwinds * it off the execution stack. This is a a shortcut for * {@link #createUnwind(Object, EventBinding)} with the current binding, only the event listener * instance that threw the unwind throwable gets called <code>onUnwind</code>. * * @param info an info that is passed into * {@link ExecutionEventListener#onUnwind(EventContext, VirtualFrame, Object)} or * {@link ExecutionEventNode#onUnwind(VirtualFrame, Object)}. It can be used for * arbitrary client data that help to control the unwind process. * @see #createUnwind(Object, EventBinding) * @since 0.31 */ public ThreadDeath createUnwind(Object info) { return createUnwind(info, null); }
@Override protected void onReturnValue(VirtualFrame frame, Object result) { Object newResult = onNode(frame, false, result, null); if (newResult != result) { CompilerDirectives.transferToInterpreter(); throw getContext().createUnwind(new ChangedReturnInfo(newResult)); } }
@TruffleBoundary private void doReturn(MaterializedFrame frame, Object result) { SteppingStrategy steppingStrategy; try { if (hasRootElement) { doStepAfter(frame, result); } } finally { steppingStrategy = strategyMap.get(Thread.currentThread()); if (steppingStrategy != null) { // Stepping out of a function. steppingStrategy.notifyCallExit(); } } if (steppingStrategy != null && steppingStrategy.isStopAfterCall()) { Object newResult = notifyCallerReturn(steppingStrategy, this, SuspendAnchor.AFTER, result); if (newResult != result) { throw getContext().createUnwind(new ChangedReturnInfo(newResult)); } } }
@Override protected void onReturnValue(VirtualFrame frame, Object result) { if (stepping.get()) { Object newResult = doStepAfter(frame.materialize(), result); if (newResult != result) { CompilerDirectives.transferToInterpreter(); throw getContext().createUnwind(new ChangedReturnInfo(newResult)); } } }