Description[es6] allow any LeftHandSideExpression in for-of loops
Fix an earlier regression which forbid non-VariableProxy LHS from being
used in for-of loops. Like for-in loops, the spec allows any LHS to be used,
with the sole exception that ObjectLiterals and ArrayLiterals must be valid
AssignmentPatterns.
Also fixes a bug in TurboFan which resulted in incorrectly replacing a variable load with a constant value in some instances, due to the AstLoopAssignmentAnalyzer failing to record the assignment to ForOfStatement's value.
BUG=v8:4418, v8:2720
LOG=N
R=wingo@igalia.com, littledan@chromium.org, adamk@chromium.org, bmeurer@chromium.org
Committed: https://crrev.com/096125deaafe50c2c82cbf795dd9eee5264cbbf7
Cr-Commit-Position: refs/heads/master@{#31816}
Patch Set 1 #Patch Set 2 : Remove unneeded var from test (also rebased, woops) #Patch Set 3 : Fix bug in loop-assignment-analyzer which resulted in incorrect code #
Messages
Total messages: 32 (13 generated)
|