Esempio n. 1
0
        public override Operand Call(MethodInfo info, params Operand[] callArgs)
        {
            if (!HasPtc)
            {
                return(base.Call(info, callArgs));
            }
            else
            {
                int    index   = Delegates.GetDelegateIndex(info);
                IntPtr funcPtr = Delegates.GetDelegateFuncPtrByIndex(index);

                OperandType returnType = GetOperandType(info.ReturnType);

                Symbol symbol = new Symbol(SymbolType.DelegateTable, (ulong)index);

                Symbols.Add((ulong)funcPtr.ToInt64(), info.Name);

                return(Call(Const(funcPtr.ToInt64(), symbol), returnType, callArgs));
            }
        }