public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } CLRFFIFunctionPointer fp = obj as CLRFFIFunctionPointer; if (fp == null) { return(false); } return(Contains(fp.Name, fp.mArgTypes, fp.mReturnType)); }
public override FFIFunctionPointer GetFunctionPointer(string className, string name, List <ProtoCore.Type> argTypes, ProtoCore.Type returnType) { List <FFIFunctionPointer> pointers = GetFunctionPointers(className, name); if (null == pointers) { return(null); } foreach (var ptr in pointers) { CLRFFIFunctionPointer clrPtr = ptr as CLRFFIFunctionPointer; if (clrPtr.Contains(name, argTypes, returnType)) { return(clrPtr); } } return(null); }
private void RegisterFunctionPointer(string functionName, MemberInfo method, ProtoCore.Type retype) { List <FFIFunctionPointer> pointers = GetFunctionPointers(functionName); FFIFunctionPointer f = null; if (functionName == ProtoCore.DSDefinitions.Keyword.Dispose) { f = new DisposeFunctionPointer(Module, method, retype); } else if (CoreUtils.IsGetter(functionName)) { f = new GetterFunctionPointer(Module, functionName, method, retype); } else { f = new CLRFFIFunctionPointer(Module, functionName, method, null, retype); } if (!pointers.Contains(f)) { pointers.Add(f); } }
private void RegisterFunctionPointer(string functionName, MemberInfo method, List <ProtoCore.Type> argTypes, ProtoCore.Type retype) { List <FFIFunctionPointer> pointers = GetFunctionPointers(functionName); FFIFunctionPointer f = null; if (CoreUtils.IsDisposeMethod(functionName)) { f = new DisposeFunctionPointer(Module, method, retype); } else if (CoreUtils.IsGetter(functionName)) { f = new GetterFunctionPointer(Module, functionName, method, retype); } else { f = new CLRFFIFunctionPointer(Module, functionName, method, argTypes, retype); } if (!pointers.Contains(f)) { pointers.Add(f); } }
private void RegisterFunctionPointer(string functionName, MemberInfo method, List<ProtoCore.Type> argTypes, ProtoCore.Type retype) { List<FFIFunctionPointer> pointers = GetFunctionPointers(functionName); FFIFunctionPointer f = null; if (CoreUtils.IsDisposeMethod(functionName)) f = new DisposeFunctionPointer(Module, method, retype); else if (CoreUtils.IsGetter(functionName)) f = new GetterFunctionPointer(Module, functionName, method, retype); else f = new CLRFFIFunctionPointer(Module, functionName, method, argTypes, retype); if (!pointers.Contains(f)) pointers.Add(f); }
private void RegisterFunctionPointer(string functionName, MemberInfo method, ProtoCore.Type retype) { List<FFIFunctionPointer> pointers = GetFunctionPointers(functionName); FFIFunctionPointer f = null; if (functionName == ProtoCore.DSDefinitions.Keyword.Dispose) f = new DisposeFunctionPointer(Module, method, retype); else if (CoreUtils.IsGetter(functionName)) f = new GetterFunctionPointer(Module, functionName, method, retype); else f = new CLRFFIFunctionPointer(Module, functionName, method, null, retype); if (!pointers.Contains(f)) pointers.Add(f); }