• Caitlin Potter's avatar
    [esnext] load `iterator.next` only once at beginning of iteration · bf4cc9ee
    Caitlin Potter authored
    https://github.com/tc39/ecma262/pull/988 gained concensus during the
    september 2017 TC39 meetings. This moves the load of the "next" method
    to the very beginning of the iteration protocol, rather than during
    each iteration step.
    
    This impacts:
    
    - yield*
    - for-of loops
    - spread arguments
    - array spreads
    
    In the v8 implementation, this also affects async iteration versions of
    these things (the sole exception being the Async-From-Sync iterator,
    which requires a few more changes to work with this, likely done in a
    followup patch).
    
    This change introduces a new AST node, ResolvedProperty, which can be used
    as a callee by Call nodes to produce the same bytecode as Property calls,
    without observably re-loading the property. This is used in several
    AST-desugarings involving the iteration protocol.
    
    BUG=v8:6861, v8:5699
    R=rmcilroy@chromium.org, neis@chromium.org, adamk@chromium.org
    
    Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
    Change-Id: Ib81106a0182687fc5efea0bc32302ad06376773b
    Reviewed-on: https://chromium-review.googlesource.com/687997
    Commit-Queue: Caitlin Potter <caitp@igalia.com>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#50452}
    bf4cc9ee
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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 Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm 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...
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...