예제 #1
0
 /**
  * Call record every time you compute an analysis result for a node. Intended to be used as you
  * return: return record(node, answer);
  */
 public BASet<IdOrOp> recur(Node n) {
   BASet<IdOrOp> res = n.accept(this);
   if (res.comparator() != NodeComparator.idOrOpComparer) {
     throw new Error("Wrong comparator on " + res);
   }
   fv.put(n, res);
   return res;
 }
예제 #2
0
 public BASet<IdOrOp> combine(List<BASet<IdOrOp>> sets) {
   BASet<IdOrOp> result = set();
   for (BASet<IdOrOp> s : sets) result.addAll(s);
   return result;
 }
예제 #3
0
 private static BASet<IdOrOp> set(IdOrOp e1) {
   BASet<IdOrOp> res = set();
   res.add(e1);
   return res;
 }