/** * Read a frame slot that is guaranteed to be of the desired kind (either previously checked by * a guard or statically known). * * @param frameSlot the slot of the variable * @throws IllegalStateException if the slot kind does not match * @see Frame#getDouble(FrameSlot) * @since 0.8 or earlier */ public static double getDoubleSafe(Frame frame, FrameSlot frameSlot) { try { return frame.getDouble(frameSlot); } catch (FrameSlotTypeException e) { throw new IllegalStateException(); } }
/** * Read a frame slot that is guaranteed to be of the desired kind (either previously checked by * a guard or statically known). * * @param frameSlot the slot of the variable * @throws IllegalStateException if the slot kind does not match * @see Frame#getDouble(FrameSlot) * @since 0.8 or earlier */ public static double getDoubleSafe(Frame frame, FrameSlot frameSlot) { try { return frame.getDouble(frameSlot); } catch (FrameSlotTypeException e) { throw new IllegalStateException(); } }
/** * Read a frame slot that is guaranteed to be of the desired kind (either previously checked by * a guard or statically known). * * @param frameSlot the slot of the variable * @throws IllegalStateException if the slot kind does not match * @see Frame#getDouble(FrameSlot) */ public static double getDoubleSafe(Frame frame, FrameSlot frameSlot) { try { return frame.getDouble(frameSlot); } catch (FrameSlotTypeException e) { throw new IllegalStateException(); } }
@Override @TruffleBoundary public double getDouble(FrameSlot slot) throws FrameSlotTypeException { return delegate.getDouble(slot); }
@Override @TruffleBoundary public double getDouble(FrameSlot slot) throws FrameSlotTypeException { return delegate.getDouble(slot); }