@SuppressWarnings("try") @Override protected Object compute() { return messageCallNode.call(arguments); } };
/** * Returns the used call target when {@link #call(java.lang.Object[])} is invoked. If the * {@link CallTarget} was split this method returns the {@link CallTarget} returned by * {@link #getClonedCallTarget()}. * * @return the used {@link CallTarget} when node is called * @since 0.8 or earlier */ public CallTarget getCurrentCallTarget() { CallTarget split = getClonedCallTarget(); if (split != null) { return split; } else { return getCallTarget(); } }
@Override public OptimizedCallTarget getCurrentCallTarget() { return (OptimizedCallTarget) super.getCurrentCallTarget(); }
protected static DirectCallNode createInlinedCallNode(CallTarget target) { if (target == null) { return null; } DirectCallNode callNode = DirectCallNode.create(target); callNode.forceInlining(); return callNode; }
@Override public OptimizedCallTarget getCallTarget() { return (OptimizedCallTarget) super.getCallTarget(); }
/** * Returns <code>true</code> if the target of the {@link DirectCallNode} was cloned by the * runtime system or by the guest language implementation. * * @return if the target was split * @since 0.8 or earlier */ public final boolean isCallTargetCloned() { return getClonedCallTarget() != null; }
protected CachedObjectAccessNode(DirectCallNode callTarget, ObjectAccessNode next, InteropPredicate languageCheck) { this.callTarget = callTarget; this.next = next; this.languageCheck = languageCheck; this.callTarget.forceInlining(); }
WrappingRoot(PolyglotEngine engine, Message foreignMessage) { super(null); this.engine = engine; this.messageCallNode = DirectCallNode.create(PolyglotRootNode.createSend(engine, foreignMessage)); }
protected static DirectCallNode createInlinedCallNode(CallTarget target) { if (target == null) { return null; } DirectCallNode callNode = DirectCallNode.create(target); callNode.forceInlining(); return callNode; }
/** * Returns <code>true</code> if the target of the {@link DirectCallNode} was cloned by the * runtime system or by the guest language implementation. * * @return if the target was split */ public final boolean isCallTargetCloned() { return getClonedCallTarget() != null; }
private void initialize() { CallTarget target = LANGUAGE.parse(language.getEnv(true), source, null); if (target == null) { throw new NullPointerException("Parsing has not produced a CallTarget for " + source); } this.call = insert(DirectCallNode.create(target)); }
/** * Calls the inner {@link CallTarget} returned by {@link #getCurrentCallTarget()}. * * @param arguments the arguments that should be passed to the callee * @return the return result of the call * @since 0.23 */ public Object call(Object[] arguments) { // TODO change to varargs as soon as #call(VirtualFrame, Object[] will removed. return call(LEGACY_FRAME, arguments); }
/** @since 0.8 or earlier */ @Override public String toString() { return String.format("%s(target=%s)", getClass().getSimpleName(), getCurrentCallTarget()); }
/** * Returns the used call target when {@link #call(VirtualFrame, Object[])} is invoked. If the * {@link CallTarget} was split this method returns the {@link CallTarget} returned by * {@link #getClonedCallTarget()}. * * @return the used {@link CallTarget} when node is called */ public CallTarget getCurrentCallTarget() { CallTarget split = getClonedCallTarget(); if (split != null) { return split; } else { return getCallTarget(); } }
/** * Returns <code>true</code> if the target of the {@link DirectCallNode} was cloned by the * runtime system or by the guest language implementation. * * @return if the target was split * @since 0.8 or earlier */ public final boolean isCallTargetCloned() { return getClonedCallTarget() != null; }
/** * Calls the inner {@link CallTarget} returned by {@link #getCurrentCallTarget()}. * * @param arguments the arguments that should be passed to the callee * @return the return result of the call * @since 0.23 */ public Object call(Object[] arguments) { // TODO change to varargs as soon as #call(VirtualFrame, Object[] will removed. return call(LEGACY_FRAME, arguments); }
@Override public String toString() { return String.format("%s(target=%s)", getClass().getSimpleName(), getCurrentCallTarget()); }
/** * Returns the used call target when {@link #call(java.lang.Object[])} is invoked. If the * {@link CallTarget} was split this method returns the {@link CallTarget} returned by * {@link #getClonedCallTarget()}. * * @return the used {@link CallTarget} when node is called * @since 0.8 or earlier */ public CallTarget getCurrentCallTarget() { CallTarget split = getClonedCallTarget(); if (split != null) { return split; } else { return getCallTarget(); } }
/** * Calls the inner {@link CallTarget} returned by {@link #getCurrentCallTarget()}. * * @param arguments the arguments that should be passed to the callee * @return the return result of the call * @since 0.8 or earlier * @deprecated use call without frame instead */ @Deprecated public Object call(@SuppressWarnings("unused") VirtualFrame frame, Object[] arguments) { return call(arguments); }
/** @since 0.8 or earlier */ @Override public String toString() { return String.format("%s(target=%s)", getClass().getSimpleName(), getCurrentCallTarget()); }