These ideas sound good to me, Sam, but shall we fix the immediate
problem before getting into them?

There are only two places I'd quibble with your suggestions:

1. The current patch intentionally avoids rewriting things like foo()()
and (new Foo())().  Your proposal #1 is to rewrite in such cases, but
how can we be sure it's safe?  I started to follow your proposal #1
until I thought about such cases; then I decided to avoid rewriting of
all invokees.

2. The stack emulator includes an ad hoc list of node types that it
calls record() on.  I don't know the rationale, but if we are going to
be picky, it seems entirely reasonable to include array access
expressions but not name refs.

It SGTM to drop visit(JsNameRef) and to have JsForIn turn on lvalue-ness
in the case you describe.  However, someone would need to test that
everything still works when those changes are made....

http://gwt-code-reviews.appspot.com/132815
-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to