Skip to content

Reword 6.6.5.1. Function Abbreviations to be more specific about impact #1418

@codefromthecrypt

Description

@codefromthecrypt

The WebAssembly 1.0 (MVP) and 1.1 draft both allow repetition and co-mingling of inlined/abbreviated function import and exports.

Screen Shot 2022-02-07 at 8 42 33 AM

The wording "The latter abbreviation can be applied repeatedly, with “…” containing another import or export." is more wide than necessary. The only possible grammar seems (export)* (import)? because the "import", if present, must be present at the end.

For example, the valid combinations besides no inlined import/export

  • only import -> this means the func cannot have a body or locals, it is effectively a different way of writing import func
  • N exports -> this is a module-defined func where N exports point to the current position in the index namespace
  • N exports then import -> this is an imported function re-exported N times

To figure these points out from the spec requires too much thinking, so I think the section can be worded, ya?

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