Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think easiest way is just to write a backend that emits .NET IR since infra is already there.


There are four ways I considered for implementing this: write an LLVM backend that spits out .NET binaries; write an LLVM backend that spits out C# or CIL assembly; read the LLVM bytecode from .NET and then generate code from there; use the LLVM API to generate some intermediary then handle the compilation from .NET.

I tried #3 first, but landed on #4 in the interest of time. It's not the cleanest approach -- that'd be either using the LLVM API from .NET or implementing a proper backend (assuming there's some decent implementation of a .NET binary writer, since that's a mess) -- but it's stupid simple and effective.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: