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