df88faced694681306fca51d9cd7c840bb83cd1d
[IRC.git] / Robust / src / IR / Flat / FlatCall.java
1 package IR.Flat;
2 import IR.MethodDescriptor;
3
4 public class FlatCall extends FlatNode {
5     TempDescriptor args[];
6     TempDescriptor this_temp;
7     TempDescriptor dst;
8     MethodDescriptor method;
9     
10     public FlatCall(MethodDescriptor md, TempDescriptor dst, TempDescriptor this_temp, TempDescriptor[] args) {
11         this.method=md;
12         this.dst=dst;
13         this.this_temp=this_temp;
14         this.args=args;
15     }
16
17     public String toString() {
18         String st="";
19         if (dst==null)
20             st+=method.getSymbol()+"(";
21         else
22             st+=dst+"="+method.getSymbol()+"(";
23         if (this_temp!=null) {
24             st+=this_temp;
25             if (args.length!=0)
26                 st+=", ";
27         }
28
29         for(int i=0;i<args.length;i++) {
30             st+=args[i].toString();
31             if ((i+1)<args.length)
32                 st+=", ";
33         }
34         return st+")";
35     }
36 }