← All docs
sprintf() — internals
Compiler internals for sprintf(): lowering path, type checks, and runtime helpers.
sprintf() — internals
Where it lives
- Signature:
src/builtins/string/sprintf.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:573 (lower_sprintf) - Function symbol:
lower_sprintf()
Lowering notes
- Lowers
sprintf(format, values...)by packing variadic records for__rt_sprintf.
Runtime helpers
The following runtime helpers are referenced:
__rt_sprintf
Signature summary
function sprintf(string $format, ...$values): string
What the type checker enforces
- Arity: takes exactly 1 argument.
- Variadic: collects excess arguments into
$values.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/formatting/sprintf.rs(eval_builtin!) - Dispatch hooks:
direct,values - Variadic: collects excess arguments into
$values.