• littledan's avatar
    Fix legacy const for-of/in destructuring · 38465598
    littledan authored
    Previously, using legacy const in for-of/in loops led to a check-fail
    in the parser. This was due to the fact that the destructuring bind
    led to an undefined initialization to undefined in the parser, which
    caused the for loop code to go down a strange path. This patch
    eliminates the undefined initialization in variables declared in
    for-in/of loops, so that that path is not used and the error is
    fixed.
    
    BUG=v8:4461
    LOG=Y
    R=adamk
    
    Review URL: https://codereview.chromium.org/1385913003
    
    Cr-Commit-Position: refs/heads/master@{#31117}
    38465598
pattern-rewriter.cc 16.1 KB