Commit Graph

949 Commits

Author SHA1 Message Date
695983f7c3 ww: keep generated test support file-scoped 2026-08-14 04:20:29 +09:00
9b015e764c test: keep same-module imports live 2026-08-14 03:54:30 +09:00
04d9560d51 test: remove package-wide import assumptions 2026-08-14 03:45:02 +09:00
a841278333 test: prove declared package import semantics 2026-08-14 03:08:16 +09:00
028da6323e test: align package fixtures with Go semantics 2026-08-13 23:43:07 +09:00
9a2812347c test: prove recursive local package patterns 2026-08-13 23:42:54 +09:00
5d50788e46 test: prove local vendor package semantics 2026-08-13 19:18:05 +09:00
b84fb3ff25 ww: implement local vendor package semantics 2026-08-13 19:18:00 +09:00
088105413d test: prove internal package visibility 2026-08-13 15:38:03 +09:00
af0f56dfe5 test: make dynamic linker parity observer self-contained 2026-08-13 13:36:20 +09:00
dab3cb4998 ww: select build action from package declaration 2026-08-13 13:36:10 +09:00
b58c1f152a test: prove package universes beyond 256 actions 2026-08-13 08:08:53 +09:00
f45844ffa8 test: close long package reuse proofs 2026-08-13 05:57:16 +09:00
0cc5398cfe test: replace stale package selector limit fixture 2026-08-13 05:39:39 +09:00
5705c0e3fa test: prove long package identity semantics 2026-08-13 05:38:05 +09:00
4377634bb9 ww: preserve command package identities 2026-08-13 03:37:08 +09:00
cc6799c3b1 test: prove canonical directory package identity 2026-08-13 02:48:17 +09:00
853090174b test: follow canonical directory root artifacts 2026-08-13 00:59:59 +09:00
27a501fc31 test: prove command-global package action reuse 2026-08-13 00:54:12 +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
b373c445bd test: resolve byte-id fixtures as directory packages 2026-08-12 17:26:06 +09:00
3e7d2581cc test: cover directory-only import resolution
Exercise both real drivers with an earlier single-file decoy and a later canonical package directory, exact sorted unit ownership, direct export composition, deterministic package artifacts, transitive linking, stable file-only rejection, and a directory-package test import.
2026-08-12 17:13:07 +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
badde25fa9 test: cover driver-aware warm package reuse 2026-08-12 15:51:50 +09:00
470aacef95 test: cover package and runtime library roots 2026-08-12 15:18:51 +09:00
bb71b31f81 test: cover exact package tool invocation paths 2026-08-12 14:29:17 +09:00
f709a2c440 test: cover shared multi-directory package builds 2026-08-12 13:54:22 +09:00
02574c88f1 test: cover shared directory test build plans 2026-08-12 11:42:29 +09:00
7d25ad9f9f test: cover directory package test graphs 2026-08-12 03:46:58 +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
a04de3e02b bufio: make scanning bounded and incremental 2026-08-09 18:17:42 +09:00
134f0ceef0 test: delete unconsumed legacy inputs 2026-08-09 12:07:13 +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
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
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
53a9e94736 wcc: reject final-band integer overflow; restore rewind columns 2026-08-09 03:25:17 +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