Hojun-Cho
d68d3c7eb4
lib: extract rt module from os, sweep imports
...
Hare puts runtime allocation in rt::, not os:: (ref/hare/rt/malloc.ha:27,
README). ww's `@symbol("rt_alloc") fn alloc(n: u64) *void;` lived at
lib/os/os.ww as a historical bootstrap shortcut; this commit relocates
it to a new lib/rt/malloc.ww and sweeps every site that depended on
`import os` for the alloc decl over to `import rt`.
This is commit 1 of 3 in the lib/rt extraction (#35 ):
1. (this) move decl, sweep imports — preserves shape
2. rename rt_alloc → rt_malloc (#38 )
3. nullable return type + OOM-propagating builtin lowering (#39 )
No rename here. Symbol stays rt_alloc, function stays `alloc`, return
stays *void. Behavior identical — same ffi resolution outcome, just
sourced from a different module file. The rt::ensure runtime helper at
selfhost/rt/ensure.ww is its own compilation unit with a local decl and
is untouched.
Side effect: every wcc cgen file used `rt` as a local *node variable
name for "return type." `import rt;` shadows the module, so each
selfhost/cmd/wcc/{check,cgenstmt,cgenexpr,cgenutil}.ww site renamed
to `rtyp`. Mechanical follow-through; only the wcc module-import was
forced to do this rename.
Verified 132/132 + 995_self_rebuild byte-identity (5 wwstage tools
round-trip byte-identical).
2026-05-20 20:39:52 +09:00
..
2026-05-18 19:22:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-16 11:17:20 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 11:35:50 +09:00
2026-05-12 12:45:11 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 13:44:27 +09:00
2026-05-12 13:37:31 +09:00
2026-05-16 03:00:34 +09:00
2026-05-13 20:06:24 +09:00
2026-05-14 02:44:57 +09:00
2026-05-14 01:58:52 +09:00
2026-05-14 00:36:34 +09:00
2026-05-13 23:45:35 +09:00
2026-05-14 19:12:20 +09:00
2026-05-14 00:21:53 +09:00
2026-05-14 23:45:14 +09:00
2026-05-14 23:26:49 +09:00
2026-05-15 01:08:52 +09:00
2026-05-15 01:39:37 +09:00
2026-05-15 02:14:00 +09:00
2026-05-15 14:16:53 +09:00
2026-05-15 11:24:33 +09:00
2026-05-17 23:17:03 +09:00
2026-05-15 15:06:37 +09:00
2026-05-20 20:39:52 +09:00
2026-05-15 16:43:07 +09:00
2026-05-15 18:13:02 +09:00
2026-05-15 18:14:33 +09:00
2026-05-15 18:45:21 +09:00
2026-05-15 19:07:29 +09:00
2026-05-16 00:07:00 +09:00
2026-05-16 13:58:22 +09:00
2026-05-16 10:47:50 +09:00
2026-05-16 11:17:20 +09:00
2026-05-16 12:20:56 +09:00
2026-05-16 11:37:17 +09:00
2026-05-16 11:17:20 +09:00
2026-05-16 12:52:36 +09:00
2026-05-16 13:45:33 +09:00
2026-05-16 23:32:27 +09:00
2026-05-17 00:00:55 +09:00
2026-05-17 00:27:22 +09:00
2026-05-17 01:40:49 +09:00
2026-05-17 07:25:49 +09:00
2026-05-17 07:33:55 +09:00
2026-05-18 00:15:34 +09:00
2026-05-18 01:51:57 +09:00
2026-05-18 02:20:42 +09:00
2026-05-18 02:49:06 +09:00
2026-05-18 03:15:40 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 12:01:34 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 16:00:31 +09:00
2026-05-18 19:22:27 +09:00
2026-05-18 19:22:27 +09:00
2026-05-18 19:40:41 +09:00
2026-05-18 19:55:30 +09:00
2026-05-18 20:25:59 +09:00
2026-05-18 20:55:37 +09:00
2026-05-18 21:13:42 +09:00
2026-05-18 23:01:09 +09:00
2026-05-18 23:37:16 +09:00
2026-05-18 23:56:58 +09:00
2026-05-19 00:58:28 +09:00
2026-05-19 02:13:58 +09:00
2026-05-19 03:09:34 +09:00
2026-05-19 03:39:42 +09:00
2026-05-19 04:04:41 +09:00
2026-05-19 04:56:56 +09:00
2026-05-19 10:44:16 +09:00
2026-05-19 12:30:36 +09:00
2026-05-19 13:43:45 +09:00
2026-05-19 15:09:57 +09:00
2026-05-20 02:27:17 +09:00
2026-05-20 20:39:52 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 13:50:09 +09:00
2026-05-19 11:41:36 +09:00
2026-05-12 03:14:20 +09:00
2026-05-17 07:25:49 +09:00
2026-05-17 07:33:55 +09:00
2026-05-18 00:15:34 +09:00
2026-05-18 01:51:57 +09:00
2026-05-18 02:20:42 +09:00
2026-05-18 18:25:36 +09:00
2026-05-18 12:01:34 +09:00
2026-05-20 01:09:16 +09:00
2026-05-18 19:22:27 +09:00
2026-05-18 00:48:14 +09:00
2026-05-17 23:46:34 +09:00
2026-05-18 19:22:27 +09:00
2026-05-18 19:22:27 +09:00
2026-05-18 19:22:27 +09:00
2026-05-15 15:48:13 +09:00
2026-05-15 17:13:32 +09:00
2026-05-15 17:14:49 +09:00
2026-05-16 02:42:41 +09:00
2026-05-17 02:51:15 +09:00
2026-05-17 02:40:40 +09:00
2026-05-17 07:07:57 +09:00
2026-05-15 00:26:10 +09:00
2026-05-15 00:27:38 +09:00
2026-05-18 19:22:27 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-19 19:50:38 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-18 18:25:36 +09:00
2026-05-20 20:39:52 +09:00
2026-05-18 19:22:27 +09:00
2026-05-11 17:52:29 +09:00
2026-05-12 03:58:55 +09:00
2026-05-14 02:51:49 +09:00
2026-05-15 09:00:34 +09:00