• nikolaos's avatar
    [parser] Fix tail calls in for in/of loops · d5dcce33
    nikolaos authored
    According to the ES6 specification, in "for in/of" loops like:
    
       for (var v of [1,2,3]) return f(...);
    
    the call to f() should not be considered a tail call.  This was
    not working properly, i.e., the case without declarations:
    
       var v;
       for (v of [1,2,3]) return f(...);
    
    R=adamk@chromium.org, ishell@chromium.org
    BUG=
    LOG=N
    
    Review-Url: https://codereview.chromium.org/2343823002
    Cr-Commit-Position: refs/heads/master@{#39497}
    d5dcce33
tail-call.js 13.2 KB