-
-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
Thinking about #234 expression relative complexity, and as we are controlling the IL emit, we can as well provide the hook for the User to emit the IL for the specific expression.
For instance, given MethodCallExpession for specific method info and the user-provided IL emitter for this method body, we can use provided IL directly instead of generic FEC expression visitor and emitter.
FEC may also provide its own recognizable for such inlining "intrinsic" methods, e.g. call to:
T TryOrDefault<T>(Func<T> func, List<Exception> errors)
{
try { return func(); }
catch(Exception ex) { errors.Add(ex); return default; }
}maybe replaced with the method code and func expression Body avoiding the separate nested lambda compilation.
dzmitry-lahoda