Skip to content

[spec] Fix a bunch of minor issues#1338

Merged
rossberg merged 3 commits intomasterfrom
fixes2
Jun 28, 2021
Merged

[spec] Fix a bunch of minor issues#1338
rossberg merged 3 commits intomasterfrom
fixes2

Conversation

@rossberg
Copy link
Member

Discovered while working on WebAssembly/function-references#49.

@rossberg rossberg requested a review from conrad-watt June 24, 2021 18:58
Copy link
Contributor

@conrad-watt conrad-watt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM

some other references to "bit width" should be changed from syntax-valtype to syntax-numtype

one mention here (memory instructions):
https://webassembly.github.io/spec/core/syntax/instructions.html?highlight=bit%20width#memory-instructions

two mentions here (load and store)
https://webassembly.github.io/spec/core/exec/instructions.html?highlight=bit%20width#memory-instructions

In future versions of WebAssembly, value types may include types denoted by :ref:`type indices <syntax-typeidx>`.
Thus, the binary format for types corresponds to the encodings of small negative :math:`\xref{binary/values}{binary-sint}{\sN}` values, so that they can coexist with (positive) type indices in the future.
In some places, possible types include both type constructors or types denoted by :ref:`type indices <syntax-typeidx>`.
Thus, the binary format for most type constructors corresponds to the encodings of small negative :math:`\xref{binary/values}{binary-sint}{\sN}` values, such that they can unambiguously occur in the same place as (positive) type indices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"most type constructors" - is it possible for a type constructor to be represented by something other than a negative number?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed not, removed "most".

Copy link
Member Author

@rossberg rossberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks. Fixed, plus a couple more places where it should now be numtype. PTAL.

In future versions of WebAssembly, value types may include types denoted by :ref:`type indices <syntax-typeidx>`.
Thus, the binary format for types corresponds to the encodings of small negative :math:`\xref{binary/values}{binary-sint}{\sN}` values, so that they can coexist with (positive) type indices in the future.
In some places, possible types include both type constructors or types denoted by :ref:`type indices <syntax-typeidx>`.
Thus, the binary format for most type constructors corresponds to the encodings of small negative :math:`\xref{binary/values}{binary-sint}{\sN}` values, such that they can unambiguously occur in the same place as (positive) type indices.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed not, removed "most".

Copy link
Contributor

@conrad-watt conrad-watt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants