/** * 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#getFloat(FrameSlot) * @since 0.8 or earlier */ public static float getFloatSafe(Frame frame, FrameSlot frameSlot) { try { return frame.getFloat(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#getFloat(FrameSlot) * @since 0.8 or earlier */ public static float getFloatSafe(Frame frame, FrameSlot frameSlot) { try { return frame.getFloat(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#getFloat(FrameSlot) */ public static float getFloatSafe(Frame frame, FrameSlot frameSlot) { try { return frame.getFloat(frameSlot); } catch (FrameSlotTypeException e) { throw new IllegalStateException(); } } }
@Override @TruffleBoundary public float getFloat(FrameSlot slot) throws FrameSlotTypeException { return delegate.getFloat(slot); }
@Override @TruffleBoundary public float getFloat(FrameSlot slot) throws FrameSlotTypeException { return delegate.getFloat(slot); }