Mercurial > hg > truffle
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLReadLocalVariableNode.java @ 16911:ee4fde70df19
SL: local variable nodes should use contains to avoid polymorphism.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Sat, 23 Aug 2014 19:31:26 +0200 |
parents | abe7128ca473 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLReadLocalVariableNode.java Sat Aug 23 19:31:22 2014 +0200 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLReadLocalVariableNode.java Sat Aug 23 19:31:26 2014 +0200 @@ -57,7 +57,7 @@ return frame.getBoolean(getSlot()); } - @Specialization(order = 1, rewriteOn = FrameSlotTypeException.class) + @Specialization(rewriteOn = FrameSlotTypeException.class) protected Object readObject(VirtualFrame frame) throws FrameSlotTypeException { return frame.getObject(getSlot()); } @@ -66,7 +66,7 @@ * This is the generic case that always succeeds. Since we already have another specialization * with the same signature above, we need to order them explicitly with the order attribute. */ - @Specialization(order = 2) + @Specialization(contains = {"readLong", "readBoolean", "readObject"}) protected Object read(VirtualFrame frame) { return frame.getValue(getSlot()); }