• Leszek Swirski's avatar
    Reland "[ignition] Skip binding dead labels" · c7ebc581
    Leszek Swirski authored
    This is a reland of 35269f77
    
    Switches on an expression that unconditionally throws would have all their
    case statements dead, causing a DCHECK error in the SwitchBuilder. This
    fixes up the DCHECK to allow dead labels.
    
    Original change's description:
    > [ignition] Skip binding dead labels
    >
    > 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: Ross McIlroy <rmcilroy@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#59942}
    
    TBR=rmcilroy@chromium.org
    
    Bug: chromium:934166
    Change-Id: If6eab4162106717ce64a2dc477000c6a76354cb4
    Reviewed-on: https://chromium-review.googlesource.com/c/1494535Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59948}
    c7ebc581
Name
Last commit
Last update
..
OWNERS Loading commit data...
block-coverage-builder.h Loading commit data...
bytecode-array-accessor.cc Loading commit data...
bytecode-array-accessor.h Loading commit data...
bytecode-array-builder.cc Loading commit data...
bytecode-array-builder.h Loading commit data...
bytecode-array-iterator.cc Loading commit data...
bytecode-array-iterator.h Loading commit data...
bytecode-array-random-iterator.cc Loading commit data...
bytecode-array-random-iterator.h Loading commit data...
bytecode-array-writer.cc Loading commit data...
bytecode-array-writer.h Loading commit data...
bytecode-decoder.cc Loading commit data...
bytecode-decoder.h Loading commit data...
bytecode-flags.cc Loading commit data...
bytecode-flags.h Loading commit data...
bytecode-generator.cc Loading commit data...
bytecode-generator.h Loading commit data...
bytecode-jump-table.h Loading commit data...
bytecode-label.cc Loading commit data...
bytecode-label.h Loading commit data...
bytecode-node.cc Loading commit data...
bytecode-node.h Loading commit data...
bytecode-operands.cc Loading commit data...
bytecode-operands.h Loading commit data...
bytecode-register-allocator.h Loading commit data...
bytecode-register-optimizer.cc Loading commit data...
bytecode-register-optimizer.h Loading commit data...
bytecode-register.cc Loading commit data...
bytecode-register.h Loading commit data...
bytecode-source-info.cc Loading commit data...
bytecode-source-info.h Loading commit data...
bytecode-traits.h Loading commit data...
bytecodes.cc Loading commit data...
bytecodes.h Loading commit data...
constant-array-builder.cc Loading commit data...
constant-array-builder.h Loading commit data...
control-flow-builders.cc Loading commit data...
control-flow-builders.h Loading commit data...
handler-table-builder.cc Loading commit data...
handler-table-builder.h Loading commit data...
interpreter-assembler.cc Loading commit data...
interpreter-assembler.h Loading commit data...
interpreter-generator.cc Loading commit data...
interpreter-generator.h Loading commit data...
interpreter-intrinsics-generator.cc Loading commit data...
interpreter-intrinsics-generator.h Loading commit data...
interpreter-intrinsics.cc Loading commit data...
interpreter-intrinsics.h Loading commit data...
interpreter.cc Loading commit data...
interpreter.h Loading commit data...