Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

v8: fix let bindings in for loops #23948

Closed
wants to merge 2 commits into from

Commits on Apr 30, 2015

  1. v8: fix issue with let bindings in for loops

    Backport b17eaaa5755e625493c5fe537f42b58838923c52 from upstream v8.
    
    Original commit message:
      Fix desugaring of let bindings in for loops to handle continue properly
    
      This requires putting the original loop's body inside an inner for loop (with
      the same labels as the original loop) and re-binding the temp variables in its
      "next" expression. A second flag is added to the desugared code to ensure the
      loop body executes at most once per loop.
    
      BUG=v8:3683
      LOG=y
    
      Review URL: https://codereview.chromium.org/720863002
    
      Cr-Commit-Position: refs/heads/master@{nodejs#25363}
    
    Fixes nodejs#9113 and nodejs#14411.
    ajklein authored and Julien Gilli committed Apr 30, 2015
    Configuration menu
    Copy the full SHA
    cb8c45f View commit details
    Browse the repository at this point in the history
  2. test: add test for let bindings in for loops

    0724602 floats a patch on V8 that fixes
    issue nodejs#9113 that would cause let bindings and continue statements in for
    loops to not work properly.
    
    This change adds a regression test that fails if that patch is not
    properly floated, thus preventing us from not floating that patch after
    future V8 upgrades.
    Julien Gilli committed Apr 30, 2015
    Configuration menu
    Copy the full SHA
    8d1baac View commit details
    Browse the repository at this point in the history