Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java @ 19302:45a24e9ba03b
SL: update isKind methods for local variables to bind a dynamic parameter.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 11 Feb 2015 19:11:56 +0100 |
parents | bf846a813688 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java Wed Feb 11 19:01:35 2015 +0100 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java Wed Feb 11 19:11:56 2015 +0100 @@ -49,15 +49,15 @@ /** * Specialized method to write a primitive {@code long} value. This is only possible if the * local variable also has currently the type {@code long}, therefore a Truffle DSL - * {@link #isLongKind() custom guard} is specified. + * {@link #isLongKind(VirtualFrame) custom guard} is specified. */ - @Specialization(guards = "isLongKind()") + @Specialization(guards = "isLongKind(frame)") protected long writeLong(VirtualFrame frame, long value) { frame.setLong(getSlot(), value); return value; } - @Specialization(guards = "isBooleanKind()") + @Specialization(guards = "isBooleanKind(frame)") protected boolean writeBoolean(VirtualFrame frame, boolean value) { frame.setBoolean(getSlot(), value); return value; @@ -91,11 +91,13 @@ /** * Guard function that the local variable has the type {@code long}. */ - protected boolean isLongKind() { + @SuppressWarnings("unused") + protected boolean isLongKind(VirtualFrame frame) { return isKind(FrameSlotKind.Long); } - protected boolean isBooleanKind() { + @SuppressWarnings("unused") + protected boolean isBooleanKind(VirtualFrame frame) { return isKind(FrameSlotKind.Boolean); }