← All docs
array_slice() — internals
Compiler internals for array_slice(): lowering path, type checks, and runtime helpers.
array_slice() — internals
Where it lives
- Signature:
src/builtins/array/array_slice.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:911 (lower_array_slice) - Function symbol:
lower_array_slice()
Lowering notes
- Lowers
array_slice()for indexed arrays with pointer-sized payload slots.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function array_slice(array $array, int $offset, int $length = null): array
What the type checker enforces
- Arity: takes 2–3 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_slice.rs(eval_builtin!) - Dispatch hooks:
direct,values