Skip to main content

vyre_spec/
expr_variant.rs

1//! Frozen catalog of core `Expr` variant names.
2
3/// Canonical `Expr` variant names exposed by the stable vyre IR surface.
4///
5/// This is a coverage catalog, not a dynamic registry. Conformance suites use
6/// it to prove that test matrices exercise every core expression shape at
7/// least once.
8static EXPR_VARIANTS: &[&str] = &[
9    "LitU32",
10    "LitI32",
11    "LitF32",
12    "LitBool",
13    "Var",
14    "Load",
15    "BufLen",
16    "InvocationId",
17    "WorkgroupId",
18    "LocalId",
19    "BinOp",
20    "UnOp",
21    "Call",
22    "Select",
23    "Cast",
24    "Fma",
25    "Atomic",
26    "SubgroupBallot",
27    "SubgroupShuffle",
28    "SubgroupAdd",
29    "Opaque",
30];
31
32/// Return the frozen catalog of core `Expr` variant names.
33#[must_use]
34pub fn expr_variants() -> &'static [&'static str] {
35    EXPR_VARIANTS
36}