fix(lang): the action drain is the program's; --check runs every check a build makes; a registry key named count is refused; name lookups are tables
- the function that calls every reducer (and the action queue) is written in the program's own file: in the first action's file it belonged to that module, depended on every module with a reducer, and joined a game's modules into one 69-module cycle (examples/actions/modules and a ludic deps case hold it); the state instances, the queue and the reducers make no deps edges - ludicc --check / ludic build --check lower the program too and write nothing, so the code writer's refusals are in it: a bind to a function that is gone, an unknown name (and the checker now refuses fn <missing> itself); rejects bind_missing_fn, unknown_name, registry_count_key - def R count is refused: its constant would be PREFIX_COUNT, the registry's size - a file's module, package, trust and numbers-float are tables, and from the check on the lookups of functions, enums, records, globals and externs are too (tagged enums kept as a list): Maroon Lake's check-only build went from about 20 s to 7 s including lowering, its IR from about 2 minutes to under 10 s; duplicate declarations are found by table, not a pair of loops - threads.ludic's pool check gives each call a little work, so a busy machine cannot run them all on the caller before a worker wakes (it failed one run in three under load) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2fdefa6040
commit
8cf4b3fed6
24 changed files with 67169 additions and 64398 deletions
|
|
@ -188,6 +188,7 @@ entry {
|
|||
cur_dir = dir_of(path)
|
||||
g_src_name = base_name(path) # for panic/expect file:line messages
|
||||
g_parse_file = path # for the compiler's own file:line diagnostics
|
||||
g_act_main = path # 0.R: where the action drain is written
|
||||
lex(src)
|
||||
parse_program()
|
||||
g_prog_user_end = len(prog)
|
||||
|
|
@ -217,9 +218,15 @@ entry {
|
|||
check_duplicate_decls()
|
||||
g_mg_entry = path
|
||||
if g_migrate { mg_collect() } # 0.S2: the vars that move (migrate.ludic)
|
||||
ix_start() # the lookups by name, as tables (emit_core.ludic)
|
||||
check_program() # L4: the types agree before anything is emitted
|
||||
if g_migrate { mg_finish() }
|
||||
if g_check_only { exit(0) } # --check: the checks are all there is
|
||||
# --check: every check a build makes - the emitter refuses things too (a bind to a function that is
|
||||
# gone, an unknown name) - and nothing written
|
||||
if g_check_only {
|
||||
emit_program()
|
||||
exit(0)
|
||||
}
|
||||
emit_program()
|
||||
deps_flush() # LUDIC_DEPS=<file>: the module graph (ludic deps)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue