Commit Graph

934 Commits

Author SHA1 Message Date
351f4a25bc ww: invalidate partial package commits 2026-08-14 05:12:45 +09:00
695983f7c3 ww: keep generated test support file-scoped 2026-08-14 04:20:29 +09:00
6efe9b70d4 ww: separate package identity from declared name 2026-08-14 03:07:58 +09:00
d5fdc27c0a ww: implement recursive local package patterns 2026-08-13 23:42:37 +09:00
b84fb3ff25 ww: implement local vendor package semantics 2026-08-13 19:18:00 +09:00
9a5dbac84f ww: enforce internal package visibility 2026-08-13 15:37:51 +09:00
dab3cb4998 ww: select build action from package declaration 2026-08-13 13:36:10 +09:00
61a2ee5221 ww: preserve fallible graph allocation in self-host 2026-08-13 08:35:48 +09:00
059550e00f ww: make allocation failures stage-equivalent 2026-08-13 08:19:29 +09:00
00903b986b ww: grow package universes dynamically 2026-08-13 08:08:49 +09:00
c3df0afeb0 build: separate package identity from storage paths 2026-08-13 05:37:56 +09:00
5f0f544157 ww: restrict command self-import exception 2026-08-13 03:38:58 +09:00
4377634bb9 ww: preserve command package identities 2026-08-13 03:37:08 +09:00
0aff801def ww: canonicalize directory package identities 2026-08-13 02:48:12 +09:00
f8ec59999d ww: intern canonical directory package actions 2026-08-13 00:54:08 +09:00
2dd6b8a250 build: close package variant identity gaps 2026-08-12 22:09:55 +09:00
1724ea086f build: make executable and test roots package actions 2026-08-12 22:00:02 +09:00
fc4bde703e compiler: separate package exports from entry roots 2026-08-12 21:59:51 +09:00
edd3f4ee83 build: pass direct exports to package compilers 2026-08-12 18:42:22 +09:00
0af13ea501 cmd: resolve source imports only as directories
Separate import lookup from raw CLI target compatibility in both production drivers. Package scans and test-support edges now create directory nodes only, while unit composition emits only the owning package's sorted sources after direct export data. Document the Go 1.26.5 ownership evidence and retained single-file root boundary.
2026-08-12 17:12:49 +09:00
c7d9dc92de selfhost: migrate tool sources to directory packages
Build w6a and w6l from package-main directories and expose the wcc backend through a narrow package API so w6c and wwdump no longer import implementation files. Retarget the remaining load-bearing fixtures and example sources to directory packages; retain the one intentional flat compiler collision as an explicitly composed raw unit.
2026-08-12 17:12:03 +09:00
90f9d60291 cmd: preserve package-test driver identity 2026-08-12 16:22:38 +09:00
5eec5d3711 cmd: bind package workdirs to driver identity 2026-08-12 15:51:44 +09:00
5a2e4ba28d cmd: honor package library roots in both stages 2026-08-12 15:18:46 +09:00
d78020baf7 cmd: preserve package attribution for tool failures 2026-08-12 14:17:41 +09:00
7dad3a6db4 cmd: invoke package tools with exact arguments 2026-08-12 14:13:51 +09:00
29e97ff8a1 cmd: share package builds across test directories 2026-08-12 13:54:15 +09:00
dd975d195c cmd: share package builds across test products 2026-08-12 11:42:24 +09:00
9862f0c05f cmd: build directory package test variants 2026-08-12 03:46:47 +09:00
e59881cb30 compiler: support package test runtime aliases 2026-08-12 03:46:28 +09:00
0ac0fd68ec cmd: compile packages from direct exports 2026-08-12 01:12:50 +09:00
9b970eb16a compiler: make package exports self-contained 2026-08-12 01:12:42 +09:00
52f6d6f0d4 cmd: build local package graphs 2026-08-11 22:26:07 +09:00
db96422f74 compiler: load imports and enforce package exports 2026-08-11 22:25:59 +09:00
a2faa8b071 w6c: keep nested unwrap destinations distinct 2026-08-09 04:52:43 +09:00
ac8ddee6c1 w6l: purge dead elf branches; pin rx extent 2026-08-09 04:37:33 +09:00
e720d4802f w6a: delete dead text state and redundant rex arm 2026-08-09 04:31:37 +09:00
c9425a3b46 wcc: delete unused warning counters and ww err twin 2026-08-09 04:19:22 +09:00
a85306e68f wwdump: fail ast mode on parser errors 2026-08-09 04:02:11 +09:00
00d0ed502d ww: resolve root argv0 and retire stale help paths 2026-08-09 03:56:37 +09:00
5f829399ea wcc: classify tuple destructure from the rhs type 2026-08-09 03:49:58 +09:00
edacb40bfe w6c: keep unwrap destination off the call stack 2026-08-09 03:44:12 +09:00
a030268c52 wcc: build generated labels at their exact size 2026-08-09 03:38:03 +09:00
0a16811ab1 w6c: preserve grouped and qualified types in wwi 2026-08-09 03:31:40 +09:00
cd11d6e573 ww: driver/coordinator robustness — dirent errors, EINTR, block comments
Three same-cluster robustness holes. enumeratedir treated a failed
getdents64 (r<0) as EOF: a mid-walk error silently truncated the
package source list, and a first-read error was misdiagnosed as
"directory contains no WW package sources" -- it now routes the
caller's "cannot read directory" arm. run_test_bin's waitpid had no
EINTR retry and its return was unchecked, so an interrupted wait
left status==0 and reported a false test PASS (the do_run twin
already retried). The coordinator's pkgskipspace now also skips
/* */ before the package clause like the driver's sep_skip_space --
a source opening with a block comment built under ww but failed
coordinator discovery.
2026-08-09 02:05:48 +09:00
999b110001 wcc: forrange bindings get a per-loop scope; dup binders reject
The TODO(#11) silent-accept of `for (let (a, a) .. xs)` rested on a
stale premise -- resolvewalk has per-block scopes since #53 and IS
the live w6c_ww checker pass. Bindings now install in a per-LOOP
scope (the N_MCASE pattern), so a duplicate name within one pattern
errs "redeclared in same scope" (cstage parity via stamptuplebinds'
scopedefine-nil check) while sequential same-name loops stay legal.
kwtab restores its stated alphabetical order (`import` before `is`,
both stages, kinds swapped in lockstep with names).
2026-08-09 01:59:33 +09:00
411515a83b wcc: checker-seam drain — spreads, tuple aliases, yield scoping
Four seams from one review cluster, all landing on the same checker
files; gates ran on the union (rule 11 body).

?-subset: the wwstage walk compared `...spread` ALIAS nodes on both
sides of the error-subset check, falsely rejecting a spread-carried
error return (`(i64 | ...errs)`, cs-accept/ww-reject) — both sides
now flatten like trycountvariants (cstage Tparams are pre-flattened
at type level).

Multi-let/multi-assign: the tuple gates keyed on the RAW rhs kind,
rejecting a NAMED tuple alias (`type pair = (i64,i64)`; cs clean-
reject, ww asserttyped stop) — both stages chase per #99 alias
transparency, wwstage rettupleof peels the alias so cgmassign keeps
the str element's len/cap stores, and the catA massign-alias error
pin re-rules to a run fixture. The N_MLET diagnostic also printed
its operands swapped (elem/declared reversed vs its wording).

Yield: match_yield_type didn't descend into N_SWITCH, so a yield
inside a switch arm typed the match void and dropped the value
(both stages); and a stray yield outside any match arm reached cgen
unchecked — both stages now gate on a match-arm counter (the
c->loops discipline).
2026-08-09 01:51:39 +09:00
503d1ab01e wcc: wwstage checks call arity at desugarcallargs
cstage rejects `add(1,2,3)` and `add(4)` (too many / not enough
arguments); wwstage ran no count check at this seam, so both built
-- a stray arg pushed silently, a missing one read garbage
(cs-reject/ww-accept build-verdict divergence). Surplus errs when
params exhaust with args left; missing errs on a leftover regular
param (a leftover TK_ELLIPSIS or FFI "..." is a legal zero-arg
variadic tail). fn-VALUE callees still bail at decl==nil -- their
whole typecheck, arity included, stays task #51.
2026-08-09 01:33:14 +09:00
cf9d83b209 wcc: enums compare nominally; folded members keep their enum stamp
Two composing defects made a two-enum union mis-tag in wwstage
(live cs!=ww: `let e: (color|shape) = shape.BALL` stored tag 0 —
the color arm — while cstage stored 1). type_eq/typeeq had no
TY_ENUM arm, so ANY two enums fell into the primitive default and
compared equal; enums are nominal (harec: an enum IS its alias
type) and now compare by node identity only. Underneath, the
wwstage post-order revisit re-stamped the constant-folded enum
member (an N_INTLIT) as untyped_int, clobbering the enum stamp the
N_DOT fold applied, so the widen matcher fell to its first-variant
fallback -- the #59.9 N_BIN guard now twins on N_INTLIT (cstage
cexpr is single-pass and never clobbered).
2026-08-09 01:26:31 +09:00
4a5f64fc3d w6a: bare negative constant parses honestly; name(reg) rejects
Two parse.c operand defects. A bare `-8` (no $) double-negated to
+8: a_parsenum lets strtoll consume the sign, and the caller's
`off * sign` re-applied it (the D_INDIR arm never multiplied, which
is why -8(BP) always worked); the wwstage twin was already correct,
so this was a latent cs!=ww on hand-written source. The name(REG)
non-SB arm faked a D_INDIR off an UNCHECKED reg_lookup and silently
discarded the parsed ident and +disp -- both stages; the shape has
no encoding and now rejects loud.
2026-08-09 01:12:41 +09:00