Skip to main content

Module word

Module word 

Source
Expand description

The CPU’s raw word representation and its typed bit conversions.

Functions§

decode_bool
Decodes a boolean word. Zero is false and every nonzero word is true.
decode_f32
Decodes an f32 from its IEEE-754 representation in the low 32 bits.
decode_f64
Decodes an f64 from its IEEE-754 representation.
decode_function_ref
Decodes a numeric function reference.
decode_heap_ref
Decodes a numeric heap reference.
decode_i32
Decodes an i32 from the low 32 bits of a word.
decode_i64
Decodes an i64 without changing its bit pattern.
decode_string_id
Decodes an interned string identifier.
decode_u32
Decodes a u32 from the low 32 bits of a word.
decode_u64
Decodes a u64 without changing its bit pattern.
encode_bool
Encodes a boolean as its canonical word representation, 0 or 1.
encode_f32
Encodes an f32 using its IEEE-754 representation in the low 32 bits.
encode_f64
Encodes an f64 using its IEEE-754 representation.
encode_function_ref
Encodes a numeric function reference.
encode_heap_ref
Encodes a numeric heap reference.
encode_i32
Encodes an i32 in the low 32 bits of a word.
encode_i64
Encodes an i64 without changing its bit pattern.
encode_string_id
Encodes an interned string identifier.
encode_u32
Encodes a u32 in the low 32 bits of a word.
encode_u64
Encodes a u64 without changing its bit pattern.

Type Aliases§

Word
The value stored by the word-based CPU.