This patch took me hours to absorb. It sounds simple to modify the
compiler to emulate stacks, but understanding precisely where the stack
updates need to happen is difficult!
The implementation is very clean. There are just two nits in the
comments.
The line number recording looks like it
http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):
http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode174
Line 174: * exitingEarly $stackDepeth = stackIndex - 1;
There's a typo here: stackDep_e_th
On 2009/07/22
I don't think getting this thing wrapped up will take too much more
work.
http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):
http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode132
Line 132: // $stack[$stackDepth =
http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):
http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
Oh, right, the pop for a return has to be placed in the enclosing
finally, and it
Ready for another look. Major changes:
- No special handling for throw statements.
- Force all try/finally to be try/catch/finally to ensure that a
caught JavaScriptException would have the correct stack data as well as
code running in the finally block.
- Locations always record when
LGTM.
http://gwt-code-reviews.appspot.com/47816/diff/3008/1037
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):
http://gwt-code-reviews.appspot.com/47816/diff/3008/1037#newcode68
Line 68: private class Bootstrap extends JsVisitor {
Bootstrap took me a few minutes to figure
Ping.
http://gwt-code-reviews.appspot.com/47816
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---
On Mon, Jul 20, 2009 at 9:20 AM, b...@google.com wrote:
http://gwt-code-reviews.appspot.com/47816
I'll review it.
Man, what a great talking point this is going to be. Because GWT has
a compiler, we get to do fine-grained rewrites like this one.
Lex