ludic.i18n: tr and key_text lose their @alloc_ok - string(k) of a Key is no allocation to the escape analysis now, and key_text's slice is not one either, so both pass arena strict as they stand (trf / trn keep theirs: they make a line)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-30 00:48:29 +03:00
parent c9cf202721
commit a3377215e9

View file

@ -16,7 +16,6 @@ export function i18n_key(name: string) -> string { return kx_join(I18N_KEY, name
export function i18n_key_plural(name: string) -> string { return kx_join(I18N_PLURAL, name, "", "", "", "", 0) }
# the key's name without its marker ("pause.resume"), or the string as it is
@alloc_ok("a key's name: a slice of text already made, kept by whoever holds the key")
export function key_text(k: string) -> string {
if not i18n_is_key(k) { return k }
var e = 1
@ -25,7 +24,6 @@ export function key_text(k: string) -> string {
}
# the text of a key: drawn translated where it is drawn (its marked text, a free cast)
@alloc_ok("a cast: the key's own marked text, nothing is made")
export function tr(k: Key) -> string { return string(k) }
# a key's text with its holes, {1} .. {4}, filled by strings already made (a number, a name, another key)
@alloc_ok("a line with its holes, made when something happens and kept by what shows it")