public static BranchProfile create() { return new BranchProfile(); }
@Override public void executeVoid(VirtualFrame frame) { final boolean condition; try { condition = conditionNode.executeBoolean(frame); } catch (UnexpectedResultException e) { // TODO throw new UnsupportedOperationException(e); } if (CompilerDirectives.injectBranchProbability(getBranchProbability(), condition)) { if (CompilerDirectives.inInterpreter()) { thenCount++; } thenProfile.enter(); thenPartNode.executeVoid(frame); } else { if (CompilerDirectives.inInterpreter()) { elseCount++; } elseProfile.enter(); elsePartNode.executeVoid(frame); } }