← All docs
array_splice() — internals
Compiler internals for array_splice(): lowering path, type checks, and runtime helpers.
array_splice() — internals
Where it lives
- Signature:
src/builtins/array/array_splice.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:956 (lower_array_splice) - Function symbol:
lower_array_splice()
Lowering notes
- Lowers
array_splice()by mutating an indexed source array and returning removed elements.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function array_splice(array $array, int $offset, int $length = null): array
What the type checker enforces
- Arity: takes 2–3 arguments (1 optional).
- By-reference parameters:
$array.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_splice.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$array.