import { type CompactProgram, type TableProgram, type TableRule } from './program.ts'; /** * DIAGNOSTIC ROW COUNTER — off unless `PM_TABLE_COUNT=1` at process start. * * Read ONCE, at module load, into a module const, so this is not the per-parse * option branch G5 forbids: with the variable false the whole thing folds away * after tier-up. It exists because "too many rows" and "each row too slow" are * different defects with the same symptom, and only a count separates them. * No timing run in this repo may set it — see `bench/jess/table-rows.ts`. */ export declare const tableCounters: { rows: number; byOp: Int32Array; /** Distinct reducer/host functions actually reaching each shared call site. */ sites: Map>; /** * SPECULATION AT UNGATED CHOICES. `encode.ts:368-376` gives a choice its * first-char dispatch only when NO arm is nullable, ALL arms are pairwise * disjoint and ALL map to a char class; any one failure ungates every arm of * the site, which then runs the linear loop below. Codegen has no such * all-or-nothing rule — `emitFirstMatch` guards each arm on its OWN first set * — so these counts are work the table does and the compiled engine does not. * * `ungatedEntries` is arms entered there; `ungatedFails` is those that then * failed, which is pure waste by construction: a failing arm consumed nothing * the winning arm will not scan again. */ ungatedEntries: number; ungatedFails: number; /** Rows executed INSIDE failed ungated arms — the subtree each wasted entry drags. */ ungatedFailRows: number; gatedEntries: number; /** Arm entries DECLINED by the per-arm class gate — the work this change removes. */ armGateSkips: number; }; export declare function resetTableCounters(): void; /** * THE REFERENCE DRIVER. Turn a program into a rule map, by INTERPRETING the * bytecode. Nothing ships on this — `tableRules` (`table/assemble.ts`) is * what `parseman/table` exports as `tableRules`, and what every artifact binds. * * IT IS CALLED `execRules` AND NOT `tableRules` FOR A MEASURED REASON. Until * this rename the two engines exported the SAME name with the SAME signature * across a module boundary, so `import { tableRules } from '…/table/exec.ts'` * and `import { tableRules } from 'parseman/table'` type-checked identically * and silently selected different engines. Three modules picked the wrong one: * `compiler/linker.ts` (the whole `compose()`/`fuse()` path), `table/fold.ts` * (every folded artifact's variant load), and `bench/jess/fixture.ts` — the * CANONICAL fixture harness, whose column printed as `table` was this function * for the entire cycle it was quoted in. * * A name that two engines can answer to is not a naming preference; it is a * defect with no diagnostic. Do not re-alias this to `tableRules` anywhere. * * The entries have the SAME signature as the assembler's, so `run()`, the * linker's public wrappers and every consumer are unchanged — which is exactly * why the substitution was invisible. */ export declare function execRules(source: TableProgram | CompactProgram, /** * MEASUREMENT CONTROL, not a feature. `leafSwap: false` hands the driver a * `triviaScan` of all nulls, so `SCAN` is never installed and every skip takes * the shared generic functions — the exact pre-swap behaviour, from the SAME * driver code, differing only in TABLE DATA. That is what makes an in-process * A/B of the swap possible on a machine where cross-run comparison is not, and * it is G5-legal for the same reason `lines` is: it is read once, at rule-map * construction, and the parse path never sees an option. */ opts?: { leafSwap?: boolean; }, artifactMetadata?: Readonly>): Record; //# sourceMappingURL=exec.d.ts.map