# HG changeset patch # User Christian Humer # Date 1423678316 -3600 # Node ID 45a24e9ba03b98c895b48e40faa6f34ceabf94f0 # Parent a79a3e467245dfb9ddfbbd86e58f2775411e5820 SL: update isKind methods for local variables to bind a dynamic parameter. diff -r a79a3e467245 -r 45a24e9ba03b graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLWriteLocalVariableNode.java --- 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); }