← All docs
fseek() — internals
Compiler internals for fseek(): lowering path, type checks, and runtime helpers.
fseek() — internals
Where it lives
- Signature:
src/builtins/io/fseek.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:3168 (lower_fseek) - Function symbol:
lower_fseek()
Lowering notes
- Lowers
fseek(stream, offset, whence?)and clears EOF state on success.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function fseek(resource $stream, int $offset, int $whence = 0): int
What the type checker enforces
- Arity: takes 2–3 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/fseek.rs(eval_builtin!) - Dispatch hooks:
direct,values