diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/NodeFactory.java @ 7848:698cd036a1ca

Added a ternary operator to simple language to test short circuit specialization.
author Christian Humer <christian.humer@gmail.com>
date Tue, 19 Feb 2013 17:27:02 +0100
parents 5e3d1a68664e
children ac2204c05a02
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/NodeFactory.java	Tue Feb 19 17:20:45 2013 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/NodeFactory.java	Tue Feb 19 17:27:02 2013 +0100
@@ -127,4 +127,8 @@
         StatementNode write = WriteLocalNodeFactory.create(slot, value);
         return new ReturnNode(write);
     }
+
+    public TypedNode createTernary(TypedNode condition, TypedNode thenPart, TypedNode elsePart) {
+        return TernaryNodeFactory.create(condition, thenPart, elsePart);
+    }
 }