← All docs
array_push() — internals
Compiler internals for array_push(): lowering path, type checks, and runtime helpers.
array_push() — internals
Where it lives
- Signature:
src/builtins/array/array_push.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:60 (lower_array_push) - Function symbol:
lower_array_push()
Lowering notes
- Lowers
array_push()by appending one value and publishing the mutated array.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function array_push(array $array, ...$values): void
What the type checker enforces
- Arity: takes exactly 1 argument.
- By-reference parameters:
$array. - Variadic: collects excess arguments into
$values.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_push.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$array. - Variadic: collects excess arguments into
$values.