protected internal override void TraverseEval(Eval eval) { var m = eval.InvokedMethod(); eval.InvocationArgs().ForEach(Traverse); var lam = eval.InvokedLambda(); if (lam.InvokedAsCtor) { il.newobj(m); } else if (lam.InvokedAsVirtual) { il.callvirt(m); } else { il.call(m); } var rets_smth = lam.Sig.Ret != typeof(void); var ret_aint_used = !(Stack.SecondOrDefault() is Expression); if (rets_smth && ret_aint_used) { il.pop(); } }
protected override void TraverseEval(Eval eval) { var m = eval.InvokedMethod(); eval.InvocationArgs().ForEach(Traverse); var lam = eval.InvokedLambda(); if (lam.InvokedAsCtor) il.newobj(m); else if (lam.InvokedAsVirtual) il.callvirt(m); else il.call(m); var rets_smth = lam.Sig.Ret != typeof(void); var ret_aint_used = !(Stack.SecondOrDefault() is Expression); if (rets_smth && ret_aint_used) il.pop(); }