Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/WriteLocalNode.java @ 9222:aa9ffb3a715e
Updated Truffle-SL to new codegen API.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Sat, 20 Apr 2013 12:17:27 +0200 |
parents | 97ee911c4c74 |
children | 07f8d136a05e |
comparison
equal
deleted
inserted
replaced
9221:67bee207f20c | 9222:aa9ffb3a715e |
---|---|
25 import java.math.*; | 25 import java.math.*; |
26 | 26 |
27 import com.oracle.truffle.api.codegen.*; | 27 import com.oracle.truffle.api.codegen.*; |
28 import com.oracle.truffle.api.frame.*; | 28 import com.oracle.truffle.api.frame.*; |
29 | 29 |
30 @NodeChild(value = "rightNode", type = TypedNode.class) | |
30 public abstract class WriteLocalNode extends FrameSlotNode { | 31 public abstract class WriteLocalNode extends FrameSlotNode { |
31 | 32 |
32 @Child protected TypedNode rightNode; | 33 public WriteLocalNode(FrameSlot slot) { |
33 | |
34 public WriteLocalNode(FrameSlot slot, TypedNode right) { | |
35 super(slot); | 34 super(slot); |
36 this.rightNode = adoptChild(right); | |
37 } | 35 } |
38 | 36 |
39 public WriteLocalNode(WriteLocalNode node) { | 37 public WriteLocalNode(WriteLocalNode node) { |
40 this(node.slot, node.rightNode); | 38 this(node.slot); |
41 } | 39 } |
42 | 40 |
43 @Specialization | 41 @Specialization |
44 public int write(VirtualFrame frame, int right) { | 42 public int write(VirtualFrame frame, int right) { |
45 frame.setInt(slot, right); | 43 frame.setInt(slot, right); |