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