Esempio n. 1
0
        public override void SubstituteUse(IRVariable variable, IRExpression expression)
        {
            if (ReferenceEquals(Address, variable))
            {
                Address = expression.CloneComplete();
            }
            else
            {
                Address.Substitute(variable, expression);
            }

            Uses.Clear();
            Uses.UnionWith(Address.GetAllVariables());

            if (ReferenceEquals(Operand, variable))
            {
                Operand = expression.CloneComplete();
            }
            else
            {
                Operand.Substitute(variable, expression);
            }

            Uses.UnionWith(Operand.GetAllVariables());
        }
Esempio n. 2
0
        public Operand With(OperandKind kind, OperandType type = OperandType.None, ulong value = 0)
        {
            Kind = kind;
            Type = type;
            Value = value;

            Assignments.Clear();
            Uses.Clear();
            return this;
        }
Esempio n. 3
0
        public override void SubstituteUse(IRVariable variable, IRExpression expression)
        {
            if (ReferenceEquals(ReturnValue, variable))
            {
                ReturnValue = expression.CloneComplete();
            }
            else
            {
                ReturnValue.Substitute(variable, expression);
            }

            Uses.Clear();
            Uses.UnionWith(ReturnValue.GetAllVariables());
        }
Esempio n. 4
0
        public Operand With(
            OperandKind kind,
            OperandType type = OperandType.None,
            ulong value      = 0,
            Symbol symbol    = default)
        {
            Kind = kind;
            Type = type;

            Value = value;

            Symbol = symbol;

            Assignments.Clear();
            Uses.Clear();

            return(this);
        }