Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLReadLocalVariableNode.java @ 13943:89ac75425681
SL: small cleanups
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Wed, 12 Feb 2014 10:30:42 -0800 |
parents | afd6fa5e8229 |
children | abe7128ca473 |
comparison
equal
deleted
inserted
replaced
13942:1ee27cd07ed0 | 13943:89ac75425681 |
---|---|
40 * Returns the descriptor of the accessed local variable. The implementation of this method is | 40 * Returns the descriptor of the accessed local variable. The implementation of this method is |
41 * created by the Truffle DSL based on the {@link NodeField} annotation on the class. | 41 * created by the Truffle DSL based on the {@link NodeField} annotation on the class. |
42 */ | 42 */ |
43 protected abstract FrameSlot getSlot(); | 43 protected abstract FrameSlot getSlot(); |
44 | 44 |
45 @Specialization(rewriteOn = {FrameSlotTypeException.class}) | 45 @Specialization(rewriteOn = FrameSlotTypeException.class) |
46 protected long readLong(VirtualFrame frame) throws FrameSlotTypeException { | 46 protected long readLong(VirtualFrame frame) throws FrameSlotTypeException { |
47 return frame.getLong(getSlot()); | 47 return frame.getLong(getSlot()); |
48 } | 48 } |
49 | 49 |
50 @Specialization(rewriteOn = {FrameSlotTypeException.class}) | 50 @Specialization(rewriteOn = FrameSlotTypeException.class) |
51 protected boolean readBoolean(VirtualFrame frame) throws FrameSlotTypeException { | 51 protected boolean readBoolean(VirtualFrame frame) throws FrameSlotTypeException { |
52 return frame.getBoolean(getSlot()); | 52 return frame.getBoolean(getSlot()); |
53 } | 53 } |
54 | 54 |
55 @Specialization(order = 1, rewriteOn = {FrameSlotTypeException.class}) | 55 @Specialization(order = 1, rewriteOn = FrameSlotTypeException.class) |
56 protected Object readObject(VirtualFrame frame) throws FrameSlotTypeException { | 56 protected Object readObject(VirtualFrame frame) throws FrameSlotTypeException { |
57 return frame.getObject(getSlot()); | 57 return frame.getObject(getSlot()); |
58 } | 58 } |
59 | 59 |
60 /** | 60 /** |