• Clemens Hammacher's avatar
    [wasm] Fix detection of unreachable code · 912cd314
    Clemens Hammacher authored
    The current Control::unreachable flag served two things at the same
    time: It tracked whether the label of that block is reachable (anyone
    jumps / falls through to there), and it tracked whether that block was
    ended by an unconditional branch or something similar.
    
    It turns out that these two things cannot be tracked with a single
    boolean per control struct. This CL introduces a Merge::reached flag,
    which tracks whether a merge point was reached so far.
    Also, the boolean flag to track unreachability of instructions within a
    block is extended to track implicitly unreachable instructions.
    According to the spec, a new block inside of unreachable code must be
    validated as reachable code again, and also code after a block which
    never returns has to be validated. It's not needed to generate code for
    such instructions, however.
    This new state will be particularly needed for the baseline compiler.
    
    A follow-up CL will avoid calling interface methods for unreachable
    code.
    
    R=titzer@chromium.org
    
    Bug: v8:6600
    Change-Id: I54c97a19121eace65e25c448639330d06f61b1c8
    Reviewed-on: https://chromium-review.googlesource.com/715637
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarAndreas Rossberg <rossberg@chromium.org>
    Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48509}
    912cd314
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...
.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...