diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java @ 13705:ac5b0f31f7a2

Truffle API-change: FrameDescriptors are now stored in the RootNode in a final field instead of the CallTarget.
author Christian Humer <christian.humer@gmail.com>
date Fri, 17 Jan 2014 17:06:08 +0100
parents ecf152c6bd16
children a12017c18d5d
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java	Fri Jan 17 16:55:59 2014 +0100
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallTarget.java	Fri Jan 17 17:06:08 2014 +0100
@@ -31,11 +31,9 @@
 public class DefaultCallTarget extends CallTarget {
 
     protected final RootNode rootNode;
-    protected final FrameDescriptor frameDescriptor;
 
-    public DefaultCallTarget(RootNode function, FrameDescriptor frameDescriptor) {
+    public DefaultCallTarget(RootNode function) {
         this.rootNode = function;
-        this.frameDescriptor = frameDescriptor;
         this.rootNode.setCallTarget(this);
     }
 
@@ -46,14 +44,10 @@
 
     @Override
     public Object call(PackedFrame caller, Arguments args) {
-        VirtualFrame frame = new DefaultVirtualFrame(frameDescriptor, caller, args);
+        VirtualFrame frame = new DefaultVirtualFrame(rootNode.getFrameDescriptor(), caller, args);
         return rootNode.execute(frame);
     }
 
-    public FrameDescriptor getFrameDescriptor() {
-        return frameDescriptor;
-    }
-
     public RootNode getRootNode() {
         return rootNode;
     }