@@ -327,36 +327,36 @@ It decodes into a vector of :ref:`element segments <syntax-elem>` that represent
327
327
\production {element section} & \Belemsec &::=&
328
328
\X {seg}^\ast {:}\Bsection _9 (\Bvec (\Belem )) &\Rightarrow & \X {seg} \\
329
329
\production {element segment} & \Belem &::=&
330
- \hex { 00 } ~~e{:}\Bexpr ~~y^\ast {:}\Bvec (\Bfuncidx )
330
+ 0 {:}\Bu 32 ~~e{:}\Bexpr ~~y^\ast {:}\Bvec (\Bfuncidx )
331
331
&\Rightarrow & \\&&&\quad
332
332
\{ \ETYPE ~\FUNCREF , \EINIT ~((\REFFUNC ~y)~\END )^\ast , \EMODE ~\EACTIVE ~\{ \ETABLE ~0 , \EOFFSET ~e \} \} \\ &&|&
333
- \hex { 01 } ~~\X {et}:\Belemkind ~~y^\ast {:}\Bvec (\Bfuncidx )
333
+ 1 {:}\Bu 32 ~~\X {et}:\Belemkind ~~y^\ast {:}\Bvec (\Bfuncidx )
334
334
&\Rightarrow & \\&&&\quad
335
335
\{ \ETYPE ~\X {et}, \EINIT ~((\REFFUNC ~y)~\END )^\ast , \EMODE ~\EPASSIVE \} \\ &&|&
336
- \hex { 02 } ~~x{:}\Btableidx ~~e{:}\Bexpr ~~\X {et}:\Belemkind ~~y^\ast {:}\Bvec (\Bfuncidx )
336
+ 2 {:}\Bu 32 ~~x{:}\Btableidx ~~e{:}\Bexpr ~~\X {et}:\Belemkind ~~y^\ast {:}\Bvec (\Bfuncidx )
337
337
&\Rightarrow & \\&&&\quad
338
338
\{ \ETYPE ~\X {et}, \EINIT ~((\REFFUNC ~y)~\END )^\ast , \EMODE ~\EACTIVE ~\{ \ETABLE ~x, \EOFFSET ~e \} \} \\ &&|&
339
- \hex { 03 } ~~\X {et}:\Belemkind ~~y^\ast {:}\Bvec (\Bfuncidx )
339
+ 3 {:}\Bu 32 ~~\X {et}:\Belemkind ~~y^\ast {:}\Bvec (\Bfuncidx )
340
340
&\Rightarrow & \\&&&\quad
341
341
\{ \ETYPE ~\X {et}, \EINIT ~((\REFFUNC ~y)~\END )^\ast , \EMODE ~\EDECLARATIVE \} \\ &&|&
342
- \hex { 04 } ~~e{:}\Bexpr ~~\X {el}^\ast {:}\Bvec (\Bexpr )
342
+ 4 {:}\Bu 32 ~~e{:}\Bexpr ~~\X {el}^\ast {:}\Bvec (\Bexpr )
343
343
&\Rightarrow & \\&&&\quad
344
344
\{ \ETYPE ~\FUNCREF , \EINIT ~\X {el}^\ast , \EMODE ~\EACTIVE ~\{ \ETABLE ~0 , \EOFFSET ~e \} \} \\ &&|&
345
- \hex { 05 } ~~\X {et}:\Breftype ~~\X {el}^\ast {:}\Bvec (\Bexpr )
345
+ 5 {:}\Bu 32 ~~\X {et}:\Breftype ~~\X {el}^\ast {:}\Bvec (\Bexpr )
346
346
&\Rightarrow & \\&&&\quad
347
347
\{ \ETYPE ~et, \EINIT ~\X {el}^\ast , \EMODE ~\EPASSIVE \} \\ &&|&
348
- \hex { 06 } ~~x{:}\Btableidx ~~e{:}\Bexpr ~~\X {et}:\Breftype ~~\X {el}^\ast {:}\Bvec (\Bexpr )
348
+ 6 {:}\Bu 32 ~~x{:}\Btableidx ~~e{:}\Bexpr ~~\X {et}:\Breftype ~~\X {el}^\ast {:}\Bvec (\Bexpr )
349
349
&\Rightarrow & \\&&&\quad
350
350
\{ \ETYPE ~et, \EINIT ~\X {el}^\ast , \EMODE ~\EACTIVE ~\{ \ETABLE ~x, \EOFFSET ~e \} \} \\ &&|&
351
- \hex { 07 } ~~\X {et}:\Breftype ~~\X {el}^\ast {:}\Bvec (\Bexpr )
351
+ 7 {:}\Bu 32 ~~\X {et}:\Breftype ~~\X {el}^\ast {:}\Bvec (\Bexpr )
352
352
&\Rightarrow & \\&&&\quad
353
353
\{ \ETYPE ~et, \EINIT ~\X {el}^\ast , \EMODE ~\EDECLARATIVE \} \\
354
354
\production {element kind} & \Belemkind &::=&
355
355
\hex {00 } &\Rightarrow & \FUNCREF \\
356
356
\end {array}
357
357
358
358
.. note ::
359
- The initial byte can be interpreted as a bitfield.
359
+ The initial integer can be interpreted as a bitfield.
360
360
Bit 0 indicates a passive or declarative segment,
361
361
bit 1 indicates the presence of an explicit table index for an active segment and otherwise distinguishes passive from declarative segments,
362
362
bit 2 indicates the use of element type and element :ref: `expressions <binary-expr >` instead of element kind and element indices.
@@ -440,16 +440,16 @@ It decodes into a vector of :ref:`data segments <syntax-data>` that represent th
440
440
\production {data section} & \Bdatasec &::=&
441
441
\X {seg}^\ast {:}\Bsection _{11 }(\Bvec (\Bdata )) &\Rightarrow & \X {seg} \\
442
442
\production {data segment} & \Bdata &::=&
443
- \hex { 00 } ~~e{:}\Bexpr ~~b^\ast {:}\Bvec (\Bbyte )
443
+ 0 {:}\Bu 32 ~~e{:}\Bexpr ~~b^\ast {:}\Bvec (\Bbyte )
444
444
&\Rightarrow & \{ \DINIT ~b^\ast , \DMODE ~\DACTIVE ~\{ \DMEM ~0 , \DOFFSET ~e \} \} \\ &&|&
445
- \hex { 01 } ~~b^\ast {:}\Bvec (\Bbyte )
445
+ 1 {:}\Bu 32 ~~b^\ast {:}\Bvec (\Bbyte )
446
446
&\Rightarrow & \{ \DINIT ~b^\ast , \DMODE ~\DPASSIVE \} \\ &&|&
447
- \hex { 02 } ~~x{:}\Bmemidx ~~e{:}\Bexpr ~~b^\ast {:}\Bvec (\Bbyte )
447
+ 2 {:}\Bu 32 ~~x{:}\Bmemidx ~~e{:}\Bexpr ~~b^\ast {:}\Bvec (\Bbyte )
448
448
&\Rightarrow & \{ \DINIT ~b^\ast , \DMODE ~\DACTIVE ~\{ \DMEM ~x, \DOFFSET ~e \} \} \\
449
449
\end {array}
450
450
451
451
.. note ::
452
- The initial byte can be interpreted as a bitfield.
452
+ The initial integer can be interpreted as a bitfield.
453
453
Bit 0 indicates a passive segment,
454
454
bit 1 indicates the presence of an explicit memory index for an active segment.
455
455
0 commit comments