rVM 0.0.17

As promised the new release has a few exciting features!

The ECMA Script (also widely known as Java Script) compiler kind of got the flaggship of rVM for the moment so this (and likely the next few releases as well) will focus on this language. The reason for it is not that we want rVM to become a ECMA Script interpreter but that maintaining more than one language is too much work at this stage – since not even ECMA is fully supported yet.

We redesigned the way rVM programs access rVM Library functions (the stuff written in ruby). While before the functions were accessing for every code executed in the rVM access to them is now limited to core libraries (or everything the compiler declares as such). The advantage of this is to provide a language native interface to those functions. As an example, rVM knows the sin() function, ECMA script does call it Math.sin(), the Math compiler calls them just ‘sin()’ and yet another language might call it ‘sinus()’, now since those functions would be ‘aliased’ in core libraries every lanuage can call them as they want to give a native feeling while writing in it.

That brings a light change in the layout of the language classes along, Language#env will now provide a environment with the core libraries loaded, as long as they exist.

ECMA script got a good bit of the Math library shipped along with this release, meaning that the benchmarks that are used now run the same in rVM and rhino. I would guess that most code that runs in rVM will run out of the box in rhino or other ECMA interpreters since rVM is more strict then most others. The other way round it sadly isn’t guaranteed since the ECMA compiler still misses some features.

To the topic of speed, since we can distinguish now between rVM functions and self implemented functions this gave us a little boost in speed, also some tweaks in the environment handling add a bit speed. Still we can claim to be, as murphy put it so nicely, ‘the slowest ECMA VM around’! Hah! Beat that Google and Mozilla! Even so rVM greatly wins speed with ruby 1.9.1, the benchmarks are nearly twice as fast with the new ruby version!

You can get the new version either via gem (once it is updated at rubyforge), from rubyforge (http://rubyforge.org/frs/?group_id=6626) or directly from here (http://code.licenser.net/projects/list_files/rvm).

Have fun!

Posted by Heinz N. 'Licenser' Gies Fri, 02 Jan 2009 07:13:00 GMT


Trackbacks

Use the following link to trackback from your own site:
http://blog.licenser.net/trackbacks?article_id=51