← All docs
get_defined_constants() - internals
Compiler internals for get_defined_constants(): lowering path, type checks, and runtime helpers.
get_defined_constants() - internals
Where it lives
- Signature:
src/builtins/system/get_defined_constants.rs - Lowering:
src/builtins/semantics.rs:704 (lower_registry_call) - Function symbol:
lower_registry_call()
Lowering notes
- Uses the
eir_primitivestrategy from the single-source builtin descriptor. - Emits backend-neutral EIR primitives or a small EIR graph through
BuiltinLoweringContext.
Semantic descriptor
- Target strategy:
eir_primitive - Validation:
checker_hook - Result type source:
checked - Result ownership:
fresh - Effects:
static (7 declared effects) - Requirements:
static (0 requirements) - Callable policy:
dynamic - Target support:
macos-aarch64,ios-arm64,ios-sim-arm64,linux-aarch64,linux-x86_64
EIR and runtime boundary
- Typed EIR target: descriptor-emitted EIR primitives or graph; no opaque builtin call remains.
Signature summary
function get_defined_constants(bool $categorize = false): array
What the type checker enforces
- Arity: takes 0–1 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/core/get_defined_constants.rs(eval_builtin!) - Execution: Magician interpreter adapter.
- Adapter reason:
callable-or-reflection. - Dispatch hooks:
direct,values