← All docs
chunk_split() — internals
Compiler internals for chunk_split(): lowering path, type checks, and runtime helpers.
chunk_split() — internals
Where it lives
- Signature:
src/builtins/string/chunk_split.rs - Lowering:
src/builtins/semantics.rs:639 (lower_registry_call) - Function symbol:
lower_registry_call()
Lowering notes
- Uses the
runtime_callstrategy from the single-source builtin descriptor. - Emits the typed EIR target
runtime.chunk_splitthroughBuiltinLoweringContext. - The backend resolves that typed target through
src/codegen/lower_inst/runtime_calls.rs; PHP builtin names do not participate in dispatch.
Semantic descriptor
- Target strategy:
runtime_call - Validation:
signature - Result type source:
declared - Result ownership:
independent - Effects:
static (1 declared effects) - Requirements:
static (0 requirements) - Callable policy:
static_only - Target support:
macos-aarch64,ios-arm64,ios-sim-arm64,linux-aarch64,linux-x86_64
EIR and runtime boundary
- Typed EIR target:
runtime.chunk_split - Backend boundary:
src/codegen/lower_inst/runtime_calls.rsresolves the typed target without PHP-name dispatch.
Signature summary
function chunk_split(string $string, int $length = 76, string $separator = '\r\n'): string
What the type checker enforces
- Arity: takes 1–3 arguments (2 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/chunk_split.rs(eval_builtin!) - Execution: Magician interpreter adapter.
- Adapter reason:
interpreter-specific-value-semantics. - Dispatch hooks:
direct,values