Skip to content

Toolchain roundtrip differs from original input #641

Closed
@ddcc

Description

@ddcc

When I run a small C program through s2wasm, it generates a main function with implicit type:

(func $main (param $0 i32) (param $1 i32) (result i32)

However, when I run this output through wasm-as and wasm-dis, the implicit type has become explicit:

(type $1 (func (param i32 i32) (result i32)))
(func $main (type $1) (param $var$0 i32) (param $var$1 i32) (result i32)

Is this behavior intentional? If so, why are we doing this, instead of requiring all non-indirect functions to have implicit or explicit type?

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