← All docs
shuffle() — internals
Compiler internals for shuffle(): lowering path, type checks, and runtime helpers.
shuffle() — internals
Where it lives
- Signature:
src/builtins/array/shuffle.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:1119 (lower_shuffle) - Function symbol:
lower_shuffle()
Lowering notes
- Lowers
shuffle()for indexed arrays with 8-byte slots by mutating the source array in place.
Runtime helpers
The following runtime helpers are referenced:
__rt_array_is_list
Signature summary
function shuffle(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/shuffle.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$array.