Beispiel #1
0
        public void AddressOf(EmitContext ec, AddressOp mode)
        {
            IMemoryLocation ml;

            if (temp_field != null)
            {
                ml = temp_field as IMemoryLocation;
                if (ml == null)
                {
                    var lt = new LocalTemporary(temp_field.Type);
                    temp_field.Emit(ec);
                    lt.Store(ec);
                    ml = lt;
                }
            }
            else
            {
                ml = expr as VariableReference;
            }

            if (ml != null)
            {
                ml.AddressOf(ec, mode);
            }
            else
            {
                LocalVariable.AddressOf(ec, mode);
            }
        }
Beispiel #2
0
        public void AddressOf(EmitContext ec, AddressOp mode)
        {
            IMemoryLocation ml = expr as VariableReference;

            if (ml != null)
            {
                ml.AddressOf(ec, mode);
            }
            else
            {
                LocalVariable.AddressOf(ec, mode);
            }
        }