I'm building a compiler that targets .NET and I've previously generated CIL directly, but generating DLR trees will make my life a fair amount easier. I'm supporting a few dynamic features, namely runtime function creation and ducktyping, but the vast majority of the code is completely static.
So now that that's been explained, I have the following questions:
- Has the DLR been used for static compilation, outside of small examples on MSDN blogs?
- If so, what sort of performance was achieved?
- If not, is there anything fundamentally preventing this?
- Are there any better mechanisms of generating code than either using the DLR or emitting IL directly?
Any insight into this or references to blogs/code/talks would be greatly appreciated.