comparison 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
comparison
equal deleted inserted replaced
9257:542712a4732a 9258:07f8d136a05e
29 public class DefaultCallTarget extends CallTarget { 29 public class DefaultCallTarget extends CallTarget {
30 30
31 protected final RootNode rootNode; 31 protected final RootNode rootNode;
32 protected final FrameDescriptor frameDescriptor; 32 protected final FrameDescriptor frameDescriptor;
33 33
34 protected DefaultCallTarget(RootNode function, FrameDescriptor frameDescriptor) { 34 public DefaultCallTarget(RootNode function, FrameDescriptor frameDescriptor) {
35 this.rootNode = function; 35 this.rootNode = function;
36 this.frameDescriptor = frameDescriptor; 36 this.frameDescriptor = frameDescriptor;
37 this.rootNode.setCallTarget(this);
37 } 38 }
38 39
39 @Override 40 @Override
40 public String toString() { 41 public String toString() {
41 return "DefaultCallTarget " + rootNode; 42 return "CallTarget " + rootNode;
42 } 43 }
43 44
44 @Override 45 @Override
45 public Object call(PackedFrame caller, Arguments args) { 46 public Object call(PackedFrame caller, Arguments args) {
46 VirtualFrame frame = new DefaultVirtualFrame(frameDescriptor, caller, args); 47 VirtualFrame frame = new DefaultVirtualFrame(frameDescriptor, caller, args);
47 return rootNode.execute(frame); 48 return rootNode.execute(frame);
48 } 49 }
50
51 public RootNode getRootNode() {
52 return rootNode;
53 }
49 } 54 }