Ejemplo n.º 1
0
 public virtual void VisitCompoundAssign(BoundCompoundAssignEx x)
 {
     Accept(x.Target);
     Accept(x.Value);
 }
Ejemplo n.º 2
0
 public virtual void VisitCompoundAssign(BoundCompoundAssignEx x)
 {
     Accept(x.Target);
     Accept(x.Value);
 }
 public virtual TResult VisitCompoundAssign(BoundCompoundAssignEx x) => DefaultVisitOperation(x);
Ejemplo n.º 4
0
        public override void VisitCompoundAssign(BoundCompoundAssignEx x)
        {
            Debug.Assert(x.Target.Access.IsRead && x.Target.Access.IsWrite);
            Debug.Assert(x.Value.Access.IsRead);

            // Target X Value
            var tmp = new BoundBinaryEx(x.Target.WithAccess(BoundAccess.Read), x.Value, CompoundOpToBinaryOp(x.Operation));
            Visit(tmp, ConditionBranch.AnyResult);

            // Target =
            Visit(x.Target, BoundAccess.Write.WithWrite(tmp.TypeRefMask));

            // put read access back
            x.Target.Access = x.Target.Access.WithRead();

            //
            x.TypeRefMask = tmp.TypeRefMask;
        }