Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

F.2 Value Representation

  • All runtime values are emitted as udewy_word, a generated C typedef for uint64_t
  • Signed operations explicitly cast to int64_t where udewy semantics require signed interpretation
  • udewy booleans still use true = 0xFFFF_FFFF_FFFF_FFFF and false = 0
  • Ordinary strings and based strings keep the normal udewy layout: one 8-byte byte-length word immediately before the data pointer

The generated C helper layer uses direct unsigned char * access for u8 loads/stores and fixed-size memcpy helpers for wider loads/stores. The latter permit unaligned access without C aliasing assumptions and use the target's native byte order automatically. This matches the native-backend model: raw memory is target memory, not a fixed little-endian serialization format. Constant-size copies let C compilers recover ordinary word loads/stores without first optimizing byte-packing expressions.