Tuesday, June 22, 2010

Hackweeek

A couple of weeks ago we had another hackweek at Novell, and I continued working on getting vbnc to use cecil, as I did last time. With a big difference: I finished.

Yep, vbnc now uses Cecil to emit assemblies, the System.Reflection.Emit API is not used anymore. This makes it possible to fix a few long standing bugs, but most importantly (to me at least, the bugs are quite corner-case), a lot of unnecessary code has been deleted (~10k fewer lines of code in the compiler).

Another advantage is that it's now trivial to add support for compiling to different runtime versions - vbnc won't ever suffer from multiple personalities like the mono's C# compiler does: mcs/gmcs/smcs/dmcs...

Performance is still somewhat lower (bootstrapping the compiler itself is ~20% slower), but I haven't even looked at why (almost 3 years of working on a branch with fairly big changes has probably introduced some non-optimal code), so this is likely to change. Speed is also helped by using the new cecil/light which jbevain released recently.

And since I was done a day early and wanted to have a break from what I've been doing for the last 3 years with vbnc, I implemented the first VB 9 feature: ternary ifs!

2 comments:

  1. I am a big fan of Visual Basic and would be interested in helping you work on bringing VB 9 to Mono.

    If you could use some assistance in writing or testing the compiler please let me know.

    Jonathan Allen
    grauenwolf@gmail.com

    ReplyDelete
  2. What is the current status of the VB Compiler and how big is the team?

    I am preparing a talk about Mono and VB for a conference next week and would very interested in a short update (and if the project is still alive which I sincerely hope).

    Please mail me at:

    pemo04 at gmail dot com

    Thank you,
    Peter

    ReplyDelete