Files
ww/internal/wwfixture/types.ww
Hojun-Cho f191e6e0e2 wcc: modulo is integer-only; compound ops carry their operand class
Hare's rule (harec check.c binarithm): % and the bitwise/shift five
are integer-only; + - * / need numeric operands. ww grouped % with
the numeric ops, and compound assigns never op-checked at all, so
`a % b` on floats compiled half-lowered (live cs!=ww divergence),
`a %= 2.0` plain-stored the rhs (op silently dropped, both stages),
and `s += "cd"` garbled str headers. Gate both at the checker, both
stages; the cgen float-compound fallbacks and the three unknown-
compound legacy defaults (deref/global/local) demote to rule-7 hard
stops. 34 compound-on-tagged/str/slice fixtures re-pin from the old
cgen "not wired" stops to the earlier checker diagnostics; 3 new
reject fixtures pin the closed shapes.
2026-08-09 00:32:41 +09:00

99 lines
1.7 KiB
Plaintext

package wwfixture;
def protocolversion: i32 = 1;
def corpuscount: i32 = 1749;
def errorcount: i32 = 349;
def compilecount: i32 = 21;
def runcount: i32 = 209;
def runexitcount: i32 = 1170;
def nativecount: i32 = 3498;
def corpushash: str = "616b3e7f4fca31cb99409c58a29ac73623c997967ddd57651a1370c2c2e2be6a";
type directive = enum i32 {
ERROR = 0,
RUN = 1,
RUNEXIT = 2,
COMPILE = 3,
};
type stage = enum i32 {
C = 0,
WW = 1,
};
type phase = enum i32 {
COMPILE = 0,
BUILD = 1,
RUN = 2,
};
type verdict = enum i32 {
PASS = 0,
FAIL = 1,
ERROR = 2,
};
type termination = enum i32 {
EXIT = 0,
SIGNAL = 1,
TIMEOUT = 2,
SETUP = 3,
};
type fixture = struct {
name: str,
id: str,
source: str,
directive: directive,
diagnostic: str,
wwdiagnostic: str,
exitcode: i32,
};
type corpus = struct {
root: str,
fixtures: []fixture,
};
type identity = struct {
ordinal: i32,
fixtureindex: i32,
stage: stage,
};
type cellresult = struct {
ordinal: i32,
id: str,
stage: stage,
phase: phase,
verdict: verdict,
termination: termination,
code: i32,
durationns: i64,
capture: str,
};
fn stageword(s: stage) str = {
if (s == stage.C) { return "c"; };
return "ww";
};
fn phaseword(p: phase) str = {
if (p == phase.COMPILE) { return "compile"; };
if (p == phase.BUILD) { return "build"; };
return "run";
};
fn verdictword(v: verdict) str = {
if (v == verdict.PASS) { return "pass"; };
if (v == verdict.FAIL) { return "fail"; };
return "error";
};
fn terminationword(t: termination) str = {
if (t == termination.EXIT) { return "exit"; };
if (t == termination.SIGNAL) { return "signal"; };
if (t == termination.TIMEOUT) { return "timeout"; };
return "setup";
};