Remove the concept of non-dense jump tables.
WebAssembly doesn't have non-dense jump tables, and higher-level users are better served by the facilities in lib/frontend/src/switch.rs for working with non-dense switches. This eliminates the concept of "absent" jump table entries, which were represented as "0" in the text format. Also, jump table contents are now enclosed in `[` and `]`, so that we can unambiguously display empty jump tables. Previously, empty jump tables were displayed as if they had a single absent entry.
This commit is contained in:
@@ -1405,7 +1405,7 @@ ebb0:
|
||||
|
||||
; Tests for i64 jump table instructions.
|
||||
function %I64_JT(i64 [%rdi]) {
|
||||
jt0 = jump_table ebb1, ebb2, ebb3
|
||||
jt0 = jump_table [ebb1, ebb2, ebb3]
|
||||
|
||||
ebb0(v0: i64 [%rdi]):
|
||||
; Note: The next two lines will need to change whenever instructions are
|
||||
|
||||
@@ -4,7 +4,7 @@ target x86_64
|
||||
|
||||
function u0:0(i64) system_v {
|
||||
ss0 = explicit_slot 1
|
||||
jt0 = jump_table ebb1
|
||||
jt0 = jump_table [ebb1]
|
||||
|
||||
ebb0(v0: i64):
|
||||
v1 = stack_addr.i64 ss0
|
||||
|
||||
Reference in New Issue
Block a user