changes
[IRC.git] / Robust / src / IR / Flat / FlatCastNode.java
1 package IR.Flat;
2 import IR.TypeDescriptor;
3
4 public class FlatCastNode extends FlatNode {
5     TempDescriptor src;
6     TempDescriptor dst;
7     TypeDescriptor type;
8     
9     public FlatCastNode(TypeDescriptor type, TempDescriptor src, TempDescriptor dst) {
10         this.type=type;
11         this.src=src;
12         this.dst=dst;
13     }
14
15     public String toString() {
16         return dst.toString()+"=("+type.toString()+")"+src.toString();
17     }
18
19     public int kind() {
20         return FKind.FlatCastNode;
21     }
22
23     public TempDescriptor [] writesTemps() {
24         return new TempDescriptor[] {dst};
25     }
26
27     public TempDescriptor [] readsTemps() {
28         return new TempDescriptor[] {src};
29     }
30
31 }