public ExprAssignment(Ctx ctx, ExprVar target, Expr expr)
     : base(ctx)
 {
     this.Target = target;
     this.Expr   = expr;
 }
 private AssignmentInfo GetAInfo(ExprVar e) {
     return this.assignments.ValueOrDefault(e, () => new AssignmentInfo(), true);
 }
 private bool AreClustered(ExprVar a, ExprVar b) {
     return phiClusters.Any(x => x.Contains(a) && x.Contains(b));
 }
 protected override ICode VisitVar(ExprVar e) {
     var aInfo = this.GetAInfo(e);
     aInfo.count++;
     if (this.inPhiCount > 0) {
         aInfo.mustKeep = true;
     }
     return base.VisitVar(e);
 }
 public Updater(ExprVar target) {
     this.target = target;
 }
Esempio n. 6
0
 protected override ICode VisitVar(ExprVar e) {
     this.js.Append(this.resolver.LocalVarNames[e]);
     // Extra var processing
     this.vars.Add(e);
     if (e.ExprType == Expr.NodeType.VarParameter) {
         if (!this.parameters.ContainsKey(((ExprVarParameter)e).Parameter)) {
             this.parameters.Add(((ExprVarParameter)e).Parameter, e);
         }
     }
     // Need to visit into phi variables to check for parameters
     if (e.ExprType == Expr.NodeType.VarPhi) {
         var args = ((ExprVarPhi)e).Exprs.Where(x => x.ExprType == Expr.NodeType.VarParameter).Cast<ExprVarParameter>();
         foreach (var arg in args) {
             if (!this.parameters.ContainsKey(arg.Parameter)) {
                 this.parameters.Add(arg.Parameter, arg);
             }
         }
     }
     return e;
 }
 public StmtAssignment(Ctx ctx, ExprVar target, Expr expr)
     : base(ctx) {
     this.Target = target;
     this.Expr = expr;
 }
 protected override ICode VisitVar(ExprVar e) {
     this.vars.Add(e);
     return e;
 }
Esempio n. 9
0
 public Catch(Stmt stmt, ExprVar exceptionVar) {
     this.Stmt = stmt;
     this.ExceptionVar = exceptionVar;
 }
Esempio n. 10
0
 public Catch(Stmt stmt, ExprVar exceptionVar)
 {
     this.Stmt         = stmt;
     this.ExceptionVar = exceptionVar;
 }