> I don't understand why two passes are necessary. I would simply make the
> parser track the maximum number of live block scoped variables. Then at the
> end of parsing you know the maximum number of stack slots needed to hold live
> block scoped vars at once.
One potential design for this:
- Parser tracks a stack of "block scopes"
- When the parser encounters a "let" statement:
assert that "block scopes" is not empty or else parse error
add 1 to the top entry in "block scopes"
Would this satisfy your needs?
Geoff
_______________________________________________
squirrelfish-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev