Beispiel #1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public Operand <T> Assign(IOperand <T> value)
        {
            if (OperandType.IsValueType && value is IValueTypeInitializer && this is ICanEmitAddress)
            {
                ((IValueTypeInitializer)value).Target = this;
                return((Operand <T>)value);
            }
            else
            {
                return(new BinaryExpressionOperand <T, T>(
                           @operator: new BinaryOperators.OperatorAssign <T>(),
                           left: this,
                           right: value.OrNullConstant()));
            }
        }
Beispiel #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public void Return(IOperand <TypeTemplate.TReturn> operand)
        {
            AddReturnStatement(operand.OrNullConstant());
        }