Move the default block to the front of the underlying jump table storage (#5770)

The new api on JumpTableData makese it easy to keep the default label first, and that shrinks the diff in #5731 a bit.
This commit is contained in:
Trevor Elliott
2023-02-13 12:50:29 -08:00
committed by GitHub
parent 6cddc923f3
commit 19f337e29b
8 changed files with 26 additions and 28 deletions

View File

@@ -220,7 +220,7 @@ impl Switch {
"Jump tables bigger than 2^32-1 are not yet supported"
);
let jt_data = JumpTableData::new(otherwise, Vec::from(blocks));
let jt_data = JumpTableData::new(otherwise, blocks);
let jump_table = bx.create_jump_table(jt_data);
let discr = if first_index == 0 {