@Override public void executeLoop(VirtualFrame frame) { while (repeatNode.executeRepeating(frame)) { // Empty } } }
@Override public void executeLoop(VirtualFrame frame) { while (repeatNode.executeRepeating(frame)) { // Empty } } }
@Override public void executeLoop(VirtualFrame frame) { while (repeatNode.executeRepeating(frame)) { // Empty } } }
protected Object executeImpl(VirtualFrame frame) { VirtualFrame parentFrame = clazz.cast(frame.getArguments()[0]); while (loopNode.getRepeatingNode().executeRepeating(parentFrame)) { if (CompilerDirectives.inInterpreter()) { return Boolean.FALSE; } } return Boolean.TRUE; }
@Override public void executeLoop(VirtualFrame frame) { int loopCount = 0; try { while (repeatingNode.executeRepeating(frame)) { if (CompilerDirectives.inInterpreter()) { loopCount++; } } } finally { if (CompilerDirectives.inInterpreter()) { reportLoopCount(this, loopCount); } } }
private boolean profilingLoop(VirtualFrame frame) { int iterations = 0; int threshold = getThreshold(); try { while (repeatableNode.executeRepeating(frame)) { // the baseLoopCount might be updated from a child loop during an iteration. if (++iterations + baseLoopCount > threshold) { compileLoop(frame); return false; } } return true; } finally { baseLoopCount += iterations; reportParentLoopCount(iterations); } }
@Override protected Object executeImpl(VirtualFrame originalFrame) { FrameWithoutBoxing loopFrame = (FrameWithoutBoxing) (originalFrame); FrameWithoutBoxing parentFrame = (FrameWithoutBoxing) (loopFrame.getArguments()[0]); executeTransfer(parentFrame, loopFrame, readFrameSlots, readFrameSlotsTags); try { while (loopNode.getRepeatingNode().executeRepeating(loopFrame)) { if (CompilerDirectives.inInterpreter()) { return Boolean.FALSE; } } return Boolean.TRUE; } finally { executeTransfer(loopFrame, parentFrame, writtenFrameSlots, writtenFrameSlotsTags); } }
private boolean compilingLoop(VirtualFrame frame) { int iterations = 0; try { do { OptimizedCallTarget target = compiledOSRLoop; if (target == null) { return false; } if (target.isValid()) { return directCallTarget(target, frame); } if (!target.isCompiling()) { invalidateOSRTarget(this, "OSR compilation failed or cancelled"); return false; } iterations++; } while (repeatableNode.executeRepeating(frame)); return true; } finally { baseLoopCount += iterations; reportParentLoopCount(iterations); } }
@Override public void executeLoop(VirtualFrame frame) { if (CompilerDirectives.inInterpreter()) { try { boolean done = false; while (!done) { if (compiledOSRLoop == null) { done = profilingLoop(frame); } else { done = compilingLoop(frame); } } } finally { baseLoopCount = 0; } } else { while (repeatableNode.executeRepeating(frame)) { if (CompilerDirectives.inInterpreter()) { // compiled method got invalidated. We might need OSR again. executeLoop(frame); return; } } } }