Files
ww/internal/wwfixture/types.ww
Hojun-Cho 3f7452814b cgen: resolve local fn-ptr callees for variadic arg prep
The wwstage variadic call classification was name-keyed: a fn-ptr
FIELD call whose local base shadowed the current module name
(lib/log's log.println(log, args...)) picked the module fn's
signature — nfixed off by one, the fixed arg boxed into the gather,
the spread emitted as zeros — and a no-collision fn-ptr callee missed
the registry entirely, leaking the raw N_SPREAD as a single $0 word
(SIGSEGV / exit 255 in 8 of 11 logtest tests on the wwstage leg).
fnptrcalleetfn resolves a local fn-ptr callee (bare local or struct
field) to its N_TFN once, shared by the CALL-target choice,
callee_variadic_param (with the []T wrap registry params get from
installparams), calleecvariadic, and the widening param lookup, so
target and arg prep can never disagree. Graduates the #59.8 logtest
pin — DATABYTEID_DIVERGED-era M_DIVERGE count is now zero.
2026-08-08 01:07:23 +09:00

99 lines
1.7 KiB
Plaintext

package wwfixture;
def protocolversion: i32 = 1;
def corpuscount: i32 = 1239;
def errorcount: i32 = 314;
def compilecount: i32 = 12;
def runcount: i32 = 146;
def runexitcount: i32 = 767;
def nativecount: i32 = 2478;
def corpushash: str = "369aca2f1c0081faf7297d8fa976a7374d97a07b76d2df079f7eea60660bda2a";
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";
};