Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.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 | e5e1013c04fd |
children | bf846a813688 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java Sat Aug 23 19:31:22 2014 +0200 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java Sat Aug 23 19:31:26 2014 +0200 @@ -52,13 +52,13 @@ * {@link #isLongKind() custom guard} is specified. */ @Specialization(guards = "isLongKind") - protected long write(VirtualFrame frame, long value) { + protected long writeLong(VirtualFrame frame, long value) { frame.setLong(getSlot(), value); return value; } @Specialization(guards = "isBooleanKind") - protected boolean write(VirtualFrame frame, boolean value) { + protected boolean writeBoolean(VirtualFrame frame, boolean value) { frame.setBoolean(getSlot(), value); return value; } @@ -73,7 +73,7 @@ * {@link Object}, it is guaranteed to never fail, i.e., once we are in this specialization the * node will never be re-specialized. */ - @Specialization + @Specialization(contains = {"writeLong", "writeBoolean"}) protected Object write(VirtualFrame frame, Object value) { if (getSlot().getKind() != FrameSlotKind.Object) { /*