package bd.primitives.nodes;

import com.oracle.truffle.api.frame.VirtualFrame;


/**
 * Nodes that need to be able to accept their arguments already evaluated should implement this
 * interface.
 *
 * <p>
 * The interface is useful during specialization. First, the arguments are evaluated, and
 * afterwards, a new specialization node is determined that then needs to be able to accept the
 * arguments.
 */
public interface PreevaluatedExpression {

  /**
   * Execute the node with the given arguments.
   *
   * @param frame current frame with local variables etc.
   * @param args already evaluated arguments for the node
   * @return result of node execution
   */
  Object doPreEvaluated(VirtualFrame frame, Object[] args);
}

@@ -73,16 +73,67 @@
 lFrame;%0A
+import com.oracle.truffle.api.nodes.NodeInterface;%0A
 %0A%0A/**%0A *
@@ -494,16 +494,38 @@
 ression 
+extends NodeInterface 
 %7B%0A%0A  /**

Make PreevaluatedExpression a NodeInterface