parseman 0.60.0 → 0.60.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/diagnostics.js +3 -3
- package/dist/analysis/diagnostics.js.map +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.d.ts +18 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +115 -47
- package/dist/plugin/index.js.map +1 -1
- package/dist/table/assemble.d.ts +1 -1
- package/dist/table/compile-rule-map.d.ts +1 -1
- package/dist/table/compile.d.ts +1 -1
- package/dist/table/exec.d.ts +0 -35
- package/dist/table/exec.d.ts.map +1 -1
- package/dist/table/index.js +3 -3
- package/dist/table/index.js.map +1 -1
- package/dist/table/ops.d.ts +1 -10
- package/dist/table/ops.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -4
- package/src/plugin/index.ts +189 -63
- package/src/table/assemble.ts +5 -5
- package/src/table/compile-rule-map.ts +1 -1
- package/src/table/compile.ts +1 -1
- package/src/table/emit-assembly.ts +2 -2
- package/src/table/encode.ts +1 -1
- package/src/table/exec.ts +0 -69
- package/src/table/ops.ts +1 -10
- package/src/version.ts +1 -1
- package/dist/table/encode-baseline.d.ts +0 -16
- package/dist/table/encode-baseline.d.ts.map +0 -1
- package/dist/table/exec-baseline.d.ts +0 -9
- package/dist/table/exec-baseline.d.ts.map +0 -1
- package/src/table/encode-baseline.ts +0 -346
- package/src/table/exec-baseline.ts +0 -557
package/dist/table/assemble.d.ts
CHANGED
|
@@ -227,7 +227,7 @@ export declare class AssemblyCache {
|
|
|
227
227
|
* That is not a hole in G5, it is G5's own first clause: "quickly building the
|
|
228
228
|
* grammar reference ON RUN START, making some swaps on rules or sub-rules, and
|
|
229
229
|
* then the run actually runs with no logic branching for that option input"
|
|
230
|
-
* (`notes/TABLE-DRIVER.md`). This IS the run-start step. What the criterion
|
|
230
|
+
* (`notes/history/TABLE-DRIVER.md`). This IS the run-start step. What the criterion
|
|
231
231
|
* forbids is the second sentence, and past this call there is no option read
|
|
232
232
|
* anywhere — `scripts/check-invariants.mjs` INV-6 decides that mechanically.
|
|
233
233
|
*
|
|
@@ -57,7 +57,7 @@ export type TableRuleMapOptions = {
|
|
|
57
57
|
* `coverage: grammarCoverage` here for every `rules()` grammar — so this is what
|
|
58
58
|
* makes `{ grammarCoverage: true }` a working build under the table lowering.
|
|
59
59
|
*
|
|
60
|
-
* COUNTERS ONLY, per the owner ruling recorded in `notes/RELEASE-0.48-TARGET.md`
|
|
60
|
+
* COUNTERS ONLY, per the owner ruling recorded in `notes/history/RELEASE-0.48-TARGET.md`
|
|
61
61
|
* §1; `_grammarTrace` parity is 0.48 work. The plugin's coverage path needs the
|
|
62
62
|
* DEFINITIONS STAMP and the HITS, and both are here.
|
|
63
63
|
*/
|
package/dist/table/compile.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export type TableCompileOptions = {
|
|
|
34
34
|
*
|
|
35
35
|
* COUNTERS ONLY — owner ruling. `_grammarTrace`'s six phases are emitted at
|
|
36
36
|
* ~40 fine-grained sites by codegen and are deferred to 0.48
|
|
37
|
-
* (`notes/RELEASE-0.48-TARGET.md` §1). A table entry rejects a context carrying
|
|
37
|
+
* (`notes/history/RELEASE-0.48-TARGET.md` §1). A table entry rejects a context carrying
|
|
38
38
|
* a trace sink before parsing: silently returning an empty trace would look
|
|
39
39
|
* exactly like a real trace whose grammar sites were never visited. The
|
|
40
40
|
* plugin's coverage path reads `_grammarCoverage` and the definitions stamp,
|
package/dist/table/exec.d.ts
CHANGED
|
@@ -1,39 +1,4 @@
|
|
|
1
1
|
import { type CompactProgram, type TableProgram, type TableRule } from './program.ts';
|
|
2
|
-
/**
|
|
3
|
-
* DIAGNOSTIC ROW COUNTER — off unless `PM_TABLE_COUNT=1` at process start.
|
|
4
|
-
*
|
|
5
|
-
* Read ONCE, at module load, into a module const, so this is not the per-parse
|
|
6
|
-
* option branch G5 forbids: with the variable false the whole thing folds away
|
|
7
|
-
* after tier-up. It exists because "too many rows" and "each row too slow" are
|
|
8
|
-
* different defects with the same symptom, and only a count separates them.
|
|
9
|
-
* No timing run in this repo may set it — see `bench/jess/table-rows.ts`.
|
|
10
|
-
*/
|
|
11
|
-
export declare const tableCounters: {
|
|
12
|
-
rows: number;
|
|
13
|
-
byOp: Int32Array;
|
|
14
|
-
/** Distinct reducer/host functions actually reaching each shared call site. */
|
|
15
|
-
sites: Map<string, Set<unknown>>;
|
|
16
|
-
/**
|
|
17
|
-
* SPECULATION AT UNGATED CHOICES. `encode.ts:368-376` gives a choice its
|
|
18
|
-
* first-char dispatch only when NO arm is nullable, ALL arms are pairwise
|
|
19
|
-
* disjoint and ALL map to a char class; any one failure ungates every arm of
|
|
20
|
-
* the site, which then runs the linear loop below. Codegen has no such
|
|
21
|
-
* all-or-nothing rule — `emitFirstMatch` guards each arm on its OWN first set
|
|
22
|
-
* — so these counts are work the table does and the compiled engine does not.
|
|
23
|
-
*
|
|
24
|
-
* `ungatedEntries` is arms entered there; `ungatedFails` is those that then
|
|
25
|
-
* failed, which is pure waste by construction: a failing arm consumed nothing
|
|
26
|
-
* the winning arm will not scan again.
|
|
27
|
-
*/
|
|
28
|
-
ungatedEntries: number;
|
|
29
|
-
ungatedFails: number;
|
|
30
|
-
/** Rows executed INSIDE failed ungated arms — the subtree each wasted entry drags. */
|
|
31
|
-
ungatedFailRows: number;
|
|
32
|
-
gatedEntries: number;
|
|
33
|
-
/** Arm entries DECLINED by the per-arm class gate — the work this change removes. */
|
|
34
|
-
armGateSkips: number;
|
|
35
|
-
};
|
|
36
|
-
export declare function resetTableCounters(): void;
|
|
37
2
|
/**
|
|
38
3
|
* THE REFERENCE DRIVER. Turn a program into a rule map, by INTERPRETING the
|
|
39
4
|
* bytecode. Nothing ships on this — `tableRules` (`table/assemble.ts`) is
|
package/dist/table/exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/table/exec.ts"],"names":[],"mappings":"AA6CA,OAAO,EAEL,KAAK,cAAc,EACF,KAAK,YAAY,EAAE,KAAK,SAAS,EACnD,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/table/exec.ts"],"names":[],"mappings":"AA6CA,OAAO,EAEL,KAAK,cAAc,EACF,KAAK,YAAY,EAAE,KAAK,SAAS,EACnD,MAAM,cAAc,CAAA;AAkpDrB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,YAAY,GAAG,cAAc;AACrC;;;;;;;;GAQG;AACH,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,EACjC,gBAAgB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM,GACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAiC3B"}
|
package/dist/table/index.js
CHANGED
|
@@ -5728,7 +5728,7 @@ function projectChild(children2, project, type) {
|
|
|
5728
5728
|
}
|
|
5729
5729
|
|
|
5730
5730
|
// src/version.ts
|
|
5731
|
-
var PARSEMAN_VERSION = "0.60.
|
|
5731
|
+
var PARSEMAN_VERSION = "0.60.2";
|
|
5732
5732
|
|
|
5733
5733
|
// src/table/assemble.ts
|
|
5734
5734
|
import { PlainBuf as PlainBuf2, PlainField, PlainLeaf as PlainLeaf8, PlainNode as PlainNode2, PlainSpan as PlainSpan9 } from "../cst/plain.js";
|
|
@@ -13265,7 +13265,7 @@ var AssemblyCache = class {
|
|
|
13265
13265
|
* That is not a hole in G5, it is G5's own first clause: "quickly building the
|
|
13266
13266
|
* grammar reference ON RUN START, making some swaps on rules or sub-rules, and
|
|
13267
13267
|
* then the run actually runs with no logic branching for that option input"
|
|
13268
|
-
* (`notes/TABLE-DRIVER.md`). This IS the run-start step. What the criterion
|
|
13268
|
+
* (`notes/history/TABLE-DRIVER.md`). This IS the run-start step. What the criterion
|
|
13269
13269
|
* forbids is the second sentence, and past this call there is no option read
|
|
13270
13270
|
* anywhere — `scripts/check-invariants.mjs` INV-6 decides that mechanically.
|
|
13271
13271
|
*
|
|
@@ -15136,7 +15136,7 @@ var Encoder = class {
|
|
|
15136
15136
|
* simply parses it with the gate switched off at every choice arm that reaches
|
|
15137
15137
|
* a hole.
|
|
15138
15138
|
*
|
|
15139
|
-
* Measured on jess's less grammar (`
|
|
15139
|
+
* Measured on jess's less grammar (with the one-off `macro-program-diff` bench, last at `4a5d0341`): 195 of
|
|
15140
15140
|
* 562 reachable choice arms carried NO first set in the shipped artifact
|
|
15141
15141
|
* against 103 of 540 in the runtime encode, and 10 dispatch sites lost the O(1)
|
|
15142
15142
|
* `exclusive` piece (`assemble.ts:1758`) for the candidate-mask loop. With this
|