← All docs
array_shift() — internals
Compiler internals for array_shift(): lowering path, type checks, and runtime helpers.
array_shift() — internals
Where it lives
- Signature:
src/builtins/array/array_shift.rs - Lowering:
src/codegen/lower_inst/builtins/arrays/shift.rs:23 (lower_array_shift) - Function symbol:
lower_array_shift()
Lowering notes
- Lowers
array_shift()for indexed arrays by compacting slots and boxingT|nullas Mixed.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function array_shift(array $array): mixed
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/array_shift.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$array.