← All docs
ksort() — internals
Compiler internals for ksort(): lowering path, type checks, and runtime helpers.
ksort() — internals
Where it lives
- Signature:
src/builtins/array/ksort.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:1099 (lower_ksort) - Function symbol:
lower_ksort()
Lowering notes
- Lowers
ksort()through the key-sort helper surface.
Runtime helpers
The following runtime helpers are referenced:
__rt_krsort__rt_ksort__rt_natcasesort__rt_natsort
Signature summary
function ksort(array $array): bool
What the type checker enforces
- Arity: takes exactly 1 argument.
- By-reference parameters:
$array.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/ksort.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$array.