private DebugStackFrame getTopStackFrame() { if (topStackFrame == null) { topStackFrame = new DebugStackFrame(SuspendedEvent.this, null, 0); } return topStackFrame; }
private DebugStackFrame getTopStackFrame() { if (topStackFrame == null) { topStackFrame = new DebugStackFrame(SuspendedEvent.this, null, 0); } return topStackFrame; }
@Override public FrameInstance visitFrame(FrameInstance frameInstance) { if (isEvalRootStackFrame(session, frameInstance)) { // we stop at eval root stack frames return frameInstance; } if (++depth <= 0) { return null; } frameInstances.add(new DebugStackFrame(SuspendedEvent.this, frameInstance, depth)); return null; } });
@Override public FrameInstance visitFrame(FrameInstance frameInstance) { if (isEvalRootStackFrame(session, frameInstance)) { // we stop at eval root stack frames return frameInstance; } if (++depth <= 0) { return null; } frameInstances.add(new DebugStackFrame(SuspendedEvent.this, frameInstance, depth)); return null; } });
void setSuspendedEvent(SuspendedEvent suspendedEvent) { assert session == null || session == suspendedEvent.getSession(); frame = new DebugStackFrame(suspendedEvent, depth == 0 ? null : frameInstance, depth); }
private List<DebugStackFrame> getOtherFrames() { if (otherFrames == null) { final List<DebugStackFrame> frameInstances = new ArrayList<>(); Truffle.getRuntime().iterateFrames(new FrameInstanceVisitor<FrameInstance>() { private int depth = -context.getStackDepth() - 1; @Override public FrameInstance visitFrame(FrameInstance frameInstance) { if (isEvalRootStackFrame(session, frameInstance)) { // we stop at eval root stack frames return frameInstance; } if (++depth <= 0) { return null; } frameInstances.add(new DebugStackFrame(SuspendedEvent.this, frameInstance, depth)); return null; } }); otherFrames = frameInstances; } return otherFrames; }
private List<DebugStackFrame> getOtherFrames() { if (otherFrames == null) { final List<DebugStackFrame> frameInstances = new ArrayList<>(); Truffle.getRuntime().iterateFrames(new FrameInstanceVisitor<FrameInstance>() { private int depth = -context.getStackDepth() - 1; @Override public FrameInstance visitFrame(FrameInstance frameInstance) { if (isEvalRootStackFrame(session, frameInstance)) { // we stop at eval root stack frames return frameInstance; } if (++depth <= 0) { return null; } frameInstances.add(new DebugStackFrame(SuspendedEvent.this, frameInstance, depth)); return null; } }); otherFrames = frameInstances; } return otherFrames; }