comparison 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
comparison
equal deleted inserted replaced
7847:06a7cd6aaf00 7848:698cd036a1ca
125 returnValue = ReadLocalNodeFactory.create(slot); 125 returnValue = ReadLocalNodeFactory.create(slot);
126 } 126 }
127 StatementNode write = WriteLocalNodeFactory.create(slot, value); 127 StatementNode write = WriteLocalNodeFactory.create(slot, value);
128 return new ReturnNode(write); 128 return new ReturnNode(write);
129 } 129 }
130
131 public TypedNode createTernary(TypedNode condition, TypedNode thenPart, TypedNode elsePart) {
132 return TernaryNodeFactory.create(condition, thenPart, elsePart);
133 }
130 } 134 }