public void SetInvoke <R, T>(BoolOperDel <R, T> invoke) { Invoke = (r, d) => { T v1 = r.SPop <T>(), v2 = r.SPop <T>(); r.SPush(invoke(v2, v1)); }; }
public static Instruction From <R, T>(string name, BoolOperDel <R, T> invoke) { string retType = ParserUtil.GetCleanTypeName(typeof(R).Name); string type = ParserUtil.GetCleanTypeName(typeof(T).Name); var instr = new Instruction(type, name, retType, new[] { type, type }, null); instr.SetInvoke(invoke); return(instr); }
public static Instruction From <T>(string name, BoolOperDel <T, T> invoke) { return(From <T, T>(name, invoke)); }