lumbda/wasm
russell@unturf.com 3800271b1b
wat iter-3: vectors + hash tables (19 new primitives)
Two new heap tags:
  7 = vector  [tag, len, elem_0, elem_1, ...]   8 + 4*len bytes
  8 = hashtable  [tag, count, alist_ptr]        12 bytes

Vector primitives (88-95):
  vector, vector?, make-vector, vector-length,
  vector-ref, vector-set!, vector->list, list->vector

Hash table primitives (96-106):
  make-hash-table, hash-table?, hash-table-set!,
  hash-table-ref, hash-table-ref/default,
  hash-table-delete!, hash-table-exists?, hash-table-size,
  hash-table-keys, hash-table-values, hash-table->alist

Hash table lookup is linear (equal? on each key) — fine for browser-scale
demos. Same linear-scan caveat as the symbol intern; would warrant a real
hash function at scale.

print_value now renders vectors as #(a b c) and hashtables as #<hashtable>.
2026-06-14 12:41:36 -04:00
..
app playground: race 3 tiers in parallel workers 2026-06-14 12:38:22 -04:00
asm wat iter-3: vectors + hash tables (19 new primitives) 2026-06-14 12:41:36 -04:00
c wasm/playground: cancel button, asm state-leak fix, restyle to match homepage 2026-06-14 12:13:20 -04:00
python wasm/playground: cancel button, asm state-leak fix, restyle to match homepage 2026-06-14 12:13:20 -04:00
tests wasm/playground: cancel button, asm state-leak fix, restyle to match homepage 2026-06-14 12:13:20 -04:00
Makefile wasm/playground: cancel button, asm state-leak fix, restyle to match homepage 2026-06-14 12:13:20 -04:00