public UnaOpFullSig(CType type, PfnBindUnaOp pfn, LiftFlags grflt, UnaOpFuncKind fnkind) { this.pt = PredefinedType.PT_UNDEFINEDINDEX; this.grfuom = UnaOpMask.None; this.cuosSkip = 0; this.pfn = pfn; _type = type; _grflt = grflt; this.fnkind = fnkind; }
/*************************************************************************************************** Set the values of the UnaOpFullSig from the given UnaOpSig. The ExpressionBinder is needed to get the predefined type. Returns true iff the predef type is found. ***************************************************************************************************/ public UnaOpFullSig(ExpressionBinder fnc, UnaOpSig uos) { this.pt = uos.pt; this.grfuom = uos.grfuom; this.cuosSkip = uos.cuosSkip; this.pfn = uos.pfn; this.fnkind = uos.fnkind; _type = pt != PredefinedType.PT_UNDEFINEDINDEX ? fnc.GetOptPDT(pt) : null; _grflt = LiftFlags.None; }
/*************************************************************************************************** * Set the values of the UnaOpFullSig from the given UnaOpSig. The ExpressionBinder is needed to get * the predefined type. Returns true iff the predef type is found. ***************************************************************************************************/ public UnaOpFullSig(ExpressionBinder fnc, UnaOpSig uos) { this.pt = uos.pt; this.grfuom = uos.grfuom; this.cuosSkip = uos.cuosSkip; this.pfn = uos.pfn; this.fnkind = uos.fnkind; _type = pt != PredefinedType.PT_UNDEFINEDINDEX ? fnc.GetPredefindType(pt) : null; _grflt = LiftFlags.None; }
/*************************************************************************************************** * Set the values of the BinOpFullSig from the given BinOpSig. The ExpressionBinder is needed to get * the predefined types. Returns true iff the predef types are found. ***************************************************************************************************/ public BinOpFullSig(ExpressionBinder fnc, BinOpSig bos) { this.pt1 = bos.pt1; this.pt2 = bos.pt2; this.mask = bos.mask; this.cbosSkip = bos.cbosSkip; this.pfn = bos.pfn; this.grfos = bos.grfos; this.fnkind = bos.fnkind; _type1 = pt1 != PredefinedType.PT_UNDEFINEDINDEX ? fnc.GetOptPDT(pt1) : null; _type2 = pt2 != PredefinedType.PT_UNDEFINEDINDEX ? fnc.GetOptPDT(pt2) : null; _grflt = LiftFlags.None; }
public BinOpFullSig(CType type1, CType type2, PfnBindBinOp pfn, OpSigFlags grfos, LiftFlags grflt, BinOpFuncKind fnkind) { this.pt1 = PredefinedType.PT_UNDEFINEDINDEX; this.pt2 = PredefinedType.PT_UNDEFINEDINDEX; this.mask = BinOpMask.None; this.cbosSkip = 0; this.pfn = pfn; this.grfos = grfos; _type1 = type1; _type2 = type2; _grflt = grflt; this.fnkind = fnkind; }
/* Same as CanConvertArg1 but with the indices interchanged! */ private bool CanConvertArg2(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt, out CType ptypeSig1, out CType ptypeSig2) { Debug.Assert(!typeDst.IsNullableType()); ptypeSig1 = null; ptypeSig2 = null; if (canConvert(info.arg2, typeDst)) pgrflt = LiftFlags.None; else { pgrflt = LiftFlags.None; if (!GetSymbolLoader().FCanLift()) return false; typeDst = GetSymbolLoader().GetTypeManager().GetNullable(typeDst); if (!canConvert(info.arg2, typeDst)) return false; pgrflt = LiftFlags.Convert2; } ptypeSig2 = typeDst; if (info.type1.IsNullableType()) { pgrflt = pgrflt | LiftFlags.Lift1; ptypeSig1 = GetSymbolLoader().GetTypeManager().GetNullable(info.typeRaw1); } else ptypeSig1 = info.typeRaw1; return true; }
/*************************************************************************************************** Set the values of the BinOpFullSig from the given BinOpSig. The ExpressionBinder is needed to get the predefined types. Returns true iff the predef types are found. ***************************************************************************************************/ public BinOpFullSig(ExpressionBinder fnc, BinOpSig bos) { this.pt1 = bos.pt1; this.pt2 = bos.pt2; this.mask = bos.mask; this.cbosSkip = bos.cbosSkip; this.pfn = bos.pfn; this.grfos = bos.grfos; this.fnkind = bos.fnkind; _type1 = pt1 != PredefinedType.PT_UNDEFINEDINDEX ? fnc.GetOptPDT(pt1) : null; _type2 = pt2 != PredefinedType.PT_UNDEFINEDINDEX ? fnc.GetOptPDT(pt2) : null; _grflt = LiftFlags.None; }