Skip to content

Add option to show operand stack's types in disassembly #1381

Closed
@fitzgen

Description

@fitzgen

When debugging some fiddly wasm bits I often annotate the WAT disassembly with the types on the stack in between each instruction:

;; []
i32.const 32
;; [i32]
i32.const 10
;; [i32 i32]
i32.add
;; [i32]

Would be nice if we added a flag to wasm-tools print to do this automatically.

I guess wasmprinter can handle invalid Wasm at the moment, so we would have to maybe make this best effort or require valid input for when this is enabled or something.

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