public Operand Call(MethodInfo info, params Operand[] callArgs) { if (Ptc.State == PtcState.Disabled) { IntPtr funcPtr = Delegates.GetDelegateFuncPtr(info); OperandType returnType = GetOperandType(info.ReturnType); Symbols.Add((ulong)funcPtr.ToInt64(), info.Name); return(Call(Const(funcPtr.ToInt64()), returnType, callArgs)); } else { int index = Delegates.GetDelegateIndex(info); IntPtr funcPtr = Delegates.GetDelegateFuncPtrByIndex(index); OperandType returnType = GetOperandType(info.ReturnType); Symbols.Add((ulong)funcPtr.ToInt64(), info.Name); return(Call(Const(funcPtr.ToInt64(), true, index), returnType, callArgs)); } }
public virtual Operand Call(MethodInfo info, params Operand[] callArgs) { IntPtr funcPtr = Delegates.GetDelegateFuncPtr(info); OperandType returnType = GetOperandType(info.ReturnType); Symbols.Add((ulong)funcPtr.ToInt64(), info.Name); return(Call(Const(funcPtr.ToInt64()), returnType, callArgs)); }