diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/NodeFactory.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 aa9ffb3a715e
children 8cf939b349dd
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/NodeFactory.java	Tue Apr 23 15:08:11 2013 +0200
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/NodeFactory.java	Tue Apr 23 15:34:06 2013 +0200
@@ -51,7 +51,7 @@
     }
 
     public void startFunction() {
-        frameDescriptor = new FrameDescriptor(SLTypesGen.SLTYPES);
+        frameDescriptor = new FrameDescriptor();
     }
 
     public void createFunction(StatementNode body, String name) {
@@ -59,7 +59,7 @@
     }
 
     public TypedNode createLocal(String name) {
-        return ReadLocalNodeFactory.create(frameDescriptor.findOrAddFrameSlot(name));
+        return ReadLocalNodeFactory.create(frameDescriptor.findOrAddFrameSlot(name, Integer.class));
     }
 
     public TypedNode createStringLiteral(String value) {
@@ -67,7 +67,7 @@
     }
 
     public StatementNode createAssignment(String name, TypedNode right) {
-        return WriteLocalNodeFactory.create(frameDescriptor.findOrAddFrameSlot(name), right);
+        return WriteLocalNodeFactory.create(frameDescriptor.findOrAddFrameSlot(name, Integer.class), right);
     }
 
     public StatementNode createPrint(List<TypedNode> expressions) {
@@ -123,7 +123,7 @@
     }
 
     public StatementNode createReturn(TypedNode value) {
-        FrameSlot slot = frameDescriptor.findOrAddFrameSlot("<retval>");
+        FrameSlot slot = frameDescriptor.findOrAddFrameSlot("<retval>", Integer.class);
         if (returnValue == null) {
             returnValue = ReadLocalNodeFactory.create(slot);
         }