public void Replace(Dictionary <String, COperand> subs, bool op1) { if (op1) { if (Op1 != null && Op1.Kind == OperandKinds.Expression) { Op1.Expr.Replace(subs, true); Op1.Expr.Replace(subs, false); } else if (Op1 != null && Op1.Kind == OperandKinds.Variable && subs.ContainsKey(Op1.Name)) { Op1 = subs[Op1.Name]; } } else { if (Op2 != null && Op2.Kind == OperandKinds.Expression) { Op2.Expr.Replace(subs, true); Op2.Expr.Replace(subs, false); } else if (Op2 != null && Op2.Kind == OperandKinds.Variable && subs.ContainsKey(Op2.Name)) { Op2 = subs[Op2.Name]; } if (Condition != null) { Condition.Replace(subs, true); Condition.Replace(subs, false); } } }
public CStatement(Kinds k, ulong var1) { this.Kind = k; this.Op1 = new COperand(var1); this.Op2 = null; }
public CStatement(Kinds k, COperand op1, COperand op2) { this.Kind = k; this.Op1 = op1; this.Op2 = op2; }
public CStatement(Kinds k) { this.Kind = k; this.Op1 = null; this.Op2 = null; }
public CStatement(Kinds k, CStatement op1, ulong op2) { this.Kind = k; this.Op1 = new COperand(op1); this.Op2 = new COperand(op2); }
public CStatement(Kinds k, String var1, CStatement expr2) { this.Kind = k; this.Op1 = new COperand(var1); this.Op2 = new COperand(expr2); }