Skip to content

[GodMode] Expression to IL intrinsic #235

@dadhi

Description

@dadhi

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions