diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/CallNode.java @ 14991:64dcb92ee75a

Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 06 Apr 2014 17:46:24 +0200
parents 1422f0bd55e3
children f675818d9ad0
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/CallNode.java	Sat Apr 05 19:35:30 2014 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/CallNode.java	Sun Apr 06 17:46:24 2014 +0200
@@ -25,7 +25,6 @@
 package com.oracle.truffle.api.nodes;
 
 import com.oracle.truffle.api.*;
-import com.oracle.truffle.api.frame.*;
 
 /**
  * Represents a call to a {@link CallTarget} in the Truffle AST. Addtionally to calling the
@@ -34,9 +33,9 @@
  * splitting. Inlining inlines this call site into the call graph of the parent {@link CallTarget}.
  * Splitting duplicates the {@link CallTarget} using {@link RootNode#split()} to collect call site
  * sensitive profiling information.
- * 
+ *
  * Please note: This class is not intended to be subclassed by guest language implementations.
- * 
+ *
  * @see TruffleRuntime#createCallNode(CallTarget)
  * @see #inline()
  * @see #split()
@@ -51,18 +50,17 @@
 
     /**
      * Calls the inner {@link CallTarget} returned by {@link #getCurrentCallTarget()}.
-     * 
-     * @param caller the caller frame
+     *
      * @param arguments the arguments that should be passed to the callee
      * @return the return result of the call
      */
-    public abstract Object call(PackedFrame caller, Arguments arguments);
+    public abstract Object call(Object[] arguments);
 
     /**
      * Returns the originally supplied {@link CallTarget} when this call node was created. Please
      * note that the returned {@link CallTarget} is not necessarily the {@link CallTarget} that is
      * called. For that use {@link #getCurrentCallTarget()} instead.
-     * 
+     *
      * @return the {@link CallTarget} provided.
      */
     public CallTarget getCallTarget() {
@@ -72,7 +70,7 @@
     /**
      * Returns <code>true</code> if the underlying runtime system supports inlining for the
      * {@link CallTarget} in this {@link CallNode}.
-     * 
+     *
      * @return true if inlining is supported.
      */
     public abstract boolean isInlinable();
@@ -81,7 +79,7 @@
      * Returns <code>true</code> if the {@link CallTarget} in this {@link CallNode} is inlined. A
      * {@link CallNode} can either be inlined manually by invoking {@link #inline()} or by the
      * runtime system which may at any point decide to inline.
-     * 
+     *
      * @return true if this method was inlined else false.
      */
     public abstract boolean isInlined();
@@ -96,7 +94,7 @@
      * Returns <code>true</code> if this {@link CallNode} can be split. A {@link CallNode} can only
      * be split if the runtime system supports splitting and if the {@link RootNode} contained the
      * {@link CallTarget} returns <code>true</code> for {@link RootNode#isSplittable()}.
-     * 
+     *
      * @return <code>true</code> if the target can be split
      */
     public abstract boolean isSplittable();
@@ -109,7 +107,7 @@
 
     /**
      * Returns <code>true</code> if the target of the {@link CallNode} was split.
-     * 
+     *
      * @return if the target was split
      */
     public final boolean isSplit() {
@@ -118,16 +116,16 @@
 
     /**
      * Returns the splitted {@link CallTarget} if this method is split.
-     * 
+     *
      * @return the split {@link CallTarget}
      */
     public abstract CallTarget getSplitCallTarget();
 
     /**
-     * Returns the used call target when {@link #call(PackedFrame, Arguments)} is invoked. If the
+     * Returns the used call target when {@link #call(Object[])} is invoked. If the
      * {@link CallTarget} was split this method returns the {@link CallTarget} returned by
      * {@link #getSplitCallTarget()}.
-     * 
+     *
      * @return the used {@link CallTarget} when node is called
      */
     public CallTarget getCurrentCallTarget() {
@@ -143,7 +141,7 @@
      * Returns the {@link RootNode} associated with {@link CallTarget} returned by
      * {@link #getCurrentCallTarget()}. If the stored {@link CallTarget} does not contain a
      * {@link RootNode} this method returns <code>null</code>.
-     * 
+     *
      * @see #getCurrentCallTarget()
      * @return the root node of the used call target
      */