To compile LSL code I figured the best way would be to first translate it into C#.
Since LL will be supporting both LSL and C# we can use the same translator on a web page or similar to help people who know LSL to understand C#.
Also it is much simpler for other developers on OpenSim to contribute to the code when its C# instead of MSIL.
The translator uses some regex and a couple of byte-by-byte passes over the code. Written in less than a day, no big magic involved.
In-memory compile to assembly (that will be cached for later reuse).
Assembly is dynamically loaded in same way as LSO.
The script inherits from a LSL_BaseClass.cs that contains all the builtin-functions like llSay(), llWhisper, etc.