6 Commits

Author SHA1 Message Date
ea748b2e5e feat(php): Simple web demo 2026-05-11 13:07:35 -05:00
d37d443021 feat(php): use new FFI for Arboricx 2026-05-11 09:18:47 -05:00
8a673e282d Fixes space leak by switching to objects
The integer-arena approach (parallel global arrays) never freed nodes,
causing 6GB+ memory usage when running the self-hosted kernel. PHP
arrays don't shrink and we have no GC for them.

- Replace int-arena with plain Node objects so PHP's refcounting GC
  reclaims unreachable subtrees automatically.
- Hash-cons Stem/Fork nodes to collapse duplicate immutable subtrees.
- Cache ofNumber(0..255) to avoid re-creating byte trees.
- Eliminate indirection (tag 4) nodes entirely; projection rules now
  eagerly reduce and copy tag/a/b into the original App node.
- Remove all deref() loops — every node is exactly what it says.

Memory: 6GB+ → 24MB for `id "hello"` with runArboricxToString kernel
2026-05-10 16:56:00 -05:00
1885c9b4ba PHP host shell cleanup and docs 2026-05-10 14:52:24 -05:00
fa58f4ef3a Fix fuel implementation in PHP 2026-05-10 09:10:27 -05:00
e9eb2daaf2 Initial PHP host implementation 2026-05-09 20:22:58 -05:00