• Leszek Swirski's avatar
    [ignition] Skip binding dead labels · 35269f77
    Leszek Swirski authored
    BytecodeLabels for forward jumps may create a dead basic block if their
    corresponding jump was elided (due to it dead code elimination). We can
    avoid generating such dead basic blocks by skipping the label bind when
    no corresponding jump has been observed. This works because all jumps
    except JumpLoop are forward jumps, so we only have to special case one
    Bind for loop headers to bind unconditionally.
    
    Since Binds are now conditional on a jump existing, we can no longer rely
    on using Bind to get the current offset (e.g. at the beginning of a try
    block). Instead, we now expose the current offset in the bytecode array
    writer. Conveniently, this means that we can be a bit smarter about basic
    blocks around these statements.
    
    As a drive-by, remove the unused Bind(target,label) function.
    
    Bug: chromium:934166
    Change-Id: I532aa452fb083560d07b90da99caca0b1d082aa3
    Reviewed-on: https://chromium-review.googlesource.com/c/1488763
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59942}
    35269f77
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni 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...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes 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...
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...