helpful progress reporting
[IRC.git] / Robust / src / IR / Tree / CreateObjectNode.java
index afeae5fbb1d479aba5110fad14b404f59c9a5c96..7c8230d49c7d55c565d6189ab61ccf7dca780f07 100644 (file)
@@ -4,63 +4,78 @@ import IR.TypeDescriptor;
 import IR.MethodDescriptor;
 
 public class CreateObjectNode extends ExpressionNode {
-    TypeDescriptor td;
-    Vector argumentlist;
-    MethodDescriptor md;
+  TypeDescriptor td;
+  Vector argumentlist;
+  MethodDescriptor md;
+  FlagEffects fe;
+  boolean isglobal;
 
-    public CreateObjectNode(TypeDescriptor type) {
-       td=type;
-       argumentlist=new Vector();
-    }
+  public CreateObjectNode(TypeDescriptor type, boolean isglobal) {
+    td=type;
+    argumentlist=new Vector();
+    this.isglobal=isglobal;
+  }
 
-    public void addArgument(ExpressionNode en) {
-       argumentlist.add(en);
-    }
+  public boolean isGlobal() {
+    return isglobal;
+  }
 
-    public void setConstructor(MethodDescriptor md) {
-       this.md=md;
-    }
+  public void addFlagEffects(FlagEffects fe) {
+    this.fe=fe;
+  }
 
-    public MethodDescriptor getConstructor() {
-       return md;
-    }
+  public FlagEffects getFlagEffects() {
+    return fe;
+  }
 
-    public TypeDescriptor getType() {
-       return td;
-    }
+  public void addArgument(ExpressionNode en) {
+    argumentlist.add(en);
+  }
 
-    public int numArgs() {
-       return argumentlist.size();
-    }
+  public void setConstructor(MethodDescriptor md) {
+    this.md=md;
+  }
 
-    public ExpressionNode getArg(int i) {
-       return (ExpressionNode) argumentlist.get(i);
-    }
+  public MethodDescriptor getConstructor() {
+    return md;
+  }
 
-    public String printNode(int indent) {
-       String st;
-       boolean isarray=td.isArray();
-       if (isarray)
-           st="new "+td.toString()+"[";
-       else
-           st="new "+td.toString()+"(";
-       for(int i=0;i<argumentlist.size();i++) {
-           ExpressionNode en=(ExpressionNode)argumentlist.get(i);
-           st+=en.printNode(indent);
-           if ((i+1)!=argumentlist.size()) {
-               if (isarray) 
-                   st+="][";
-               else
-                   st+=", ";
-           }
-       }
+  public TypeDescriptor getType() {
+    return td;
+  }
+
+  public int numArgs() {
+    return argumentlist.size();
+  }
+
+  public ExpressionNode getArg(int i) {
+    return (ExpressionNode) argumentlist.get(i);
+  }
+
+  public String printNode(int indent) {
+    String st;
+    boolean isarray=td.isArray();
+    if (isarray)
+      st="new "+td.toString()+"[";
+    else
+      st="new "+td.toString()+"(";
+    for(int i=0; i<argumentlist.size(); i++) {
+      ExpressionNode en=(ExpressionNode)argumentlist.get(i);
+      st+=en.printNode(indent);
+      if ((i+1)!=argumentlist.size()) {
        if (isarray)
-           return st+"]";
+         st+="][";
        else
-           return st+")";
+         st+=", ";
+      }
     }
+    if (isarray)
+      return st+"]";
+    else
+      return st+")";
+  }
 
-    public int kind() {
-       return Kind.CreateObjectNode;
-    }
+  public int kind() {
+    return Kind.CreateObjectNode;
+  }
 }