Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 01:19
· 85 commits to master since this release

Layer 20: the module read back

The file now runs the WebAssembly it emits. Layer 19 needed none of LEB128
decoding, structured control flow or the validation rules; this needs all
three, and is a decoder for the binary format plus an interpreter for the
instructions layer 19 emits and no others, which are refused rather than
guessed at.

A body is flattened once into opcode and immediate pairs, and the same pass
pairs every structured instruction with its else and its end. Wasm names a
branch target by how many structures to leave rather than by where to land,
so recovering the landing places once is what leaves the branch itself
cheap.

A branch to a loop lands on the loop instruction and not after it, so that
leaving the structure and entering it again are one act. The other way
round costs nothing visible at first: the control stack merely drifts, and
what eventually fails is some later branch of depth one landing a structure
short.

--selftest is five tiers on a machine with nothing installed, --fuzz is
eleven, and --run-wasm PATH runs a module with no engine at all. The wasm
tier had needed an engine to be checked; it no longer needs anything.

Full Changelog: v0.11.0...v0.12.0

LOC: 12677