[parsing] Produce same Scopes in Parser and PreParser when the params are not simple.
E.g., { function lazy_inner(b = somevar) { let somevar; } } If we don't produce the same scopes, PreParser thinks that the unresolved variable inside the default parameter resolves into the variable declared inside the function. Thus, it's not correctly recorded as a free variable. One part is already done by https://codereview.chromium.org/2638333002 . But at the laziness boundary, we still produced different scopes. Unlike previously thought, this is also needed for lazy inner function correctness, not only for "preparser scope analysis" (ie., skipping inner functions). BUG=v8:5938 Change-Id: I047cd43ef16478bb0f18d1f114845e7d1ab8c5f2 Reviewed-on: https://chromium-review.googlesource.com/439345 Commit-Queue: Marja Hölttä <marja@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#43044}
Showing
Please
register
or
sign in
to comment