← All docs
array_rand() — internals
Compiler internals for array_rand(): lowering path, type checks, and runtime helpers.
array_rand() — internals
Where it lives
- Signature:
src/builtins/array/array_rand.rs - Lowering:
src/codegen/lower_inst/builtins/arrays.rs:1010 (lower_array_rand) - Function symbol:
lower_array_rand()
Lowering notes
- Lowers
array_rand()for indexed arrays.
Runtime helpers
The following runtime helpers are referenced:
__rt_array_rand__rt_mixed_cast_int
Signature summary
function array_rand(array $array): int
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/array/array_rand.rs(eval_builtin!) - Dispatch hooks:
direct,values