← All docs
chr() — internals
Compiler internals for chr(): lowering path, type checks, and runtime helpers.
chr() — internals
Where it lives
- Signature:
src/builtins/string/chr.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:920 (lower_chr) - Function symbol:
lower_chr()
Lowering notes
- Lowers
chr()by converting an integer code point into a one-byte string.
Runtime helpers
The following runtime helpers are referenced:
__rt_chr
Signature summary
function chr(int $codepoint): string
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/chr.rs(eval_builtin!) - Dispatch hooks:
direct,values