refactor(stdlib): de-abbreviate namespaces (Mem/Sys/Net/Collide)

Expand the abbreviated public namespaces to full words, part of the
language-wide de-abbreviation pass:
  Mem -> Memory, Sys -> System, Net -> Network, Collide -> Collision

Math stays (universally accepted, like int/bool). Renames the dispatch
strings, LSP signatures, docs (dirs, files, frontmatter), and the
inventory manifest; behavior is byte-identical (the bare rt_ targets are
unchanged). Reseeded; C-free bootstrap fixpoint holds; all suites green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-08-30 01:30:47 +03:00
parent 6e6467b515
commit 2f19c8d8e2
50 changed files with 360 additions and 360 deletions

View file

@ -1,4 +1,4 @@
# emit_collide.ludic — the Collide.* namespace: 2D overlap tests on plain
# emit_collide.ludic — the Collision.* namespace: 2D overlap tests on plain
# integer coordinates (pixels or tiles). Rectangles are (x, y, w, h) with the
# origin at the top-left; circles are (x, y, r). Squared distances use i64 so a
# large coordinate can't overflow. Each returns a bool.

View file

@ -211,13 +211,13 @@ fn emit_ns_call(ns: ptr, meth: ptr, e: Node) -> Val {
if is_ease_ns(meth) { return emit_ease_ns(meth, e) }
perr(`unknown builtin Ease.{meth}`)
}
if (ns == "Collide") {
if (ns == "Collision") {
if is_collide_ns(meth) { return emit_collide_ns(meth, e) }
perr(`unknown builtin Collide.{meth}`)
perr(`unknown builtin Collision.{meth}`)
}
if (ns == "Mem") {
if (ns == "Memory") {
if is_mem_ns(meth) { return emit_mem_ns(meth, e) }
perr(`unknown builtin Mem.{meth}`)
perr(`unknown builtin Memory.{meth}`)
}
if (ns == "Color") {
if is_colorfn_ns(meth) { return emit_colorfn_ns(meth, e) }
@ -288,7 +288,7 @@ fn emit_ns_call(ns: ptr, meth: ptr, e: Node) -> Val {
if (meth == "detach") { bare = "world_detach_dyn" }
if (meth == "query_next") { bare = "world_query_next" }
}
if (ns == "Net") {
if (ns == "Network") {
if (meth == "send") { bare = "net_send" }
if (meth == "poll") { bare = "net_poll" }
if (meth == "serialize") { bare = "serialize" }
@ -299,7 +299,7 @@ fn emit_ns_call(ns: ptr, meth: ptr, e: Node) -> Val {
if (meth == "is_owner") { bare = "is_owner" }
if (meth == "local_id") { bare = "local_id" }
}
if (ns == "Sys") {
if (ns == "System") {
if (meth == "arg") { bare = "arg" }
if (meth == "arg_count") { bare = "arg_count" }
if (meth == "exit") { bare = "exit" }

View file

@ -1,4 +1,4 @@
# emit_mem.ludic — the Mem.* namespace: raw buffers and byte pokes. bytes/words
# emit_mem.ludic — the Memory.* namespace: raw buffers and byte pokes. bytes/words
# allocate (as the bare builtins do); copy/fill wrap memcpy/memset; peek/poke
# read and write one byte. The low-level escape hatch, PICO-8's memcpy/memset/
# peek/poke by another name.

View file

@ -3227,10 +3227,10 @@ declare void @win_close()
@.str3126 = private unnamed_addr constant [22 x i8] c"unknown builtin List.\00"
@.str3127 = private unnamed_addr constant [5 x i8] c"Ease\00"
@.str3128 = private unnamed_addr constant [22 x i8] c"unknown builtin Ease.\00"
@.str3129 = private unnamed_addr constant [8 x i8] c"Collide\00"
@.str3130 = private unnamed_addr constant [25 x i8] c"unknown builtin Collide.\00"
@.str3131 = private unnamed_addr constant [4 x i8] c"Mem\00"
@.str3132 = private unnamed_addr constant [21 x i8] c"unknown builtin Mem.\00"
@.str3129 = private unnamed_addr constant [10 x i8] c"Collision\00"
@.str3130 = private unnamed_addr constant [27 x i8] c"unknown builtin Collision.\00"
@.str3131 = private unnamed_addr constant [7 x i8] c"Memory\00"
@.str3132 = private unnamed_addr constant [24 x i8] c"unknown builtin Memory.\00"
@.str3133 = private unnamed_addr constant [6 x i8] c"Color\00"
@.str3134 = private unnamed_addr constant [23 x i8] c"unknown builtin Color.\00"
@.str3135 = private unnamed_addr constant [5 x i8] c"Time\00"
@ -3398,7 +3398,7 @@ declare void @win_close()
@.str3297 = private unnamed_addr constant [17 x i8] c"world_detach_dyn\00"
@.str3298 = private unnamed_addr constant [11 x i8] c"query_next\00"
@.str3299 = private unnamed_addr constant [17 x i8] c"world_query_next\00"
@.str3300 = private unnamed_addr constant [4 x i8] c"Net\00"
@.str3300 = private unnamed_addr constant [8 x i8] c"Network\00"
@.str3301 = private unnamed_addr constant [5 x i8] c"send\00"
@.str3302 = private unnamed_addr constant [9 x i8] c"net_send\00"
@.str3303 = private unnamed_addr constant [5 x i8] c"poll\00"
@ -3417,7 +3417,7 @@ declare void @win_close()
@.str3316 = private unnamed_addr constant [9 x i8] c"is_owner\00"
@.str3317 = private unnamed_addr constant [9 x i8] c"local_id\00"
@.str3318 = private unnamed_addr constant [9 x i8] c"local_id\00"
@.str3319 = private unnamed_addr constant [4 x i8] c"Sys\00"
@.str3319 = private unnamed_addr constant [7 x i8] c"System\00"
@.str3320 = private unnamed_addr constant [4 x i8] c"arg\00"
@.str3321 = private unnamed_addr constant [4 x i8] c"arg\00"
@.str3322 = private unnamed_addr constant [10 x i8] c"arg_count\00"

View file

@ -9,14 +9,14 @@ program T {
print(Math.floor(Ease.bounce(0.5) * 1000.0)) # 765
print(Math.floor(Ease.back(0.5) * 1000.0)) # -88
print(Math.floor(Ease.back(1.0) * 1000.0)) # 1000
print(Collide.rects(0, 0, 10, 10, 5, 5, 10, 10)) # 1
print(Collide.rects(0, 0, 10, 10, 20, 20, 5, 5)) # 0
print(Collide.point_rect(5, 5, 0, 0, 10, 10)) # 1
print(Collide.point_rect(15, 5, 0, 0, 10, 10)) # 0
print(Collide.point_rect(10, 5, 0, 0, 10, 10)) # 0
print(Collide.circles(0, 0, 5, 6, 0, 5)) # 1
print(Collide.circles(0, 0, 5, 20, 0, 5)) # 0
print(Collide.rect_circle(0, 0, 10, 10, 15, 5, 6)) # 1
print(Collide.rect_circle(0, 0, 10, 10, 20, 5, 6)) # 0
print(Collision.rects(0, 0, 10, 10, 5, 5, 10, 10)) # 1
print(Collision.rects(0, 0, 10, 10, 20, 20, 5, 5)) # 0
print(Collision.point_rect(5, 5, 0, 0, 10, 10)) # 1
print(Collision.point_rect(15, 5, 0, 0, 10, 10)) # 0
print(Collision.point_rect(10, 5, 0, 0, 10, 10)) # 0
print(Collision.circles(0, 0, 5, 6, 0, 5)) # 1
print(Collision.circles(0, 0, 5, 20, 0, 5)) # 0
print(Collision.rect_circle(0, 0, 10, 10, 15, 5, 6)) # 1
print(Collision.rect_circle(0, 0, 10, 10, 20, 5, 6)) # 0
}
}

View file

@ -1,19 +1,19 @@
program T {
entry {
let b = Mem.bytes(8)
Mem.poke(b, 0, 65)
Mem.poke(b, 1, 66)
print(Mem.peek(b, 0)) # 65
print(Mem.peek(b, 1)) # 66
Mem.fill(b, 0, 8)
print(Mem.peek(b, 0)) # 0
let c = Mem.bytes(8)
Mem.poke(b, 3, 99)
Mem.copy(c, b, 8)
print(Mem.peek(c, 3)) # 99
let w = Mem.words(4)
let b = Memory.bytes(8)
Memory.poke(b, 0, 65)
Memory.poke(b, 1, 66)
print(Memory.peek(b, 0)) # 65
print(Memory.peek(b, 1)) # 66
Memory.fill(b, 0, 8)
print(Memory.peek(b, 0)) # 0
let c = Memory.bytes(8)
Memory.poke(b, 3, 99)
Memory.copy(c, b, 8)
print(Memory.peek(c, 3)) # 99
let w = Memory.words(4)
w[0] = 12345
print(w[0]) # 12345
print(Sys.arg_count()) # 1
print(System.arg_count()) # 1
}
}