Latest update, from RailsConf 2007

- rescue nodes are now compiling (!!!)
- fixed an issue in ensure compilation that caused returns to be handled incorrectly
- super calls (with arguments) are compiling
- class var declarations are now compiling
- non-local returns (within blocks) are now compiling and working correctly

In order to get rescue working correctly, and to fix a growing problem with exception backtraces repeating the same entry for multiple levels, I've had to saddle the compiler with a perf penalty: for each new line of code, it's constructing a SimpleSourcePosition object to track the current line. This will be temporary until I can find a way to repurpose the Java stack trace for Ruby backtraces (since all necessary info is there). In the short term, however, it's worth it to get the compiler completely functional.

There are now very few pieces remaining to have the compiler complete:

- opt n (ruby -n behavior)
- zsuper (super with no args...lots of oddities here)
- postexe (END { } blocks)
- BEGIN {} blocks
- a few sundries here and there like multiple assignment with * args, weirder default args (like def foo(a = (def foo; nil; end) ...), nested "when" cases, and so on

I think we'll have a good month to hit the compiler before RubyConf.

- Charlie

Charles Oliver Nutter wrote:
Update again, with a new performance milestone reached!

- I fixed an issue in "for" compilation that caused "break" to behave incorrectly
- opelementasgn is now compiling
- compiled methods are now instance methods, and in order to bind a method to a Ruby class we internally instantiate the "script" object that contains all the methods. This will allow us to use the same compiled scripts across implementations, since all call-site caching is done using instance instead of static fields.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to