/** * Sends an {@link Message#IS_NULL IS_NULL message} to the foreign receiver object by executing * the <code> isNullNode </code>. * * @param isNullNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendIsNull(Node isNullNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isNullNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_NULL IS_NULL message} to the foreign receiver object by executing * the <code> isNullNode </code>. * * @param isNullNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendIsNull(Node isNullNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isNullNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_POINTER IS_POINTER message} to the foreign receiver object by * executing the <code> isPointerNode </code>. * * @param isPointerNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.26 */ public static boolean sendIsPointer(Node isPointerNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isPointerNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_EXECUTABLE IS_EXECUTABLE message} to the foreign receiver object * by executing the <code> isExecutableNode </code>. * * @param isExecutableNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendIsExecutable(Node isExecutableNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isExecutableNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_POINTER IS_POINTER message} to the foreign receiver object by * executing the <code> isPointerNode </code>. * * @param isPointerNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.26 */ public static boolean sendIsPointer(Node isPointerNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isPointerNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_INSTANTIABLE IS_INSTANTIABLE message} to the foreign receiver * object by executing the <code>isInstantiableNode</code>. * * @param isInstantiableNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.30 */ public static boolean sendIsInstantiable(Node isInstantiableNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isInstantiableNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#HAS_SIZE HAS_SIZE message} to the foreign receiver object by * executing the <code> hasSizeNode </code>. * * @param hasSizeNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendHasSize(Node hasSizeNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) hasSizeNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_BOXED IS_BOXED message} to the foreign receiver object by * executing the <code> isNullNode </code>. * * @param isBoxedNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendIsBoxed(Node isBoxedNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isBoxedNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_INSTANTIABLE IS_INSTANTIABLE message} to the foreign receiver * object by executing the <code>isInstantiableNode</code>. * * @param isInstantiableNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.30 */ public static boolean sendIsInstantiable(Node isInstantiableNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isInstantiableNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_EXECUTABLE IS_EXECUTABLE message} to the foreign receiver object * by executing the <code> isExecutableNode </code>. * * @param isExecutableNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendIsExecutable(Node isExecutableNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isExecutableNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#HAS_SIZE HAS_SIZE message} to the foreign receiver object by * executing the <code> hasSizeNode </code>. * * @param hasSizeNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendHasSize(Node hasSizeNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) hasSizeNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }
/** * Sends an {@link Message#IS_BOXED IS_BOXED message} to the foreign receiver object by * executing the <code> isNullNode </code>. * * @param isBoxedNode the createNode created by {@link Message#createNode()} * @param receiver foreign object to receive the message passed to {@link Message#createNode()} * method * @return return value, if any * @throws ClassCastException if the createNode has not been created by * {@link Message#createNode()} method. * @since 0.24 */ public static boolean sendIsBoxed(Node isBoxedNode, TruffleObject receiver) { try { return (boolean) ((InteropAccessNode) isBoxedNode).executeOrFalse(receiver); } catch (InteropException e) { CompilerDirectives.transferToInterpreter(); throw new AssertionError("Unexpected exception caught.", e); } }