DescriptionEnsure scopes are backed by blocks in the body of for loops
Clusterfuzz testing discovered that sloppy-mode block-scoped function
declarations introduce lexically-scoped variables in scopes that were
thrown away under the expectation that no lexically-scoped variables
were introduced. These cases are:
for (;;) function foo() {}
for (x in y) function foo() {}
This patch ensures that a block is created in those cases to hold the
lexically scoped variable. Usually, scope analysis should discover that
that block is not important, and it should not have a runtime
representation.
BUG=chromium:536750, chromium:536751
LOG=Y
R=adamk
Committed: https://crrev.com/2d4085622a46a700779a2e251caae8a1833c34a6
Cr-Commit-Position: refs/heads/master@{#31109}
Patch Set 1 #Patch Set 2 : tests #
Messages
Total messages: 13 (5 generated)
|