2 import IR.TypeDescriptor;
4 public class FlatNew extends FlatNode {
11 public FlatNew(TypeDescriptor type, TempDescriptor dst, boolean isglobal) {
15 this.isglobal=isglobal;
19 public void rewriteUse(TempMap t) {
22 public void rewriteDef(TempMap t) {
26 public FlatNode clone(TempMap t) {
27 return new FlatNew(type, t.tempMap(dst), t.tempMap(size), isglobal, disjointId);
30 public FlatNew(TypeDescriptor type, TempDescriptor dst, boolean isglobal, String disjointId) {
34 this.isglobal=isglobal;
35 this.disjointId=disjointId;
38 public FlatNew(TypeDescriptor type, TempDescriptor dst, TempDescriptor size, boolean isglobal) {
42 this.isglobal=isglobal;
46 public FlatNew(TypeDescriptor type, TempDescriptor dst, TempDescriptor size, boolean isglobal, String disjointId) {
50 this.isglobal=isglobal;
51 this.disjointId=disjointId;
54 public boolean isGlobal() {
58 public String getDisjointId() {
62 public String toString() {
63 String str = "FlatNew_"+dst.toString()+"= NEW "+type.toString();
65 str += "["+size.toString()+"]";
73 public TempDescriptor [] writesTemps() {
74 return new TempDescriptor[] {dst};
77 public TempDescriptor [] readsTemps() {
79 return new TempDescriptor[] {size};
81 return new TempDescriptor[0];
84 public TempDescriptor getDst() {
88 public TempDescriptor getSize() {
92 public TypeDescriptor getType() {