syntax+w6c: multi-type match patterns in wwstage (align up to cstage)

`case T1 | T2 =>` (binding-less; cstage parse.c:635-650 chains extra
types through cs->list, bindings stay single-type by design). Three
wwstage layers, no AST change (node.list already exists):
- parser (expr.ww): pipe loop after the non-let arm's first
  parsetype;
- checker (check.ww): resolvewalk N_MCASE now walks n.list so each
  alt gets its type_ stamp (exhaustiveness/casecovers were already
  alt-aware, built ahead of the parser);
- cgen (cgenexpr.ww): the single-pattern want-computation moves
  VERBATIM into matcharmwant; a cs.list arm emits CMPQ/JE per alt
  funneling into one match_body label, mirroring cgen.c:11118-11141
  incl. label mint order and the tag<0 clamp. Nullable arms keep
  ignoring alts (both stages).

Graduates the held e2e row (pin 1732/1158/3464); byte-identical on
the repro and the single-pattern control.
This commit is contained in:
2026-08-08 17:15:41 +09:00
parent bbdd8bede6
commit 184afa3243
5 changed files with 120 additions and 37 deletions

View File

@@ -1,13 +1,13 @@
package wwfixture;
def protocolversion: i32 = 1;
def corpuscount: i32 = 1731;
def corpuscount: i32 = 1732;
def errorcount: i32 = 343;
def compilecount: i32 = 22;
def runcount: i32 = 209;
def runexitcount: i32 = 1157;
def nativecount: i32 = 3462;
def corpushash: str = "6786916caba20c07c47eaaa0507dd2707fd162b708904b6e72187afb02233bf9";
def runexitcount: i32 = 1158;
def nativecount: i32 = 3464;
def corpushash: str = "df3862c647aae744b549089ab4a180b36371fe898f5996c13099f52da203265e";
type directive = enum i32 {
ERROR = 0,