Phase 6e: unify builtin naming (loaders domain-first, set_reg)

Fixed the naming inconsistencies the cohesion audit flagged, converging on the
domain-first style the bulk of the surface already uses (ui_*, text_*, rng_*,
font_load, image_load):

  - load_png    -> png_load       (asset loaders were split: font_load/image_load
  - load_sprites -> sprites_load   were domain-first, load_* were verb-first)
  - setreg      -> set_reg        (missing underscore vs ui_set_int/ui_set_text)

Game builtins resolve to their `rt_` runtime function, so the renames are in
runtime/native (rt_png_load, rt_sprites_load, rt_set_reg) plus the ~100 example
call sites; `become` lowering in emit_machine now emits @fn_rt_set_reg. Purely a
surface rename — every renamed call maps to the same runtime symbol, so behavior
and golden renders are byte-identical.

Vocabulary + docs updated (ludic_syntax.h, grammar, LudicTokens.kt, LANGUAGE.md,
README, SYNTAX-REDESIGN). Reseeded; C-free fixpoint holds; goldens identical;
17/17; vocab clean.

Left as-is: os_argc/os_arg (compiler-internal intrinsics, already namespaced and
consistent with each other; renaming would need a bootstrap dance for little
gain). reg/set_reg keep the getter-bare/setter-set_ shape ui_focused/ui_set_int
already use.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-08-27 23:38:10 +03:00
parent c5bd50d544
commit cc701013f5
16 changed files with 122 additions and 122 deletions

View file

@ -178,7 +178,7 @@ fn rt_reg(i: int) -> int {
return peek32(rt_regs, i)
}
fn rt_setreg(i: int, v: int) -> void {
fn rt_set_reg(i: int, v: int) -> void {
if i < 0 { return }
if i >= 64 { return }
poke32(rt_regs, i, v)

View file

@ -316,7 +316,7 @@ fn rt_draw_9slice(id: int, dx: int, dy: int, dw: int, dh: int, inset: int) -> vo
}
# ---- sprites (16x16 art) --------------------------------------------------
fn rt_load_png(path: str) -> int {
fn rt_png_load(path: str) -> int {
if spr_n >= SPR_MAX { return 0 - 1 }
if rt_decode_png(path) == false { return 0 - 1 }
let id = spr_n
@ -376,7 +376,7 @@ fn rt_hexval(c: int) -> int {
return 0 - 1
}
fn rt_load_sprites(path: str) -> void {
fn rt_sprites_load(path: str) -> void {
let d = rt_read_file(path)
if ptr_is_null(d) { spr_n = 0; return }
let size = rt_file_len