https://codereview.chromium.org/1127063003/diff/280001/src/scopes.cc
File src/scopes.cc (right):

https://codereview.chromium.org/1127063003/diff/280001/src/scopes.cc#newcode1442
src/scopes.cc:1442: var = variables_.Lookup(var->raw_name());
On 2015/05/26 20:24:44, caitp wrote:
On 2015/05/26 20:03:20, adamk wrote:
> On 2015/05/26 17:14:07, caitp wrote:
> > This is a hack to make sure the re-declared variables are properly
context
> > allocated. It's finicky, and I don't think it's quite right, but
I'm not
100%
> > sure how to verify it.
> >
> > So this is really the area I'm most unsure about atm
>
> Can we just skip the loop over params_ in AllocateParameterLocals()
if
> has_parameter_expressions_ is set? It seems like all the Variables
in there
are
> bogus at this point if that bit is set (since they got
"undeclared").

Maybe, but there are a few things that might go wrong

- The redeclared variable might need to be context allocated, which
probably
won't happen without this check
- Stack and heap slot counts need to be what they're expected to be so
that
scopeinfo ends up usable and sane

I'll try that after the next PS and see if it works reasonably well

Actually, it passes tests at the moment, so I guess this is fine

https://codereview.chromium.org/1127063003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to