Skip to content

s2wasm has incorrect tableswitch output #70

@binji

Description

@binji

s2wasm outputs tableswitch using blocks instead of cases, see switch-1.c.wast in torture-tests:

                (block $BB1_13
                  (block $BB1_12
                    (block $BB1_11
                      (block $BB1_9
                        (block $BB1_7
                          (block $BB1_5
                            (tableswitch 
                              (get_local $$2)
                              (table (case $BB1_5) (case $BB1_14) (case $BB1_7) (case $BB1_14) (case $BB1_14) (case $BB1_9) (case $BB1_14) (case $BB1_11)) (case $BB1_5)
                            )
                          )
...

It looks like this may be changed soon in the spec repo, so maybe it's not worth fixing here, however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions