Skip to main content

Module polyfill_narrow

Module polyfill_narrow 

Source
Expand description

Polyfill edge adapters for the narrow cranelift scalar widths (u8/i8/u16/i16/f16) added by the full-cranelift type alignment (polydat/docs/design/type_system_alignment.md §8.1).

Each width mirrors its existing wider sibling’s adapter row in polyfill.rs exactly — same failure-mode split, same byte order, same panic diagnostics:

  • u8/u16 mirror u32 (zero-extend in Value::U64).
  • i8/i16 mirror i32 (sign-extend in Value::I64).
  • f16 mirrors f32 (bit pattern stuffed in Value::U64; widening to f32/f64 is exact, narrowing rounds).

Catalog registration lives in compile/assembly.rs::{auto_adapter, boundary_adapter} — the lossless widenings are class A (both catalogs), everything that can panic on range/parse/shape is class B (boundary only). Bytes serdes are little-endian; f16 ↔ Bytes is the 2-byte to_bits() pattern.

Structs§

BoolToF16
The __bool_to_f16 node.
BoolToI8
The __bool_to_i8 node.
BoolToI16
The __bool_to_i16 node.
BoolToU8
The __bool_to_u8 node.
BoolToU16
The __bool_to_u16 node.
BytesToF16
The __bytes_to_f16 node.
BytesToI8
The __bytes_to_i8 node.
BytesToI16
The __bytes_to_i16 node.
BytesToU8
The __bytes_to_u8 node.
BytesToU16
The __bytes_to_u16 node.
F16ToBool
The __f16_to_bool node.
F16ToBytes
The __f16_to_bytes node.
F16ToF32
The __f16_to_f32 node.
F16ToF64
The __f16_to_f64 node.
F16ToJson
The __f16_to_json node.
F16ToString
The __f16_to_string node.
F32ToF16
The __f32_to_f16 node.
F64ToF16
The __f64_to_f16 node.
F64ToI8
The __f64_to_i8 node.
F64ToI16
The __f64_to_i16 node.
F64ToU8
The __f64_to_u8 node.
F64ToU16
The __f64_to_u16 node.
I8ToBool
The __i8_to_bool node.
I8ToBytes
The __i8_to_bytes node.
I8ToF16
The __i8_to_f16 node.
I8ToF32
The __i8_to_f32 node.
I8ToF64
The __i8_to_f64 node.
I8ToI16
The __i8_to_i16 node.
I8ToI32
The __i8_to_i32 node.
I8ToI64
The __i8_to_i64 node.
I8ToJson
The __i8_to_json node.
I8ToString
The __i8_to_string node.
I16ToBool
The __i16_to_bool node.
I16ToBytes
The __i16_to_bytes node.
I16ToF32
The __i16_to_f32 node.
I16ToF64
The __i16_to_f64 node.
I16ToI32
The __i16_to_i32 node.
I16ToI64
The __i16_to_i64 node.
I16ToJson
The __i16_to_json node.
I16ToString
The __i16_to_string node.
I32ToI8
The __i32_to_i8 node.
I32ToI16
The __i32_to_i16 node.
I64ToI8
The __i64_to_i8 node.
I64ToI16
The __i64_to_i16 node.
I64ToU8
The __i64_to_u8 node.
I64ToU16
The __i64_to_u16 node.
JsonToF16
The __json_to_f16 node.
JsonToI8
The __json_to_i8 node.
JsonToI16
The __json_to_i16 node.
JsonToU8
The __json_to_u8 node.
JsonToU16
The __json_to_u16 node.
StrToF16
The __str_to_f16 node.
StrToI8
The __str_to_i8 node.
StrToI16
The __str_to_i16 node.
StrToU8
The __str_to_u8 node.
StrToU16
The __str_to_u16 node.
U8ToBool
The __u8_to_bool node.
U8ToBytes
The __u8_to_bytes node.
U8ToF16
The __u8_to_f16 node.
U8ToF32
The __u8_to_f32 node.
U8ToF64
The __u8_to_f64 node.
U8ToI16
The __u8_to_i16 node.
U8ToI32
The __u8_to_i32 node.
U8ToI64
The __u8_to_i64 node.
U8ToJson
The __u8_to_json node.
U8ToString
The __u8_to_string node.
U8ToU16
The __u8_to_u16 node.
U8ToU32
The __u8_to_u32 node.
U8ToU64
The __u8_to_u64 node.
U16ToBool
The __u16_to_bool node.
U16ToBytes
The __u16_to_bytes node.
U16ToF32
The __u16_to_f32 node.
U16ToF64
The __u16_to_f64 node.
U16ToI32
The __u16_to_i32 node.
U16ToI64
The __u16_to_i64 node.
U16ToJson
The __u16_to_json node.
U16ToString
The __u16_to_string node.
U16ToU8
The __u16_to_u8 node.
U16ToU32
The __u16_to_u32 node.
U16ToU64
The __u16_to_u64 node.
U32ToU8
The __u32_to_u8 node.
U32ToU16
The __u32_to_u16 node.
U64ToF16
The __u64_to_f16 node.
U64ToI8
The __u64_to_i8 node.
U64ToI16
The __u64_to_i16 node.
U64ToU8
The __u64_to_u8 node.
U64ToU16
The __u64_to_u16 node.