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