@Override public Object execute(VirtualFrame frame) { while (true) { getContext().getSafepointManager().poll(); Object result; try { result = tryPart.execute(frame); } catch (ControlFlowException exception) { controlFlowProfile.enter(); throw exception; } catch (RaiseException exception) { raiseExceptionProfile.enter(); try { return handleException(frame, exception); } catch (RetryException e) { continue; } } finally { clearExceptionVariableNode.execute(frame); } elseProfile.enter(); elsePart.executeVoid(frame); return result; } }
@Override public Object execute(VirtualFrame frame) { if (CompilerDirectives.injectBranchProbability( getBranchProbability(), condition.executeBoolean(frame))) { if (CompilerDirectives.inInterpreter()) { thenCount++; } thenProfile.enter(); return thenBody.execute(frame); } else { if (CompilerDirectives.inInterpreter()) { elseCount++; } elseProfile.enter(); return elseBody.execute(frame); } }
@Override public Object execute(VirtualFrame frame) { if (RubyArguments.getUserArgumentsCount(frame.getArguments()) < minimum) { defaultValueProfile.enter(); return defaultValue.execute(frame); } else { return RubyArguments.getUserArgument(frame.getArguments(), index); } }
@Override public Object execute(VirtualFrame frame) { while (true) { try { final Object result = tryPart.execute(frame); elsePart.executeVoid(frame); return result; } catch (ControlFlowException exception) { controlFlowProfile.enter(); throw exception; } catch (RuntimeException exception) { CompilerDirectives.transferToInterpreter(); try { return handleException(frame, exception); } catch (RetryException e) { continue; } } } }