← All docs
iterator_to_array() — internals
Compiler internals for iterator_to_array(): lowering path, type checks, and runtime helpers.
iterator_to_array() — internals
Where it lives
- Signature:
src/builtins/spl/iterator_to_array.rs - Lowering:
src/codegen/lower_inst/builtins/spl.rs:266 (lower_iterator_to_array) - Function symbol:
lower_iterator_to_array()
Lowering notes
- Lowers
iterator_to_array()over arrays,iterable, and Traversable objects.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function iterator_to_array(traversable $iterator, bool $preserve_keys = true): array
What the type checker enforces
- Arity: takes 1–2 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/iterator_to_array.rs(eval_builtin!) - Dispatch hooks:
direct,values