← All docs
array_filter() — internals
Compiler internals for array_filter(): lowering path, type checks, and runtime helpers.
array_filter() — internals
Where it lives
- Signature:
src/builtins/array/array_filter.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:221 (lower_array_filter) - Function symbol:
lower_array_filter()
Lowering notes
- Lowers
array_filter()for static and first-class callbacks through the runtime helper.
Runtime helpers
The following runtime helpers are referenced:
__rt_array_filter__rt_array_filter_refcounted
Signature summary
function array_filter(array $array, callable $callback = null, int $mode = 0): array
What the type checker enforces
- Arity: takes 1–3 arguments (2 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_filter.rs(eval_builtin!) - Dispatch hooks:
direct,values