Skip to content

Commit 9d3d01e

Browse files
committed
metadata.code: rename type->format
1 parent a7fc5bb commit 9d3d01e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

document/metadata/code/binary.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Binary Format
88
Code Metadata
99
-------------
1010

11-
All code metadata items of a given type *T* are grouped under a custom section
11+
All code metadata items of a given format *T* are grouped under a custom section
1212
named *'metadata.code.T'*.
1313
The following parametrized grammar rules define the generic structure of a code metadata
14-
section of type *T*.
14+
section of format *T*.
1515

1616
.. math::
1717
\begin{array}{llcll}
@@ -28,7 +28,7 @@ section of type *T*.
2828
\end{array}
2929
.. index:: ! code metadata section
3030

31-
Where *funcpos* is the byte offset of the annotation starting from the beginning of the function body, and *data* is a further payload, whose content depends on the type *T*.
31+
Where *funcpos* is the byte offset of the annotation starting from the beginning of the function body, and *data* is a further payload, whose content depends on the format *T*.
3232

3333
*code metadata function* entries must appear in order of increasing *function id*, and duplicate id values are not allowed. *code metadata item* entries must appear in order of increasing *instruction offset*, and duplicate offset values are not allowed.
3434

@@ -37,7 +37,7 @@ Where *funcpos* is the byte offset of the annotation starting from the beginning
3737
Branch Hints
3838
~~~~~~~~~~~~
3939

40-
A Branch Hint is code metadata item with type *branch_hint*.
40+
A Branch Hint is code metadata item with format *branch_hint*.
4141
All branch hints for a module are contained in a single code metadata section
4242
with name *'metadata.code.branch_hint'*.
4343

document/metadata/code/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Introduction
44
============
55

66
This document defines a generic mechanism for attaching arbitrary metadata to WebAssembly instructions.
7-
Additionally, it defines specific metadata types using this mechanism.
7+
Additionally, it defines specific metadata formats using this mechanism.
88

99
Such metadata do not contribute to, or otherwise affect, the WebAssembly semantics, and may be ignored by an implementation.
1010

document/metadata/code/syntax.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Code Metadata
88

99
A Code Metadata item is a piece of information logically attached to an instruction.
1010

11-
An item has a type and a paylod, whose format is defined by its type.
11+
An item is associated with a format, which defines the item's payload.
1212

1313
TODO: can this be expressed with the math notation?
1414

1515
Branch Hints
1616
~~~~~~~~~~~~
1717

18-
A Branch Hint is a type of Code Metadata that can be attached to `br_if` and `if` instructions.
18+
A Branch Hint is a Code Metadata format that can be attached to `br_if` and `if` instructions.
1919
Its payload indicates whether the branch is likely or unlikely to be taken.
2020

2121
TODO: math definition

document/metadata/code/text.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ attached to the first instruction that follows them.
1919
\end{array}
2020
.. index:: ! code metadata annotation
2121

22-
Where `T` is the type of the item, and `data` is a byte string containing the same
22+
Where `T` is the format of the item, and `data` is a byte string containing the same
2323
payload as in the binary format.
2424

0 commit comments

Comments
 (0)