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 FlatNew(TypeDescriptor type, TempDescriptor dst, boolean isglobal, String disjointId) {
23 this.isglobal=isglobal;
24 this.disjointId=disjointId;
27 public FlatNew(TypeDescriptor type, TempDescriptor dst, TempDescriptor size, boolean isglobal) {
31 this.isglobal=isglobal;
35 public FlatNew(TypeDescriptor type, TempDescriptor dst, TempDescriptor size, boolean isglobal, String disjointId) {
39 this.isglobal=isglobal;
40 this.disjointId=disjointId;
43 public boolean isGlobal() {
47 public String getDisjointId() {
51 public String toString() {
52 String str = "FlatNew_"+dst.toString()+"= NEW "+type.toString();
54 str += "["+size.toString()+"]";
62 public TempDescriptor [] writesTemps() {
63 return new TempDescriptor[] {dst};
66 public TempDescriptor [] readsTemps() {
68 return new TempDescriptor[] {size};
70 return new TempDescriptor[0];
73 public TempDescriptor getDst() {
77 public TempDescriptor getSize() {
81 public TypeDescriptor getType() {