I'm back on my branch now for some of these new fixes and
enhancements. Here are two I'm committing on cnutter_work1 right now.

Patch 1: eliminating the use of "throw" in the evaluator for interpreter events

Currently most of the next, break, throw, raise, return, redo, and
retry operations are implemented as they always have been, as
exceptions that bubble out to interested parties. Throwing exceptions
to propagate these events is very heavy-weight, as is the construction
of the exceptions themselves. Throwing also requires that we have an
ever-deepening Java stack, where higher levels in the stack wait to
catch events from lower levels. This is antithetical to our move
toward an iterative, green-thread-capable interpreter, and also makes
implementing continuations and tail-call optimization nearly
impossible.

This is the beginning of removing this behavior. Instead of throwing a
"next" or "redo" exception, the evaluator now triggers an interpreter
event by setting the "current exception". The interpreter loop sees
this event and handles the event as appropriate.

The continuation of this work will see interpreter events also tied
into the eventual green thread that manages all frames and cross-frame
events. Eventually, there will be no exceptions created or thrown for
any of the above events.

Patch 2: make parsing from within a block correctly parse variables

This patch is the same as before...it modifies the ParserSupport class
to understand when the parser is being started from within a block,
rather than from a non-block scoping. This causes immediate variables
to be parsed correctly as DVars rather than LVars, fixing an issue
that came up during Rails testing.

--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com

Attachment: eliminate_throws_in_eval_part1.patch
Description: Binary data

Attachment: runtime_parse_block_scoping.patch
Description: Binary data

Reply via email to