Expand description
WebAssembly のバイナリ形式(MVP + 多値の結果・符号拡張・飽和変換・一括メモリ操作の一部)を読む。
関数の本体は生のバイト列のまま持ち、実行時に解釈する(exec.rs)。
読み込みの時点で、命令の即値の長さと入れ子(block/loop/if と end/else の対応)を確かめ、
各構造の else/end の位置を表にしておく(分岐の飛び先を探し直さないため)。
Structs§
- Data
- Decode
Error - 読み込みの失敗(
WebAssembly.CompileErrorの文言になる)。 - Elem
- 要素の区画(能動的なものだけ表へ書く。受動的・宣言的なものは持つだけ)。
- Export
- Func
- 定義された関数(取り込みは含まない)。
- Func
Type - Global
- Global
Type - Import
- Limits
- Module
- Reader 🔒
- Table
Type
Enums§
- Const
Expr - 定数式(グローバルの初期値・要素とデータの開始位置)。
- Export
Desc - Import
Desc - ValType
- 値の型。
Functions§
- decode
bytesを WebAssembly のモジュールとして読む。- decode_
elem 🔒 - decode_
func 🔒 - err 🔒
- scan_
blocks 🔒 - 命令列を 1 回なめて、即値の長さと入れ子を確かめ、block/loop/if の else/end の位置を集める。
- skip_
blocktype 🔒 - skip_
immediates 🔒 - validate_
indices 🔒
Type Aliases§
- R 🔒