Skip to content

Return arity not checked #319

@sunfishcode

Description

@sunfishcode

On the stack branch, the following code is accepted:

  (func $bar
     i32.const 0
     return
  )

however the following code is rejected:

  (func $bar
     i32.const 0
     br 1 0
  )

This makes return not interchangeable with a branch to the control-stack top. And, it's inconsistent with the spirit of the explicit-drop change, wherein excess values are not permitted to be left on the stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions