← All docs
define() — internals
Compiler internals for define(): lowering path, type checks, and runtime helpers.
define() — internals
Where it lives
- Signature:
src/builtins/system/define.rs - Lowering:
src/codegen/lower_inst/builtins.rs:371 (lower_define) - Function symbol:
lower_define()
Lowering notes
- Lowers
define("NAME", value)with the duplicate-name runtime guard.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function define(string $constant_name, mixed $value): bool
What the type checker enforces
- Arity: takes exactly 2 arguments.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/core/define.rs(eval_builtin!) - Dispatch hooks:
direct,values