1
//! Symbol table and entries.
2
//!
3
//! Split by responsibility:
4
//! - [`entry`] — the `Symbol` struct + `SymbolKind`.
5
//! - [`table`] — the `SymbolTable` struct and core read/write API
6
//!   (`define`, `lookup`, `register_host_fns`, test/coverage state).
7
//! - [`builtins`] — `register_builtins` + entity constants/accessors
8
//!   + map-family macros.
9
//! - [`stdlib`] — `when`/`unless`/`upcase` essentials. Runs after `register_builtins`.
10

            
11
mod builtins;
12
mod builtins_generated;
13
mod carry;
14
mod closure_deps;
15
mod closure_records;
16
mod closures;
17
mod deferred;
18
mod define;
19
mod definitions;
20
mod entry;
21
mod eval_blocks;
22
mod guards;
23
mod homes;
24
mod instances;
25
mod journal;
26
mod local_aliases;
27
mod lost_reads;
28
mod rebind;
29
mod regions;
30
mod registry;
31
mod resolve;
32
mod scope;
33
mod stdlib;
34
mod structs;
35
mod table;
36

            
37
#[cfg(test)]
38
mod cells_tests;
39
#[cfg(test)]
40
mod closure_deps_tests;
41
#[cfg(test)]
42
mod closure_records_tests;
43
#[cfg(test)]
44
mod digest;
45
#[cfg(test)]
46
mod kept_lexicals_tests;
47
#[cfg(test)]
48
mod local_aliases_tests;
49
#[cfg(test)]
50
mod stdlib_tests;
51
#[cfg(test)]
52
mod tests;
53

            
54
pub use carry::Carried;
55
pub(crate) use carry::is_list_source;
56
pub use closures::ClosureSource;
57
pub use definitions::{Slot, UnitSlot};
58
pub use entry::{Symbol, SymbolKind};
59
pub(crate) use guards::with_sufficient_stack;
60
pub(crate) use homes::{Asked, CellBinding, ClosureShape, HomeKey, Seed};
61
pub use instances::{Found, StructInstance};
62
pub(crate) use journal::SymbolJournal;
63
pub use rebind::Rebind;
64
pub(crate) use regions::{ExitRegion, FormId, form_id};
65
pub(crate) use resolve::Head;
66
pub(crate) use stdlib::DOTIMES_COUNT;
67
pub(crate) use structs::StructLayout;
68
pub(crate) use table::MAX_SHARED_RECURSION_DEPTH;
69
pub use table::SymbolTable;
70

            
71
/// The native builtin names registered from the org-tangled registry
72
/// (`builtins_generated::NATIVES`). Exposed so the native-dispatch
73
/// registry test can assert every documented native actually has a
74
/// codegen handler — the guard that catches "phantom natives" (a name
75
/// the reader accepts but codegen rejects with "not yet implemented").
76
#[cfg(test)]
77
#[must_use]
78
2
pub(crate) fn registered_native_names() -> &'static [&'static str] {
79
2
    builtins_generated::NATIVES
80
2
}