예제 #1
0
파일: Using_c.java 프로젝트: pl-eco/ET
 @Override
 public <T> List<T> acceptCFG(CFGBuilder<?> v, List<T> succs) {
   // not sure
   v.visitCFG(consequent, this, EXIT);
   if (alternative != null) v.visitCFG(alternative, this, EXIT);
   return succs;
 }
예제 #2
0
 public <S> List<S> acceptCFG(CFGBuilder v, List<S> succs) {
   if (result == null) {
     v.visitCFGList(statements, this, EXIT);
   } else {
     v.visitCFGList(statements, result, ENTRY);
     v.visitCFG(result, this, EXIT);
   }
   return succs;
 }
예제 #3
0
  @Override
  protected void acceptCFGOpAssign(CFGBuilder<?> v) {
    /*
    Local l = (Local)left();

    // l OP= e: visit l -> e -> (l OP= e)
    v.visitThrow(l);
    v.edge(l, right().entry());
    v.visitCFG(right(), this);
    */

    v.visitCFG(left(), right(), ENTRY);
    v.visitCFG(right(), this, EXIT);
  }
예제 #4
0
파일: For_c.java 프로젝트: Bludge0n/AREsoft
  public List acceptCFG(CFGBuilder v, List succs) {
    v.visitCFGList(inits, (cond != null ? cond.entry() : body.entry()));

    if (cond != null) {
      if (condIsConstantTrue()) {
        v.visitCFG(cond, body.entry());
      } else {
        v.visitCFG(cond, FlowGraph.EDGE_KEY_TRUE, body.entry(), FlowGraph.EDGE_KEY_FALSE, this);
      }
    }

    v.push(this).visitCFG(body, continueTarget());
    v.visitCFGList(iters, (cond != null ? cond.entry() : body.entry()));

    return succs;
  }
예제 #5
0
 @Override
 protected void acceptCFGAssign(CFGBuilder<?> v) {
   // do not visit left()
   // l = e: visit e -> (l = e)
   v.visitCFG(right(), this, EXIT);
 }
예제 #6
0
 public List<Term> acceptCFG(CFGBuilder v, List<Term> succs) {
   v.visitCFG(call, this, EXIT);
   return succs;
 }
예제 #7
0
 public List acceptCFG(CFGBuilder v, List succs) {
   v.visitCFG(expr, this);
   return succs;
 }