Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion document/core/binary/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ All basic :ref:`indices <syntax-index>` are encoded with their respective value.

$${grammar: {
Btypeidx Bfuncidx Btableidx Bmemidx Bglobalidx Btagidx Belemidx Bdataidx
Blocalidx Blabelidx
Blocalidx Bfieldidx Blabelidx
}}

:ref:`External indices <syntax-externidx>` are encoded by a distiguishing byte followed by an encoding of their respective value.
Expand Down
4 changes: 2 additions & 2 deletions specification/wasm-3.0/1.3-syntax.instructions.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ syntax instr/i31 hint(desc "scalar reference instruction") = ...
syntax instr/struct hint(desc "structure reference instruction") = ...
| STRUCT.NEW typeidx
| STRUCT.NEW_DEFAULT typeidx
| STRUCT.GET sx? typeidx u32 hint(show STRUCT.GET#_#% % %)
| STRUCT.SET typeidx u32
| STRUCT.GET sx? typeidx fieldidx hint(show STRUCT.GET#_#% % %)
| STRUCT.SET typeidx fieldidx
| ...

syntax instr/array hint(desc "array reference instruction") = ...
Expand Down
1 change: 1 addition & 0 deletions specification/wasm-3.0/5.1-binary.values.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ grammar Bfuncidx : funcidx = x:Bu32 => x
grammar Bdataidx : dataidx = x:Bu32 => x
grammar Belemidx : elemidx = x:Bu32 => x
grammar Blocalidx : localidx = x:Bu32 => x
grammar Bfieldidx : fieldidx = x:Bu32 => x
grammar Blabelidx : labelidx = l:Bu32 => l

grammar Bexternidx : externidx =
Expand Down
8 changes: 4 additions & 4 deletions specification/wasm-3.0/5.3-binary.instructions.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ grammar Binstr/ref : instr = ...
grammar Binstr/struct : instr = ...
| 0xFB 0:Bu32 x:Btypeidx => STRUCT.NEW x
| 0xFB 1:Bu32 x:Btypeidx => STRUCT.NEW_DEFAULT x
| 0xFB 2:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET x i
| 0xFB 3:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET S x i
| 0xFB 4:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET U x i
| 0xFB 5:Bu32 x:Btypeidx i:Bu32 => STRUCT.SET x i
| 0xFB 2:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET x i
| 0xFB 3:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET S x i
| 0xFB 4:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET U x i
| 0xFB 5:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.SET x i
| ...

grammar Binstr/array : instr = ...
Expand Down
4 changes: 2 additions & 2 deletions specification/wasm-latest/1.3-syntax.instructions.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ syntax instr/i31 hint(desc "scalar reference instruction") = ...
syntax instr/struct hint(desc "structure reference instruction") = ...
| STRUCT.NEW typeidx
| STRUCT.NEW_DEFAULT typeidx
| STRUCT.GET sx? typeidx u32 hint(show STRUCT.GET#_#% % %)
| STRUCT.SET typeidx u32
| STRUCT.GET sx? typeidx fieldidx hint(show STRUCT.GET#_#% % %)
| STRUCT.SET typeidx fieldidx
| ...

syntax instr/array hint(desc "array reference instruction") = ...
Expand Down
1 change: 1 addition & 0 deletions specification/wasm-latest/5.1-binary.values.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ grammar Bfuncidx : funcidx = x:Bu32 => x
grammar Bdataidx : dataidx = x:Bu32 => x
grammar Belemidx : elemidx = x:Bu32 => x
grammar Blocalidx : localidx = x:Bu32 => x
grammar Bfieldidx : fieldidx = x:Bu32 => x
grammar Blabelidx : labelidx = l:Bu32 => l

grammar Bexternidx : externidx =
Expand Down
8 changes: 4 additions & 4 deletions specification/wasm-latest/5.3-binary.instructions.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ grammar Binstr/ref : instr = ...
grammar Binstr/struct : instr = ...
| 0xFB 0:Bu32 x:Btypeidx => STRUCT.NEW x
| 0xFB 1:Bu32 x:Btypeidx => STRUCT.NEW_DEFAULT x
| 0xFB 2:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET x i
| 0xFB 3:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET S x i
| 0xFB 4:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET U x i
| 0xFB 5:Bu32 x:Btypeidx i:Bu32 => STRUCT.SET x i
| 0xFB 2:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET x i
| 0xFB 3:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET S x i
| 0xFB 4:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET U x i
| 0xFB 5:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.SET x i
| ...

grammar Binstr/array : instr = ...
Expand Down
Loading
Loading