Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/WriteLocalNode.java @ 12405:139b84d713bc
Truffle API adjustments: Simplify frame handling. Introduce cast for MaterializedFrame objects.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 14 Oct 2013 23:28:10 +0200 |
parents | 269e6794e1ec |
children | 136df94b5aa8 |
comparison
equal
deleted
inserted
replaced
12404:47eb670c1634 | 12405:139b84d713bc |
---|---|
34 | 34 |
35 public WriteLocalNode(WriteLocalNode node) { | 35 public WriteLocalNode(WriteLocalNode node) { |
36 this(node.slot); | 36 this(node.slot); |
37 } | 37 } |
38 | 38 |
39 @Specialization(rewriteOn = FrameSlotTypeException.class) | 39 @Specialization |
40 public int write(VirtualFrame frame, int right) throws FrameSlotTypeException { | 40 public int write(VirtualFrame frame, int right) { |
41 frame.setInt(slot, right); | 41 frame.setInt(slot, right); |
42 return right; | 42 return right; |
43 } | 43 } |
44 | 44 |
45 @Specialization(rewriteOn = FrameSlotTypeException.class) | 45 @Specialization |
46 public boolean write(VirtualFrame frame, boolean right) throws FrameSlotTypeException { | 46 public boolean write(VirtualFrame frame, boolean right) { |
47 frame.setBoolean(slot, right); | 47 frame.setBoolean(slot, right); |
48 return right; | 48 return right; |
49 } | 49 } |
50 | 50 |
51 @Specialization | 51 @Specialization |