Skip to content

Incomplete implementation of explicit-drop #326

Closed
@sunfishcode

Description

@sunfishcode

As stated in #694, the intention of the explicit-drop rules is that:

Values can no longer be discarded implicitly.

The stack branch of ml-proto currently accepts this:

(module
  (func
    block $end
      i32.const 0
      br 0 1
    end
  )
)

The current design states:

In all constructs containing block-like sequences of expressions, all expressions but the last must not yield a value.

This is using pre-stack-machine terminology, but in those terms, the example above shows a code sequence in which an expression appears in a block-like sequence of expressions, is not the last expression in the block, and yet does yield a value.

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