Example #1
0
        public static object GenFxyCall(FuncDef fd, object a, object b)
        {
            ValueKind kind = OPs.MaxKindOf(a, b);

            if (fd.resultCanBeLazy)
            {
                kind = ValueKind.Async;
            }
            else if (kind == ValueKind.Const && fd.isNotPure)
            {
                kind = ValueKind.Sync;
            }
            return(GenFxyCall((Fxy)fd.func, a, b, kind, fd.resultCanBeLazy));
        }
Example #2
0
 public CallExpr(Delegate func, IList <Expr> args) : base(ExprType.Call, args)
 {
     funcName = func.Method.Name;
     funcDef  = defs.GetOrAdd(func, f => new FuncDef(f, f.Method.Name));
 }
Example #3
0
 public CallExpr(FuncDef fd, IList <Expr> args) : base(ExprType.Call, args)
 {
     this.funcName = fd.name;
     this.funcDef  = fd;
 }
Example #4
0
 public CallExpr(CallExpr ce, IList <Expr> args) : base(ExprType.Call, args)
 {
     this.funcName = ce.funcName;
     this.funcDef  = ce.funcDef;
 }