diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java @ 9258:07f8d136a05e

Truffle API changes for the Frame API. Introduction of Assumptions class.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 23 Apr 2013 15:34:06 +0200
parents dc3e86fd3be1
children 3fe325c3f31c
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java	Tue Apr 23 15:08:11 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java	Tue Apr 23 15:34:06 2013 +0200
@@ -31,14 +31,15 @@
     protected final RootNode rootNode;
     protected final FrameDescriptor frameDescriptor;
 
-    protected DefaultCallTarget(RootNode function, FrameDescriptor frameDescriptor) {
+    public DefaultCallTarget(RootNode function, FrameDescriptor frameDescriptor) {
         this.rootNode = function;
         this.frameDescriptor = frameDescriptor;
+        this.rootNode.setCallTarget(this);
     }
 
     @Override
     public String toString() {
-        return "DefaultCallTarget " + rootNode;
+        return "CallTarget " + rootNode;
     }
 
     @Override
@@ -46,4 +47,8 @@
         VirtualFrame frame = new DefaultVirtualFrame(frameDescriptor, caller, args);
         return rootNode.execute(frame);
     }
+
+    public RootNode getRootNode() {
+        return rootNode;
+    }
 }