• rossberg's avatar
    [es6] Implement for-of iterator finalization · cb1bf4af
    rossberg authored
    Implements iterator finalisation by desugaring for-of loops with an additional try-finally wrapper. See comment in parser.cc for details.
    
    Also improved some AST printing facilities while there.
    
    @Ross, I had to disable the bytecode generation test for for-of, because it got completely out of hand after this change (the new bytecode has 150+ lines). See the TODO that I assigned to you.
    
    Patch set 1 is WIP patch by Georg (http://crrev.com/1695583003), patch set 2 relative changes.
    
    @Georg, FYI, I changed the following:
    
    - Moved try-finally out of the loop body, for performance, and in order to be able to handle `continue` correctly.
    - Fixed scope management in ParseForStatement, which was the cause for the variable allocation failure.
    - Fixed pre-existing zone initialisation bug in rewriter, which caused the crashes.
    - Enabled all tests, adjusted a few others, added a couple more.
    
    BUG=v8:2214
    LOG=Y
    
    Review URL: https://codereview.chromium.org/1695393003
    
    Cr-Commit-Position: refs/heads/master@{#34111}
    cb1bf4af
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...