1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Tier 2.5 parsing primitives.
//!
//! These are the reusable optimizer kernels that Tier 3 language packs compose
//! into full parsing/AST passes.
/// Generic delimiter-depth scan for paired delimiter token streams.
/// SSA dominance-frontier phi discovery scan.
/// Shared AST opcode constants.
/// Pack an opcode → handler dispatch table into one u32 per entry for fast
/// GPU-side bytecode interpretation. Foundational primitive for
/// warp-specialized interpreter loops where every thread executes the same
/// opcode in the same warp.
/// Word-at-a-time whitespace classification (#P-PRIM-WS-CLASSIFY).
/// Foundational primitive for structural parsers (JSON, CSV, HTTP, INI):
/// loads 4 bytes per u32, emits a 4-bit per-word "is-whitespace" mask
/// using pure arithmetic (no per-byte branches → no warp divergence).
/// Composes with `stream_compact` for the canonical simdjson-style
/// whitespace-skip pipeline.
/// AST-level constant-folding wave operating on packed-AST u32 buffers.
/// NOT the vyre-IR `optimizer::passes::fusion_cse::cse` (audit cleanup A8,
/// 2026-04-30): the `ast_` prefix marks this as a parsing-domain primitive
/// that runs against a packed-AST representation, not against `Expr` /
/// `Node` of the IR.
/// AST-level structural-hash CSE probe/insert wave operating on packed-
/// AST u32 buffers. NOT the vyre-IR CSE — the `ast_` prefix disambiguates.
/// 2D / planar grammar rewrite scheduler (#11). Picks a maximal
/// non-overlapping set of `k × k` matches to apply in one wave.
/// User: scene parsing, parallel cellular automata, document layout.