ReviewOS

home-lang/home

Parser: `@ptrDeref` builtin + tighten reflection arg-list parsing (12 files)

#40
Closed glennmichael123 opened this 24 days ago · 0 comments
24 days ago

Context

The 2026-05-06-evening audit shows 12 home-os kernel files failing with the same cluster of reflection/builtin errors:

CountPattern
7`Expected ')' after reflection arguments`
3`Unknown reflection function '@ptrDeref'`
2`Expected reflection function name after '@'`

All 12 files share the same root cause group: the reflection-call parser doesn't handle a few additional builtins / arg-list shapes the kernel uses.

Affected files (12)

  • `drivers/pcie_extended.home`
  • `drivers/wifi.home`
  • `fs/procfs.home`
  • `iot/audio_processing.home`
  • `net/xdp.home`
  • `perf/io_uring.home`
  • `perf/lockfree.home`
  • `power/low_power.home`
  • `power/wake_interrupt.home`
  • `security/secure_boot.home`
  • `security/selinux.home`
  • `time/hrtimer.home`

Sub-items

1. Add `@ptrDeref` builtin

Same pattern as home #27/#32 added other builtins. Likely: `@ptrDeref(ptr: *T) -> T` — load through pointer. Equivalent to `*ptr` but as a builtin. Add to whatever registry the existing pointer-related builtins use.

2. Tighten reflection arg-list parsing

`Expected ')' after reflection arguments` and `Expected reflection function name after '@'` patterns suggest the parser is bailing on certain arg-list shapes. Inspect the affected files to identify what's actually being passed (probably a nested expression or a builtin-as-arg). Likely a small tightening of how the comma/parenthesis tracker works inside reflection calls.

Why this matters

Single compiler change unblocks 12 files (~3pp OK). Highest leverage on the post-#36/#38 board.

Reference

  • 2026-05-06-evening audit: `~/Desktop/home-os-kernel-audit-2026-05-06-evening.tsv`
  • Builtin registration pattern: home #27, home #32 (closed)

Sign in to comment on this issue.