← All docs
array_pad() — internals
Compiler internals for array_pad(): lowering path, type checks, and runtime helpers.
array_pad() — internals
Where it lives
- Signature:
src/builtins/array/array_pad.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:99 (lower_array_pad) - Function symbol:
lower_array_pad()
Lowering notes
- Lowers
array_pad()by copying an indexed array and filling missing slots.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function array_pad(array $array, int $length, mixed $value): array
What the type checker enforces
- Arity: takes exactly 3 arguments.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_pad.rs(eval_builtin!) - Dispatch hooks:
direct,values