Description[es6] Implement for-of iterator finalization
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
Committed: https://crrev.com/cb1bf4af3c961093e9a75a22089f78daf7959304
Cr-Commit-Position: refs/heads/master@{#34111}
Patch Set 1 #Patch Set 2 : Final version #Patch Set 3 : Remove some debug left-overs #
Total comments: 23
Patch Set 4 : Fixed bug, addressed comments #Patch Set 5 : Epsilon #
Total comments: 3
Patch Set 6 : Remove double empty lines #Patch Set 7 : Disable iterator test for Ignition #
Messages
Total messages: 26 (12 generated)
|