diff options
| author | 2026-10-14 10:05:40 +0000 | |
|---|---|---|
| committer | 2026-10-14 10:05:40 +0000 | |
| commit | ce920b6ff47f32bc06dd27124e1b882f82f3d6ae (patch) | |
| tree | 89f3dac0aa670294053320599a742d670c0ec5a4 /tests/test_win.ps1 | |
| parent | todo: tick the parity runner; zc0 follow-ups it found (diff) | |
split compiler.zc into files by phase
src/compiler/compiler.zc is now twelve files under src/compiler/, listed in
order in src/compiler/parts. cat of the parts in order is byte-identical to
the old file, so every compiler and image except the language server's is
unchanged. no function was edited.
consumers read the list: the makefile, bootstrap-check, genmap (which still
writes one compiler.zc into a generated map directory), tinyvm.bat,
test.sh, test_win.ps1 and the lsp drivers. the language server embeds each
part and serves them joined as the one document tinyvm:/compiler.zc.
Diffstat (limited to 'tests/test_win.ps1')
| -rw-r--r-- | tests/test_win.ps1 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_win.ps1 b/tests/test_win.ps1 index 953e875..cb64f0b 100644 --- a/tests/test_win.ps1 +++ b/tests/test_win.ps1 @@ -57,14 +57,14 @@ try { & $cc -fwrapv -O1 -w src\tools\zc0.c -Isrc/core "-I$map" -o "$tempDir\zc0.exe" & $cc -fwrapv -O1 -w src\tools\mkgenome.c "-I$map" -o "$tempDir\mkgenome.exe" - cmd.exe /c "(type src\runtime\rt.zc & type src\core\core.zc & type src\compiler\compiler.zc) | `"$tempDir\zc0.exe`" > `"$tempDir\s0\g0.bin`"" + cmd.exe /c "(type src\runtime\rt.zc & type src\core\core.zc & for /f %f in (src\compiler\parts) do @type src\compiler\%f) | `"$tempDir\zc0.exe`" > `"$tempDir\s0\g0.bin`"" cmd.exe /c "`"$tempDir\mkgenome.exe`" < `"$tempDir\s0\g0.bin`" > `"$tempDir\s0\genome.bin`"" & $cc -fwrapv -O2 -w -DJTYPE=int src\core\core.c src\core\io_win.c -Isrc/core "-I$map" "--embed-dir=$tempDir\s0" -o "$tempDir\zy0.exe" $bzc = [IO.File]::ReadAllText("src\tools\build.zc") $rt = [IO.File]::ReadAllText("src\runtime\rt.zc") $core = [IO.File]::ReadAllText("src\core\core.zc") - $cp = [IO.File]::ReadAllText("src\compiler\compiler.zc") + $cp = (Get-Content "src\compiler\parts" | Where-Object { $_.Trim() } | ForEach-Object { [IO.File]::ReadAllText("src\compiler\$($_.Trim())") }) -join "" $combined = $bzc + [char]96 + $rt + $core + $cp [IO.File]::WriteAllBytes("$tempDir\in.tmp", [Text.Encoding]::ASCII.GetBytes($combined)) |
