346 Commits
Author SHA1 Message Date
waozi 6341665d64 Release Ziran 0.9.0
Publish website / build (push) Successful in 18m26s
Publish website / deploy (push) Failing after 25s
Build check / check (push) Failing after 31m26s
Build check / Publish a new Ziran version (push) Skipped
Promote Unreleased changes to Ziran 0.9.0, including full System V AMD64 C ABI host-library veneers in zx2native for Linux x86-64, JITDUMP support, static ar(1) host archive linking, guest file/clock services, Windows x64 unwind info, and AArch64/ARMv7 native ELF targets. Updated VERSION and site pages via update_version.sh.
2026-11-25 05:19:15 -03:00
waozi cf5e5e5ede Implement full SysV AMD64 C ABI in zx2native host veneers
Publish website / build (push) Successful in 19m20s
Publish website / deploy (push) Failing after 1m12s
Build check / check (push) Failing after 29m6s
Build check / Publish a new Ziran version (push) Skipped
2026-11-25 04:22:23 -03:00
waozi f6892d4f06 Link only included dependencies' native libraries
Publish website / build (push) Successful in 24m46s
Publish website / deploy (push) Failing after 25s
Build check / check (push) Failing after 45m39s
Build check / Publish a new Ziran version (push) Skipped
A project build now writes each locked dependency's modules and [package] links to a module-map.<digest>.links.tsv sidecar carried to the compiler child in ZIRAN_PACKAGE_LINKS, keeping the import map itself unchanged so pinned compilers still parse it. The native link credits a dependency's links once when the build includes one of its modules, matching generated C file names "<package id>_<module>" against the sidecar rows; the script lane keeps declaring links through LDLIBS because scripts see no map. The sidecar opens through the variadic open declaration, since calling open with a single argument left the flags register unset.
2026-11-25 00:30:39 -03:00
waozi 6531442e02 Link direct dependencies' native libraries in project builds
Publish website / build (push) Successful in 14m20s
Publish website / deploy (push) Failing after 24s
Build check / check (push) Failing after 20m49s
Build check / Publish a new Ziran version (push) Skipped
2026-11-24 23:18:44 -03:00
waozi 8c27b8e361 Move the website publish workflow to Gitea pages
Publish website / build (push) Successful in 17m49s
Publish website / deploy (push) Failing after 46s
Build check / check (push) Failing after 28m5s
Build check / Publish a new Ziran version (push) Skipped
2026-11-24 22:09:35 -03:00
waozi 522596d309 Publish native code as a JITDUMP under ZIRAN_JIT_DUMP 2026-11-24 22:09:26 -03:00
waozi 89c351f202 Reconcile ASSEMBLY status with the landed inspection and speed slices
M6a is recorded as landed: every Linux x86-64 ELF carries .eh_frame with
PT_GNU_EH_FRAME and zx2native --emit perf-map writes a bounded perf map,
retained by tests/machine_elf.sh and tests/assembly_cases.zi. The native
speed line now names what landed (Vec growth storage reuse with the Alpha
receipt, unique-use Insert-in-place and record copy sharing, frame-storage
sharing in the portable engine, and the dominance-scoped proof facts) and
what stays open, including the rejected borrowed-call experiment and the
unmeasured Alpha timing of the elision.

The README's stale stack-slot and unmetered-fuel description is replaced by
the register-allocated, fuel-checking machine-IR path and the measured
interim position. The loader JITDUMP publication is marked as an
uncommitted in-flight slice, not landed.
2026-11-24 15:19:16 -03:00
waozi eebd65eb86 Keep strictness through an at-or-below guard in the order closure
Build check / check (push) Failing after 16m3s
Build check / Publish a new Ziran version (push) Skipped
OrderReach composed the relations along a path with the weakest edge, so a
chain j <= i < count related j to count only as at or below and the view
read kept its check. A path is below as soon as one of its edges is: the
empty path is at or below and the composition keeps the stricter kind. The
proven-pointer cases gain the mixed chain beside the strict one; both the
outlined function and its inlined copy prove the read and print 20 on both
routes.

Open work records what the probe of the wasm-tier kernels found: under
--checks none of the five kernels has a guard-proven read, and a
count-bounded loop keeps its check because the count - 1 < count offset
edge needs a finite count interval. The Alpha timing of the elision stays
unmeasured.
2026-11-24 14:41:06 -03:00
waozi 18c3da3bad Prune landed native-speed items from open work
Vec growth storage reuse landed with its Alpha receipt, and the
dominance-scoped view and heap facts plus the order closure now live in
compiler_lowered_proven.zi. What stays: borrowed call arguments for the
machine-native call form with the Records-versus-C measurement, and routing
the closure through ProofKernel::DecideOrder once the proof kernel joins the
assembly module lists.
2026-11-24 14:19:36 -03:00
waozi c1c9b1453a Prove guard-dominated index reads in the shared LIR facts
Build check / check (push) Failing after 18m23s
Build check / Publish a new Ziran version (push) Skipped
Dominance-scoped guards: the comparisons a taken branch edge proves,
intersected over the ready predecessor edges of a block and carried across
blocks through value classes (a block parameter every predecessor edge
gives the same value, one record field extracted twice, a comparison an
edge passes down). A multi-variable order closure over the guards, interval
endpoints, non-wrapping offsets and constants proves an index non-negative
and below the count its address checks, whatever defines that count: a view
record field, the high - low of a scalar-replaced subview, or the index + 1
of a raw pointer. Wasm drops the check on LirProvenGuarded; a finite count
also bounds the no-check native form. A resize to a constant count roots
its heap block while every use stays in its block before the next resize,
call or trap; LirProvenCovers still refuses heap roots, so the machine
verifier re-derives global and frame roots alone.
2026-11-24 14:14:56 -03:00
waozi 75d9c32417 Reconcile ASSEMBLY plans with the landed implementation
Remove or narrow checklist items and status claims that the code and retained
tests already cover (lowered-IR schema/verifier, optimizer passes, ZX container
slices, native loader/selection, archive/unwind/perf slices), fix stale file
references, and record the remaining gaps and doubts with evidence.

Docs only; ASSEMBLY/10 also carries the other lane's uncommitted JITDUMP
landed-slice note.
2026-11-24 13:00:49 -03:00
waozi a8b65c0ed5 Drop the leftover cmd/zir historical references
Build check / check (push) Failing after 17m22s
Build check / Publish a new Ziran version (push) Skipped
2026-11-24 12:53:34 -03:00
waozi bfdf328931 Emit .eh_frame and a bounded perf map for Linux x86-64 AOT
Build check / check (push) Failing after 18m57s
Build check / Publish a new Ziran version (push) Skipped
The ELF carries one CIE and an FDE for every generated extent, including
_start and the built-in service veneers, with CFI rows at the actual prologue
and epilogue bytes; .eh_frame is mapped read-only in the first PT_LOAD and named
by PT_GNU_EH_FRAME. zx2native --emit perf-map writes the same bounded selection
as perf text lines, with source:line only from a debug attachment; the JSON map
is unchanged and another target fails with assembly.gap.perf-map.
2026-11-24 12:42:10 -03:00
waozi b7b712fec8 Point the benchmarks and workflows at bootstrap/runtime
Build check / check (push) Successful in 17m26s
Build check / Publish a new Ziran version (push) Successful in 1s
2026-11-24 12:32:52 -03:00
waozi b172b639a1 Refresh the bootstrap seeds from the committed sources 2026-11-24 12:29:32 -03:00
waozi 3fb0214c4d Register machine-archive explain code and fix Darwin errno
Build check / check (push) Successful in 13m36s
Build check / Publish a new Ziran version (push) Successful in 0s
2026-11-24 11:01:56 -03:00
waozi f72fb1f8cc Move the compiler host runtime to bootstrap/runtime and close S18
Build check / check (push) Failing after 18m35s
Build check / Publish a new Ziran version (push) Skipped
Move every remaining host C file and compatibility header out of cmd/zir into bootstrap/runtime (removing cmd/zir) and make bootstrap/runtime/ziran_bootstrap_runtime.h the single compiled contract across all 19 runtime C files without mixing hand-written and generated type views in one translation unit.

Shrink the Makefile and assembly.mk compiler source lists to generated modules plus bootstrap/runtime, wire the generated header prerequisites for all runtime C objects, enable --runtime bootstrap/runtime on check-bootstrap and update-bootstrap, update test/script paths (including explain_cases.zi scanning bootstrap/runtime and stubbing FrontendCacheDiagnostic in standalone diagnostic fixtures), refresh bootstrap/zi2c/zi2c.c for committed 41b5c006, and record S18 completion in plans/2026-11-14-self-hosting.md.

Proof: validate_runtime_boundary reports 0 problems; standalone fixtures (compiler_files_portable, sha256, diagnostic_android, compiler_runtime_windows, bootstrap_fixed_point) pass; make check-bootstrap JOBS=2 passes all 88 roots (stage 2 reproduces stage 1 byte-for-byte with --runtime bootstrap/runtime); make check JOBS=2 CHECK_JOBS=2 passed 266/269 with explain.sh and package_darwin.sh passing on rerun (remaining site_pages failure is another lane's uncommitted docs/ZX.md edit).
2026-11-24 10:59:35 -03:00
waozi 41b5c00628 Fix the three red master checks at their source
Build check / check (push) Failing after 22m46s
Build check / Publish a new Ziran version (push) Skipped
native_cache_parallel: the Ziran zi2c driver pruned stale generated
sources in a defer that ran after CompileExecutable, while the C driver
it replaced pruned them after lowering and before the compile step.
CompileExecutable collects every top-level C file in the output
directory, so a stale generated file from an earlier layout was compiled
and failed the build before the prune could remove it; the parallel native
build never reached its link gate and the fixture timed out. Prune before
the compile step again.

semantic_edit: the canonical-patch case used / as the edit root, so the
tool opened every system directory above the checkout for reading. A CI
lane under /var/lib/gitea-native-build (mode 0711) cannot read that
ancestor, and the tool correctly rejected the request. The case now uses
the test's work directory as the root with a nested relative path.

site_pages: regenerate site/guide/usage.html from the committed
docs/USAGE.md.
2026-11-23 22:25:11 -03:00
waoziandCommandCodeBot 611fc150f3 Document and wire the thorough and quickest build modes
Build check / check (push) Failing after 23m28s
Build check / Publish a new Ziran version (push) Skipped
--thorough builds the most checked program: --checks plus every optional
compile-time verification. --quickest skips only the optional compile-time
verification: the optimizer's input and per-pass re-verification and the
encoder's re-check of the program the allocator just verified. The
pre-optimization verification, the allocator's own post-allocation
verification and the .zx loader's verification of the bytes it receives stay
in both modes, and law evaluation is never cached. Default and --quickest
outputs are identical.

The policy lives in compiler_lowered_verify and
compiler_machine_verify_allocated; zi2zx, zx2native, zi2c and zi2go take the
switches, and the native build forwards the chosen one to zx2native.
tests/check_control.sh checks identical ZX, native and C output for the
default and quickest modes, the recorded runtime checks in thorough, and the
run results. plans/2026-11-24-check-control.md lists every optional step;
Alpha costs are still to be measured.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:41:24 -03:00
waoziandCommandCodeBot 5e3d47ab5f Keep every compiler cache out of the script cache's fingerprint
The script cache keys reuse over a content fingerprint of the source tree and
publishes only when the key is unchanged before and after the build. It
ignored its native directory alone, so a cache directory another compiler
cache creates under the same root (the frontend parse cache) changed the
fingerprint and the ready marker was never written. Ignore the whole cache
root, which is build output wherever it sits.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:41:11 -03:00
waoziandCommandCodeBot 6454f15dd1 Report a declaration's value at its own column
Declaration values and assignment targets now start at their own span
instead of the statement start, so `t := TextTrim(42)` reports the argument
at 3:19 with the caret under it. The change was reverted before because the
saved-IR codec shared a literal's text with its statement's source slice, so
editing diagnostic text changed the program and editing the typed literal
rejected the IR.

A literal's text is a value, not diagnostic text: the codec now writes it as
its own string instead of a slice of the statement, and the retained flow
checks (saved_binary_cases.zi) exercise both edits again. tests/caret_columns.sh
checks the exact column and caret for a value and for a statement.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:41:06 -03:00
waoziandCommandCodeBot dfab1aefe5 Keep the runtime move out of the archive build fix
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The previous commit took assembly.mk's whole working copy, including the
selfhost lane's in-flight cmd/zir -> bootstrap/runtime object paths. That
lane has not committed the files those paths name, so restore them here;
the move stays its owner's change. The archive module line remains.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:36:27 -03:00
waoziandCommandCodeBot 509a0445dd Build the archive module into the native runtime
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
compiler_x86_archive provides the ELF archive loader the machine pipeline
calls. Add it to ASSEMBLY_NATIVE_MODULES so libziran, and not only the
zx2native driver, carries it; without this a clean build of any program
that links libziran alone fails on the archive symbols.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:36:12 -03:00
waoziandCommandCodeBot 60da11a198 Trace the k-nucleotide fixed-array value copies
The for-each over the local [16384]s64 counts array loads the whole array
and allocates a second 128 KiB block for the view; the native image has two
movups copy loops before the digest loop, and the LIR shows the load and
allocate directly. Record the addresses, the LIR ids and the fix direction,
including the mutation/alias twin needed before changing the lowering.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:35:24 -03:00
waoziandCommandCodeBot 0909e33acd Describe native ELF images with sections and symbols
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The Linux x86-64 executable now carries a section header table after its
segments: .text, .rodata, .data, .bss, .symtab, .strtab, .dynamic and
.shstrtab. _start and every program function get a global function symbol
with its linked virtual address and byte extent, so disassembly, debuggers
and profilers can name what they see instead of relying only on the map
sidecar. The program headers still map the same bytes, and no section data
is mapped.

tests/machine_elf.sh checks the section table and the _start/main symbols;
tests/machine_elf_cases.zi checks the table describes the complete file.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:33:54 -03:00
waoziandCommandCodeBot 7921e6f9c5 Note the archive row in the target coverage plan
A Linux host registration may name an ar(1) archive; the executable links
the reached members and stays static, and everything outside that subset is
assembly.gap.machine-archive. The execution matrix already refuses emulated
or cross-compiled results as row evidence.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:27:16 -03:00
waoziandCommandCodeBot 6bd03a44ff Run a series of ziran commands in one foreground session
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
ziran serve reads one command line per line and runs each through the same
dispatcher, so check, build, run, test and the rest behave as they do from a
shell without paying the launcher's startup for each one; the frontend cache
keeps repeated compiles fast. The greeting and prompt go to standard error so
a piped session's standard output is only the commands' own, Exit or the end
of input leaves, a failing command does not end the session, a nested serve is
refused, and version keeps the launcher's spelling. It is never a daemon.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:20:38 -03:00
waoziandCommandCodeBot 4cb99e5476 Reuse a module's parse from a digest-keyed frontend cache
Parsing is the frontend's largest repeated cost: every build parses every
imported module again although its bytes and the inputs a parse can observe
rarely move. A clean parse is written in the saved-IR format under a digest
over the toolchain executable, the module text, its root, the import site's
parameter binding, the defines, the module paths, the package map and the
target, with a sidecar for the facts the codec leaves out, and the next build
loads that entry instead of parsing.

Only whole self-contained modules are reused; checking always runs on the
loaded parse. A module that splices another file with #load or #insert, or
that consults an imported module while parsing, is never stored, and nothing
is published unless the process ends without a diagnostic. --lint needs a
fresh parse and bypasses the cache. ZIRAN_FRONTEND_CACHE=0 disables the
cache and ZIRAN_FRONTEND_CACHE_DIR moves it. Profiling counts hits, misses
and stores. tests/frontend_cache.sh checks hits, misses, identical
diagnostics and IR, staleness, the exclusions and a damaged entry.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:20:05 -03:00
waoziandCommandCodeBot 8e43c2b378 Link static host archives into native ELF images
Build check / check (push) Failing after 2m2s
Build check / Publish a new Ziran version (push) Skipped
A NAME.library registration may name an ar(1) archive of ELF64 x86-64
relocatable objects instead of a shared object. The Linux executable
links the members its capabilities reach, once each, with their text,
read-only data, writable data, zero fill, GOT entries and relocations,
and each capability's veneer calls its member directly, so the image
stays static with no interpreter or dynamic record.

An unsupported section, relocation or symbol is the stable
assembly.gap.machine-archive diagnostic naming the capability, member
and symbol, and the previous output is kept. Windows images link no
archive yet.

Veneer groups now record their own end, so the write-time check accepts
the alignment padding before the next group instead of treating it as a
misplaced veneer.

tests/machine_elf.sh links and runs an archive, rejects a member with an
undefined symbol, and keeps the shared-library and Windows parity cases
green. The M5/M6 plan review is recorded in ASSEMBLY/milestones.md.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 21:18:09 -03:00
waoziandCommandCodeBot 98c5fdeec0 State the bootstrap runtime boundary
bootstrap/runtime/README.md names the only C the generated compiler may keep
behind it: process and argument startup, the call into the generated zi2c
root, checked allocation and release, panic and recovery transfer, and the
file, environment, process, time, thread and dynamic-library callbacks. It
also records that the host files still live under cmd/zir and move here when
the parser recovery port lands, so the boundary check can then run over this
directory in the fixed-point proof.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 19:16:07 -03:00
waoziandCommandCodeBot 410e968963 Build the compiler runtime for the Windows target again
Build check / check (push) Failing after 25m30s
Build check / Publish a new Ziran version (push) Skipped
The zi2c worker helpers included sys/wait.h and called pipe/fork/waitpid
unconditionally, and the editor host named O_NOFOLLOW/O_DIRECTORY/openat,
fchmod, fsync, pread, realpath, renameat and unlinkat unconditionally. The
Windows cross build could not compile or link the compiler archive.

The worker helpers now keep their POSIX bodies behind _WIN32 with ENOSYS
stubs, and the editor host reports every POSIX path walk as unavailable on
Windows while providing failing definitions for the POSIX calls the generated
editor module names. compiler_runtime_windows.sh compiles and links the
complete runtime again; semantic_edit still passes.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 19:15:56 -03:00
waoziandCommandCodeBot bd18274cdc Write the zx2native driver in Ziran
Build check / check (push) Failing after 56m57s
Build check / Publish a new Ziran version (push) Skipped
cmd/zx2native.zi replaces cmd/zx2native/main.c. It reads one verified .zx,
selects host providers (including the ZX Runner's built-in file and clock
services), runs the no-fallback machine pipeline, writes the platform ELF or
PE32+, and renders the text-relative map JSON. Host discovery walks
ZIRAN_HOST_PATH and the XDG host directories in name order, reads each
.library registration and links the first library that defines a capability.
The generated copy uses the assembly set's unprefixed entry points and links
assembly-core.o plus libziran.a, like zi2zx.

cmd/zir/zir_command.h lost its last user with this driver and is deleted.

Proof: a 104-case differential against the reference C driver over six ZX
programs (ELF, PE, map stdout and files, x86_64/aarch64/armv7, fuel,
selectors, JSON diagnostics, host gaps, preserved outputs, produced
executables' exit status) has identical stdout/stderr bytes, exit status and
output files; tests/machine_elf.sh and tests/print.sh pass with the ported
binary.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 19:06:04 -03:00
waoziandCommandCodeBot fa2cafab38 Prove the bootstrap fixed point from a manifest
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
bootstrap/manifest.txt lists every generated compiler root in dependency
order with its expected generated files, including the Darwin and SIMD copies
and the zi2c driver. scripts/bootstrap_fixed_point.py reads it, regenerates
each root, compares the checked-in seeds (and rejects stale seed files),
builds the next compiler from the generated stage through a BOOTSTRAP_ROOT
indirection, and proves that compiler reproduces the same C byte for byte.
validate_runtime_boundary rejects a runtime C function its header does not
declare, and atomic_update publishes a proved stage from a fsynced .next tree.
check-bootstrap and update-bootstrap call the script; update refuses unless
its own make check passes, and BOOTSTRAP_ONLY gates named roots while another
lane's seed is stale.

Proof: tests/bootstrap_fixed_point.sh passes through the check runner and
covers a clean match, a stage-2 mismatch, a stale seed file, a forbidden
runtime function, update refusal, a failed proof stage and recovery from a
leftover pending tree. In an isolated HEAD tree the script matches scan,
text and source, and names compiler_zir_lower as stale; the stage-root
bootstrap build compiled and linked.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 18:52:05 -03:00
waozi 3d407b9093 Carry the ZX Runner's file and clock services in x86-64 executables
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
A program that imported std/guest_files or std/guest_clock stopped at a
host-capability gap: no library provides host_api, and the ZX Runner was
the only thing that did. The x86-64 linker now recognizes the nine
services by function name and signature and provides them itself
(MachineX64HostBuiltin), apart from library imports: the ELF stays static
and the PE imports only what a veneer calls. Each veneer is emitted after
the library ones. Linux veneers make the system calls with the path in a
4 KiB stack slot; Windows veneers widen UTF-8 paths to UTF-16 and convert
listed names back, through kernel32 imports the image takes only when a
program uses the service. A read or a listing grows a heap block through
the runtime's resize entry and shrinks it to the final length. The
built-in veneers carry no unwind records.

tests/machine_elf.sh builds a program that writes, reads, renames and
removes files, lists a directory and reads both clocks, as a static ELF;
tests/zx_windows_parity_cases.zi runs the same program under Wine and
checks the exact kernel32 import list.
2026-11-23 18:45:29 -03:00
waoziandCommandCodeBot 2a2f1ad709 Take the editor's C declarations from the generated module
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
cmd/zir/zir_edit.h was the last hand-written declaration of the
ZiranEdit*/ZiranTool* interface. tests/semantic_edit_runtime.c now includes
compiler_edit.h, compiler_document.h and compiler_overlay.h from the built
module directories beside libziran, and the zi-edit rule no longer lists the
deleted header. semantic_edit passes with the same --wrap=renameat/fstat
boundaries.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 18:41:27 -03:00
waoziandCommandCodeBot 5c6b4ee7b9 Write the ziran api driver in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
cmd/zi_api.zi replaces cmd/zir-api/main.c: option order, checked program
loading, module selection by checked or imported name, the bounded JSON and
text surfaces, semantic identities, document spans, ownership and laws, the
std/vec builtin table and the KIND<TAB>SELECTOR<TAB>FILE.zi example sidecars
are Ziran. The one host call the driver needs, a regular-file sidecar read
with O_NOFOLLOW and an fstat regular check, joins zir_files_host.c.

Proof: 33 reference-driver differentials (scoped, symbol, id, imports-only,
limits, defines, saved IR, options after inputs, text mode, vec builtins,
error and framing cases, five example-sidecar failures) have identical
stdout bytes, stderr bytes and exit status; tests/zir_api.sh and
tests/api_discovery.sh pass with the ported binary while the old C main is
deleted.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 18:37:13 -03:00
waozi d1de9152a0 Add ziran test and unused-name lints
Build check / check (push) Failing after 43m16s
Build check / Publish a new Ziran version (push) Skipped
ziran test FILE.zi ... runs every file the way ziran run --target=c does, prints one PASS or FAIL line per file followed by ziran test: N passed, M failed, exits 1 when any file fails, and keeps running after a failure. ziran check --lint now warns about a local that is never read and a named import or foreign declaration its module never spells (lint.unused_local, lint.unused_import); open and using imports are not judged by spelling, and unused NAME keeps a deliberate local quiet. Both codes are in the explain registry, tool_diagnostics covers the driver and the lints in text and JSON form, and docs/USAGE.md describes both. The lints over cmd/ found seven unused imports and five unused locals outside the self-hosting drivers; those are removed or marked.
2026-11-23 16:50:37 -03:00
waozi 8eb8bf24a4 Give Windows consoles each line once it ends
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The PE32+ runtime wrote buffered standard output in whole buffers, so a
program that printed before working showed nothing until it exited. The
buffered runtime now asks GetConsoleMode once, as the Linux runtime asks
ioctl TCGETS: a console gets each line once it ends and a redirected
descriptor keeps whole buffers. An image with more than one console call
imports GetConsoleMode beside GetStdHandle, WriteFile and ExitProcess.
The Windows parity test runs a paced program under a pseudo-terminal on
both systems and times its first line.
2026-11-23 16:36:33 -03:00
waozi 7fb6a9f878 Report several parse errors per file and explain the ambiguity codes
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
ParserWithRecovery now blanks the top-level declaration that failed and parses the file again, so one damaged file lists every broken declaration (up to eight regions per file) instead of only the first. Each retry keeps the file line numbers; a retry that reaches the same unterminated construct again prints nothing twice. A recovered parse still fails the command: the blanked text only gathers diagnostics. Recovery copies are allocated outside the operation memory scope so its failure cleanup cannot free what the retry still reads.

module.ambiguous and package.ambiguous join the explain registry (both diagnostics already list the matching modules), and tests/explain.sh asserts them.
2026-11-23 16:05:54 -03:00
waozi daac1b4668 Write x64 unwind data in Windows PE32+ images
Build check / check (push) Canceled after 3m24s
Build check / Publish a new Ziran version (push) Canceled after 0s
Every function with a prologue now carries a .pdata RUNTIME_FUNCTION and a .xdata UNWIND_INFO record that walks the pushed frame pointer and the stack allocation. The record starts where the frame does, after an early return that leaves before any frame exists. The Windows parity test decodes each record against the prologue bytes.
2026-11-23 15:53:12 -03:00
waoziandCommandCodeBot c885ed06a2 Write the zi2zx driver in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
zi2zx's command decisions, library linkage text, retained roots, assets,
ZX/LIR/optimization-report outputs, .zx inspection and run preflight are a
Ziran main compiled against the assembly set's own headers, matching
assembly-core.o's unprefixed entry points. The old C driver is deleted.

Proof: build modes, runs on the native and engine backends, source runs and
.zx inspection are byte-identical to the previous binary; zx_module_build,
package_zx, compile_targets, cli_defines, machine_elf, global_owned_storage,
local_owned_fields and all nine zx_* checks pass.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 15:43:36 -03:00
waoziandCommandCodeBot 6f4f4c9cb7 Write the zi2c and zx2wasm drivers in Ziran
Build check / check (push) Failing after 22m19s
Build check / Publish a new Ziran version (push) Skipped
zi2c becomes a Ziran main: option tables, context, loading, linking,
capability checks, entry selection, emission workers, SIMD helper finish
and pruning are Ziran. fork/pipe/read/write/waitpid with EINTR and error
text stay in zir_command_host.c. Its own driver is generated by the
bootstrap compiler and checked in as bootstrap/zi2c/zi2c.c for BOOTSTRAP=1;
check-bootstrap and update-bootstrap compare and refresh it.

zx2wasm becomes a Ziran main that names the engine-prefixed Wasm lowerers
directly, replacing the engine_names.h object include.

Proof: 133 tests/spec files, old vs new binaries, identical diagnostics,
exit codes and emitted .zir/.go/C bytes; 48-file worker batch; --exe,
--release, --checks, --prune-stale and bad-input parity. zx2wasm matches
on the retained ZX corpus, stdout, --unbounded and defaults. zx_wasm.sh,
compile_*, c99_target, go_*, simd_go, tool_names and cli_defines pass.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 15:36:09 -03:00
waozi ebe455c8ea Name the portable scalar subset in the ZX target contract
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
Pointer-sized isize and usize lower as 64-bit scalars with size_of 8, and a
#c_call procedure type stays native-only and rejected on this target. Record
both beside the target contract, where the subset is described.
2026-11-23 15:28:19 -03:00
waoziandCommandCodeBot 39956661b4 Write the zi2zir and zi2go drivers in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
Both tools now build from a Ziran main compiled by zi2c: option tables
come from compiler_cli, program loading/linking/capability checks call
the existing generated entry points, and the backends are unchanged.
The old C drivers are deleted.

Proof: 133 tests/spec files, old vs new binaries, identical diagnostics,
exit codes and emitted .zir/.go bytes; --exe, --minify, --checks,
--prune-stale and bad-entry diagnostics match. compile_targets, simd_go,
go_codegen, go_semantics, go_exports, tool_* and cli_* checks pass.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 15:26:38 -03:00
waoziandCommandCodeBot 17a6dbf636 Bootstrap command-line mechanics and source editing in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
compiler_cli replaces the inline rules of zir_command.h; the header keeps
the C drivers' call syntax as wrappers over the generated module. Process
niceness stays behind zir_command_host.c.

compiler_edit replaces zir_edit.c with the same ZiranEdit*/ZiranTool*
symbols. POSIX open flags and struct stat fields stay in zir_edit_host.c,
so one seed serves every host; path walking, overlay validation, semantic
ranges and atomic replacement are Ziran. tests/semantic_edit.sh now takes
the symbols from libziran.

Both seeds regenerate byte-identically; cli_defines.sh, atomic_cli_link.sh,
tool_names.sh, tool_diagnostics and semantic_edit.sh pass.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 15:16:36 -03:00
waozi 300bcbaf24 Document std ZX library boundary and verify std/utf8 shared library build
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
2026-11-23 15:07:25 -03:00
waozi 7417dcf6ae Lower isize and usize as 64-bit scalars on portable ZX
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
2026-11-23 15:05:45 -03:00
waozi 5ee3854568 Add per-library host capability grants to ZxModuleLoaderConfig
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
2026-11-23 15:01:18 -03:00
waozi 72319359da Write standalone ARMv7 ELFs from native ZX
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
zx2native --target armv7 --platform linux|android now writes a static ELF32
EM_ARM EABI5 executable for verified ZX, matching the AArch64 writer, with
no loader, libc or foreign object. compiler_armv7_runtime.zi emits the exit
and write-all routines as A32 words in Ziran source: the EABI call number
goes in r7 and the kernels are reached with svc 0, and the writer uses only
the registers a call may clobber.

compiler_armv7_elf.zi lays out the headers, entry stub, code, trap stub,
runtime, read-only globals and a page-separated writable segment, then
resolves each image relocation: MOVW/MOVT halves take the absolute address
of their symbol, and a BL takes its displacement from pc + 8. The entry stub
sets the stack limit from the process stack, calls each initializer, calls
the entry and ends through the runtime's exit; the trap stub stores the code
and exits 125.

A program whose image needs a facility this row does not carry fails before
output with assembly.gap.machine-platform-service-unavailable naming the
row. tests/machine_elf.sh now checks both ARM images' headers and keeps the
named-gap check on a formatter program.

Verified on the Moto e6 play: hello and a looping sum run as ELFs for both
linux and android, recorded in
bench/results/zx-armv7-elf-moto-2026-11-23.json. Local make check and make
check-bootstrap pass. M4's rows are all closed.
2026-11-23 10:20:12 -03:00
waozi cd43ef4610 Write standalone AArch64 ELFs from native ZX
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
zx2native --target aarch64 --platform linux|android now writes a static
ELF64 executable for verified ZX, with no loader, libc or foreign object.
The runtime is Ziran source: compiler_aarch64_runtime.zi emits the exit and
write-all routines as AArch64 words, so the console path is the same
maintained code the x86 image uses, not a byte blob.

compiler_aarch64_elf.zi places the entry stub, code, trap stub and runtime,
page-aligns the data segment so its virtual address follows its file offset,
and resolves every image relocation at link time: MOVZ/MOVK halves take the
absolute address of their symbol, and a BL takes its PC-relative
displacement. The stub sets the stack limit from the process stack, calls
each initializer in order, calls the entry, and ends through the runtime's
exit with the entry's status; the trap stub stores the code and exits 125.

A program whose image needs a facility this row does not carry - a
formatter, a host binding, the resize allocator - fails before output with
assembly.gap.machine-platform-service-unavailable naming the row instead of
emitting a broken image.

Verified on the Pixel 4a: hello and a looping sum run as ELFs for both
linux and android, recorded in
bench/results/zx-aarch64-elf-pixel-2026-11-23.json. Local make check and
make check-bootstrap pass. ARMv7 keeps its named gap until it has the same
runtime and an ELF32 container.
2026-11-23 10:03:52 -03:00
waoziandCommandCodeBot 9f0288b60f Bootstrap compiler profiling in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
cmd/compiler_profile.zi replaces zir_profile.c: opt-in phase, allocation
and counter samples, the JSON-lines report, its lock and its one-time
state. zir_profile_host.c keeps only the OS side: the monotonic clock,
peak RSS, the process id, the EINTR-safe one-append write and the exit
hook that flushes the report. The generated seed is
bootstrap/compiler_profile.

Proof: for the same zi2c run with ZIRAN_PROFILE set, the Ziran report has
the same keys, the same six phases with the same call counts, the same
five counters and the same 179 workspace allocation calls as the C
build. check-bootstrap matches the seed. The full retained suite ran 257
of 264 while the assembly lane was rebuilding the shared tools; every
failure belongs to that churn or to that lane's machine-ELF work:
install_user, direct_assembly, verified_loading_cases, zx_windows_parity
and checks_granularity_cases pass when rerun alone.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 09:57:04 -03:00
waoziandCommandCodeBot 321a82ab6e Bootstrap the executable ZX engine facade and its Wasm provider in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The executable engine's bundle reader, host-call translation, instances
and module state now build from Ziran (compiler_zx_exec_bundle.zi,
compiler_zx_exec_hosts.zi and compiler_zx_exec_instance.zi, loaded into
compiler_zx_exec), and its WebAssembly tier is compiler_zx_exec_wasm.zi.
The Linux i386 block compiler stays C as zir_exec_i386.c, and
zir_zx_wasm_install.c keeps the load-time provider install.
zir_host_exec.c, zir_zx_wasm.c and zir_zx_module_internal.h are deleted;
the host-call thread slot is S15ThreadEngine in zir_atomics.c.

compiler_check lays a procedure value out as its context and code (16
bytes, alignment 8), so a record holding one has a size.

Proof: a reference build with the C facade and this build gave identical
bundles, diagnostics and engine and native run results for all 185
programs with a main entry (121 rejected alike, 64 bundles). The full
retained suite passes 263 of 264; the only failure is another lane's
in-flight machine_elf test, which an isolated HEAD-plus-this-change tree
passes. check-bootstrap matches every module, the Windows runtime
compile and link check passes, and the wasm32 lifecycle host passes all
13 checks.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 09:37:46 -03:00
waoziandCommandCodeBot 570ab22464 Target Android SDK 33 so current Play Protect accepts the APK
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The Pixel 4a refused the SDK 28 package with
INSTALL_FAILED_VERIFICATION_FAILURE, saying the app was built for an older
Android. Min SDK stays 28; the console and Kryon pixmap bundles still run on
the Moto E6 Play (Android 9), a Pixel 3a (Android 12) and the Pixel 4a
(Android 13), and the runner is installed on all three.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 09:33:44 -03:00
waoziandCommandCodeBot 82004ab6e4 Release Ziran 0.8.0
ZX Runner installs the `zx` command: `make install-user` registers the
.zx file type and a desktop entry, so file managers open bundles with
the toolchain's runtime. Linux wraps the window, drawing and input
capabilities and Android ships the same runner as an APK. Hosted ZX
applications can open from a read callback with a smaller instruction
store, and `ziran run app.zx` hands a bundle only to a runtime provider
built by the same toolchain.

The compiler now builds mostly from Ziran source, bootstrapped from
generated C seeds: parsing, module discovery, compile-time evaluation,
IR cleanup, the frontend IR, diagnostics, SHA-256 and law checks, the
checker with generic linking and borrow analysis, the C and Go backends
with their SIMD and x86-64 assembly emitters, the checked IR codec,
module loading, locked package resolution, ZX asset collection, entry
linking and inline assembly. Native AArch64 and ARMv7 images build with
indexed relocation lookup.

The section also records the removals: std/rss_scan and
std/http_get_linux are gone in favor of std/net_http, with migration
notes. update_version.sh set VERSION, the site version strings and the
standard-library inventory (137 modules), and site_pages.py regenerated
the module pages for 0.8.0 and now links releases at the Gitea origin.
Its webp filter matches the package README's plain test command, so the
published page carries no legacy comparison.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 09:19:36 -03:00
waoziandCommandCodeBot 6031c3e35c Keep the Android runner to one program per process
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
RunnerActivity runs in the :runner process, and that process ends after a
run or after the error dialog is dismissed. A console bundle, and a failure
before the first frame, paint one plain frame when the bundle never did, so
the activity no longer waits on an undrawn starting window and blocks input
dispatch. The launcher keeps its own process, its picker and its recent
list, so a finished run cannot spoil the next launch.

Verified on the Moto: a picked console bundle runs from the app-private
copy, exits 42, and returns to the launcher; the Kryon button bundle still
renders and counts a tap.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 09:18:42 -03:00
waoziandCommandCodeBot c58823f2a9 Host ZX bundles in a ZX Runner Android app
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
packaging/android builds the same runner sources as `zx` into an APK for
armv7 and aarch64. cmd/zx_runner_capabilities.zi selects a window host by
build; zx_runner_window_android.zi answers std/guest_window through a
NativeActivity's EGL surface, and zx_android.c presents each RGBA frame as
one letterboxed texture, maps touch and key input back into the bundle's
pixels, logs the runner's output, and shows a failure in a dialog. The
launcher picks a program and keeps a recent list, and the app registers
application/x-ziran-bundle and *.zx for VIEW and SEND.

Verified on a Moto (armv7, Android 9) and a Pixel 3a (aarch64, Android 12):
the console bundle prints and exits 42, and Kryon's pixmap button bundle
renders its page and increments its counter on a tap. The APK is installed
on both.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 09:12:49 -03:00
waozi f52d16dff5 Index native image relocations on ARM
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The shared ARM image builder looked up each image relocation's machine
operand by scanning every machine relocation in the program, while x86-64
already walked a per-instruction index. Build MachineRelocationIndex once
per image and let ImageOperand visit only the relocation's own instruction,
so building an AArch64 or ARMv7 image costs relocations plus the instructions
that carry them, not their product. Both devices pass the 81-program parity:
bench/results/zx-android-parity-moto-2026-11-23.json and
bench/results/zx-android-parity-pixel-2026-11-23.json.

Closes M4 rows 5 and 6; row 7 remains in plans/2026-11-15-m4-native-arm.md.
2026-11-23 08:56:25 -03:00
waozi 7d80c7bb2a Build a ZX library from a project
Build check / check (push) Failing after 23m52s
Build check / Publish a new Ziran version (push) Skipped
`ziran bundle --library NAME --export module:function` now works in a
project: the manifest's [exports] files are the module inputs,
--require-module and --import pass through to zi2zx unchanged, and no app
entry is injected. A build that names both --library and --entry keeps
zi2zx's one diagnostic naming both flags, including when -o's .zx value is
the final argument.

tests/zx_module_build.sh builds the standalone and project images, checks
the forwarded linkage, loads the project image from a module root with
`ziran run --module-root`, and covers the refusal.
2026-11-23 08:48:49 -03:00
waozi fa29de923b Add generated ZX Runner app and .zx file-type icons
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
Export matching generated artwork for ZX Runner (org.ziran_lang.zx) and
the .zx file type (application-x-ziran-bundle) to Linux hicolor sizes
16x16 through 512x512 and Android adaptive icon layers. Install the
hicolor icons in install-user and verify them in tests/install_user_cases.zi.
2026-11-23 07:36:28 -03:00
waoziandClaude Opus 5.5 4787a8d35c Fit another module's procedure to a slot; keep same-named records apart in ZX
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
A procedure taking *Vec(Item) did not fit a slot type
RunProc :: #type (args: *Vec(Item)) -> bool declared in another module:
callback_type_equal took the two modules' copies of Vec(Item) for two
types because they are two records. It now accepts copies under one name
that apply the same template to the same types, as same_declared_type
does.

Two modules with their own file-private State each have a Vec(State)
under one instance name and with the same body text. Lowering took name
and text for one type, so the second module's states[0].dir looked for
dir in the first module's State: "record member has no lowered field
identity" in ziran bundle and zi2zx, while ziran check and C passed.
Lowering now aliases an instance only when it applies the same template
to the same argument types.

tests/tool_diagnostics_cases.zi adds slot_vec and private_records, which
also run as ZX bundles. Seeds for check_value and zir_lower; the
zir_lower seed also carries c041afb6's change to compiler_zir_lower.zi.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 06:18:22 -03:00
waoziandClaude Opus 5.5 4b70f4db7d Refresh the check_program seed for the zi_ generated-name prefix
c041afb6 changed cmd/compiler_check_program.zi without its seed, so make
check-bootstrap failed on check_program.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 06:18:22 -03:00
waozi bb8e9b1b92 Give zx bundles a window: std/guest_window on SDL2
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
A bundle opens one window, draws its own RGBA pixels and presents them,
and takes pointer, wheel, key (GLFW numbering), text, resize, focus and
close events, with cursor, text input and clipboard. It runs its own
loop. cmd/zx_runner_window.zi answers the set on SDL2; zx is built with
it when pkg-config finds sdl2, and without SDL2 a window bundle is
refused with its capabilities named.

The install_user check opens a window through the installed zx on a
private Xvfb and reads its size back.
2026-11-23 06:12:08 -03:00
waoziandCommandCodeBot c041afb6de Reserve the whole zi_ generated-name prefix
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
`reserved_declaration` rejected only `zi_default_`, so a program could still
declare `zi_new`, `zi_ref` or a `zi_` SIMD helper name the compiler and its
backends spell themselves. It now rejects every `zi_` name.

Two families stay allowed because the compiler writes them itself: the
default-parameter helpers (`zi_default_<_field_>`), and the declarations marked
generated in the IR, which cover nested local procedures (`zi_local_`), enum
member adapters (`zi_enum_name_`) and the C backend's own `zi_print_` helpers.
The saved-IR path re-checks those, so exempting only the source parser's
spelling failed there; `lowered_exec` caught it.

The seven file-local kind helpers in `cmd/compiler_zir_lower.zi` move off the
prefix, and the explain entry now describes the wider rule.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 06:03:45 -03:00
waozi 64de51ca06 Release whatever tested VERSION is untagged and keep master checks current
Build check / check (push) Failing after 31m5s
Build check / Publish a new Ziran version (push) Skipped
The release step published only when VERSION changed in that exact push and
master still equalled the tested commit when the check ended. On a busy master
behind a 40-minute check, that release would never publish. It now publishes
when no v* tag holds VERSION, VERSION is above the newest tag and the tested
commit is on master, so any later passing master check can publish it.

Each master push queued another full check on Build's one native lane, so
results fell hours behind. One check now runs per ref, and a newer push
replaces the check still waiting. Cancelling the running check instead would
let frequent pushes stop every check before it finishes.
2026-11-23 06:01:28 -03:00
waozi 6a2e04fca0 Bootstrap the ZX console services in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
cmd/compiler_zx_exec.zi now holds the platform console services of
revision-28 executable ZX (zir_exec_console.h): ZxPlatformService,
ZxConsoleOpen/Write/Flush, ZxBindConsole with one print procedure per
service, and ZxExecProblemText. They leave cmd/zir/zir_host_exec.c.

The module is the first stage of the engine execution facade. It is
generated with the instruction engine from the same command and defines,
and its object is compiled under the engine's private names, so its calls
reach the engine libziran carries while its own entry points keep their C
names. This completes the Makefile rules that d6cf0432 already carries.
CompilerStandardOutput joins CompilerStandardError in zir_diagnostic_host.c.
2026-11-23 05:59:15 -03:00
waozi d6cf04323c Host bundles in-process in zx and give them files, clock, arguments and assets
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
zx now opens the bundle with the linked runtime (std/bundle_host), binds
every capability it imports from its own table and runs it natively. A
capability it lacks is named in the error; nothing else runs the app.

The base capabilities are declared in std/guest_assets (the bundle's own
embedded files), std/guest_clock, std/guest_files and std/guest_process
(arguments and environment), and answered by
cmd/zx_runner_capabilities.zi. Before this a bundle could only print.
The install_user check runs a bundle that copies an embedded asset to a
file named by its argument and reads it back.
2026-11-23 05:56:43 -03:00
waozi 777116fd67 Regenerate the AVIF package page
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
Its README shows the test commands without the build-queue wrapper.
2026-11-23 05:55:54 -03:00
waozi 39c99ca6ff Say what changed when an artifact is not published
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
`ziran pkg artifact` refuses to publish when a recipe input, the
package's ziran.toml or the source of a package in the graph changes
while the provider runs. It reported that as "artifact provider failed
or omitted a declared output", which sent AVIF's `make test` after a
provider that was fine: its ten-minute native build ran while the Ziran
checkout it uses as an override was being edited.

The message now names what changed and asks to run again. The fixture
provider can edit its checkout during the build and package_artifacts
expects the new message; the package guide says so.
2026-11-23 05:51:01 -03:00
waozi a097975fae Bootstrap the hosted ZX module runtime in Ziran
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The runtime of include/ziran_zx_module.h now loads into compiler_host_api
from two files and replaces cmd/zir/zir_zx_module.c:

- compiler_host_api_linkage.zi reads a module's linkage text and its
  dispatch and runtime-service ABI, finds libraries under the loader roots
  or through its resolver, and checks the dependency graph with an
  explicit stack.
- compiler_host_api_modules.zi holds the loader, application programs,
  library instances behind handles, export calls through the dispatcher,
  hot replacement with state migration, and the zx_module services.

The C interface and its diagnostics are unchanged. Only the stat identity
check stays in C, as S15FileIdentity in zir_files_host.c beside the other
file probes.
2026-11-23 05:50:12 -03:00
waoziandCommandCodeBot 2ad2bc45c2 Assert that ziran init keeps the project's toolchain ref
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The merge rule already keeps a project's own `[toolchain] ref` and reports
`kept ref = ...; the template has ...`, but nothing exercised it: the template
fixtures all share `ref = "master"`, so keeping and adopting looked the same.
Set the project's ref to a distinct value, run `init`, and require both the
report and the surviving value, then restore the fixture and relock it.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 05:38:23 -03:00
waozi 310ef0f841 Regenerate the WebP and CLIP tokenizer package pages
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
Their READMEs no longer wrap the test commands in build-queue, which is
gone; the rendered package pages follow.
2026-11-23 05:33:22 -03:00
waozi 3e6c195401 Run the quick Ziran build on Build's primary host slot
Gitea's native admission refuses every job to a shared runner that carries
a build-native-* label, so the primary slot's label is now build-primary.
ccache is installed on the Debian host, where ci_packages.sh cannot run.
2026-11-23 05:33:15 -03:00
waoziandCommandCodeBot b82a57df11 Run the ten one-line check launchers from the check plan
Build check / check (push) Canceled after 0s
Build check / Publish a new Ziran version (push) Canceled after 0s
The launchers only started one Ziran check program, so each becomes a
`check_programs` row that takes the compiler path the same way: `gzip` keeps
its `zi2c` argument (a new `compiler` field) and `executable_bundle` keeps the
`LDLIBS` library and `cmd` module path. `constant_time` and `queue` shared the
check-bundle-run shape, so `spec_selftest` bundles both source and saved
checked IR for each and compares the printed result, which is stricter than the
scripts it replaces. The suite is 263 checks, down from 273.

Also records the owner's queue decisions in plans/open-work.md: check control,
`ziran serve` after the cache, metaprogramming last, and the three dropped
items.

Co-authored-by: CommandCodeBot <[email protected]>
2026-11-23 05:32:46 -03:00
waozi 9c343e3f84 Check master pushes on Ziran's native Build runner and add the release job
Build check / check (push) Failing after 1h30m19s
Build check / Publish a new Ziran version (push) Skipped
5db3d3c3 routed master pushes to the repository's native Build runner
and added a release job; 51e4505d dropped both again by accident while
the working copy kept them. They are back, with the shared slot named
build-primary for other events: Gitea reserves the build-native- prefix
for repository lanes, so no runner served build-native-primary.

On a master push the check runs through gitea-native-build on
build-native-ziran, whose host already has the packages the install step
would fetch. The release job needs that check and runs
scripts/release_gitea.py, which publishes a version only when VERSION
advanced in the push; VERSION is unchanged here, so this push publishes
nothing.
2026-11-23 05:31:38 -03:00
waozi 3f8c4b99bf Bootstrap the ZX command runner in Ziran
Build check / check (push) Canceled after 0s
cmd/compiler_zx_run.zi replaces cmd/zi2zx/zx_exec_run.c: console-bound
command runs on the instruction engine, NAME=SHA256=PATH module images
checked by digest, dependency module loading from roots or the image map,
the portable entry check, and the lowering, optimization and executable
ZX writing behind zi2zx's ZX, LIR and optimization-report views. Its
records match cmd/zi2zx/zx_exec_run.h field for field, so zi2zx/main.c and
the web bundles call it unchanged.

The native tools generate it with the assembly set; the web playground
compiles its bootstrap seed beside the lowering seed, under the engine's
private names.
2026-11-23 05:29:02 -03:00
waozi d47761f38c Expect the reworded missing-provider message in direct_assembly
Build check / check (push) Canceled after 0s
5ec1bf02 split the rejected --bind message into its cases. The direct
assembly check still looked for the old combined wording; it now expects
"exported Ziran provider is missing: ...; no module missing exports
Provide", the case it sets up.
2026-11-23 05:17:44 -03:00
waozi 399160b629 Add ZX Runner: the zx command, the .zx file type and its opener
Build check / check (push) Canceled after 0s
zx app.zx runs any bundle with the toolchain's runtime, as Linux runs
an ELF file, and hands it to no other program. It explains a file that
is not a ZX program or uses an older or newer ZX format, names a bundle
that needs capabilities it lacks, and shows failures in a dialog when
started without a terminal.

make install-user installs zx, the application/x-ziran-bundle type
(*.zx and the ZX\0\0 header), the org.ziran_lang.zx desktop entry and
makes it the default opener. The install_user check covers all of it.
plans/2026-11-23-zx-runner-platform.md holds the remaining stages.
2026-11-23 05:05:12 -03:00
waozi 5ec1bf02f5 Say which side of a rejected --bind is missing, or who already binds it
Build check / check (push) Canceled after 0s
A --bind that failed said only "host capability or exported Ziran provider
is missing or already bound". It now names the case: a host capability
the module does not declare, a provider the module does not export, or a
capability already bound by another provider, with both providers and
their files. A model that had two files exporting Frame could not tell
which one competed.

tests/host_bindings_cases.zi checks all three messages.
2026-11-23 05:01:14 -03:00
waozi 4499383fb7 Bootstrap the ZX embedding API in Ziran
Build check / check (push) Canceled after 0s
compiler_host_api replaces zir_host.c, the implementation of
include/ziran_host.h: opening bundles from files, bytes, owned bytes and
read callbacks, their SHA-256 code identity, capability ABI comparison,
binding validation and backend selection, instances on the instruction
engine, native code or a wasm provider, run control, module state export
and import with its 16 MiB budget, and hot-swapped components. It is one
module read from compiler_host_api.zi and compiler_host_api_state.zi; its
records mirror ziran_host.h field for field and it exports the same C
functions, so embedders, zi2zx and the hosted module runtime link it
unchanged. libziran builds it beside the engine, native and wasm layers it
calls; its seed is under bootstrap/compiler_host_api.

Only the target checks stay in C: zir_host_native.c now answers
BundleNativePlatformBackend and BundleAutoPlatformBackend, the
__EMSCRIPTEN__ and Linux CPU #if tests the embedding API asked before.

libziran built with zir_host.c and with the port exports the same 65
Bundle* and ZxRunControl* functions, every one ziran_host.h declares.

C's long is pointer-sized on wasm32, so ftell and fseek here and strtol
in compiler_inline_asm are declared with isize; a 64-bit declaration made
wasm-ld replace those calls with traps in the web builds of libziran.
2026-11-23 04:57:14 -03:00
waozi ccc44bd825 Test and document nested rows, the stopped-check note and package API queries
Build check / check (push) Canceled after 0s
tool_diagnostics builds and runs a nested array literal, expects the
note under a syntax error and that another file's errors are not listed
with it, and checks that `ziran api` text lists fields and members.
package_zx queries `css/Api` and `kit/Kit` in a project, puts an option
after the file and expects the error for a module that does not exist.

The reference documents `using X :: #import`, nested array literals and
`ziran api PACKAGE/MODULE`; the API discovery guide describes the
project forms. Guide pages and llms.txt regenerated.
2026-11-23 04:52:46 -03:00
waozi a595d4400d Print a package module with ziran api PACKAGE/MODULE
Inside a project `ziran api` needs no --project, and a module is named
as an import names it: `ziran api kryon/button` or `--module
kryon/button`. The launcher turns the dependency alias into its package
identity, so the same module name in two packages stays apart; a
standard module is `std/NAME`. Options may follow the input files, which
used to be read as more files. A name that selects no loaded module is an
error listing the modules instead of an empty result. Text output lists a
record's fields and an enum's members on the type's line.
2026-11-23 04:52:46 -03:00
waozi 07533fba59 Say under a syntax or import error that checking stopped there
A syntax or import error ends `ziran check` before any other file is
checked. A model probing one file read the missing errors of that file as
a clean result when an earlier file had such an error. The error now
carries a line, like its excerpt and fix lines: "note: checking stopped
at this error; errors after it, in this file and in other files, are not
listed until it is fixed". JSON output keeps one record per diagnostic.
2026-11-23 04:52:46 -03:00
waozi fd895bcf5e Type a nested array literal row by the element type
`table: [3][3]string = .[.["a", "b", "c"], ...]` failed with one "array
initializer element type mismatch: [3]string" per element. An untyped
`.[...]` is given the declaration's type when it is parsed, and a row
inside another literal kept that whole type instead of the element type.
The array literal check now gives such a row the element type, so nested
literals work at file scope and in procedures, as the `.{.{...}}` form
already did. Seed for compiler_check_expr.
2026-11-23 04:52:46 -03:00
waozi 95187576c9 Put the guide pages back to the committed docs
The previous commit rendered usage and zx from docs/USAGE.md and
docs/ZX.md edits that are still uncommitted in the working copy, so the
pages ran ahead of the committed docs. They are back to what the
committed docs render; the pages change with those doc edits.
2026-11-23 04:29:56 -03:00
waozi f82b47982a Regenerate the guide pages for the inline assembly and link docs
docs/USAGE.md and docs/ZX.md changed with the self-hosted entry linking
and inline assembly commits; their rendered guide pages were left stale
and the site check failed on them.
2026-11-23 04:29:28 -03:00
waozi 1866499455 Bootstrap inline assembly checking and C emission in Ziran
Build check / check (push) Canceled after 0s
compiler_inline_asm replaces zir_asm.c and zir_asm.h: reading #asm
variants as the source reader keeps them and resolving their constant
arguments, the register, clobber and template checks, block bindings and
the checked operand metadata the Go assembler reads, and GNU C emission
with isolated feature helpers, cached runtime selection and the
ZIRAN_ASM_CHECK comparison build. It is one module read from three files
(compiler_inline_asm.zi, compiler_inline_asm_check.zi and
compiler_inline_asm_emit.zi) and keeps the C names its Ziran callers bind
to. zir.h and zir_emit.h drop the declarations no C file calls any more.

Two stage-0 compilers built from the same seeds, one with zir_asm.c and
one with the port, generated identical C, diagnostics and exit codes for
all 13 sources that use #asm, covering block and procedure variants, x86,
AArch64, ARMv7 and WebAssembly guards, feature helpers and the check
build.
2026-11-23 04:15:40 -03:00
waozi 8c6605ef09 Bootstrap entry linking for the C, Go and native backends in Ziran
compiler_zx_link replaces zir_link.c: host capability binding, the
private copy of the checked program, dead statement and constant-branch
pruning, unused record field pruning, and the reachability closure that
decides which functions, types, constants, globals, imports and modules
an entry keeps. It is one module read from three files
(compiler_zx_link.zi, compiler_zx_link_prune.zi and
compiler_zx_link_reach.zi) and exports the same C entry points
BindHostProvider, BindHostModule, NativeLink, NativeGoLink and
ProgramUsesFunction, so zi2c, zi2go, zi2zir, zi2zx and the bundle link
test link it unchanged. Both compiler stages build it; its seed is under
bootstrap/compiler_zx_link.

A reference build with zir_link.c and a build with the port produced
identical C, Go and saved IR, diagnostics and exit codes for all 552
--entry links over the 184 programs with a main in examples/ and tests/.

The self-hosting plan records the port and gives zir_zx_module.c its
row; the rest of S16 and S17-S18 remain.
2026-11-23 04:15:40 -03:00
waozi 8a64a61a84 Restore the ccache symlink skip in the check cache's tool lookup
Build check / check (push) Canceled after 0s
5db3d3c3 made the check cache skip a compiler name that is only a ccache
symlink, so cached checks key on the real compiler. 51e4505d, a commit
about loop optimization, dropped that hunk again while the working copy
kept it. This puts it back unchanged.
2026-11-23 04:14:00 -03:00
waozi f754f6441c State the shared-index commit rule and ignore zi2c's directory lock
Build check / check (push) Canceled after 0s
AGENTS.md told lanes to stage through a private GIT_INDEX_FILE. The
owner's rule is the shared index: add only your own paths and commit
with `git commit -- <those paths>`; no private index, plumbing, rebase,
reset or stash.

zi2c writes .build.lock into the directory it emits, which left one in
bootstrap/compiler_c_emit after a seed regeneration.
2026-11-23 04:12:41 -03:00
waozi 390c94b85b Record the Rill row and emulator measurement runs
Raw samples from the Rill row-kernel variants (before, after, 32-bit
division and word forms, paired and C baselines), the compact-engine run
and the local emulator run of 2026-11-21.
2026-11-23 04:12:24 -03:00
waozi a1fcbe9bef Record the widget native comparison and profile runs
Raw samples of the Kryon widget native-versus-C comparisons and SIGPROF
profiles taken on Omega while the native x86-64 record, call and
allocation changes were tried, one file per experiment. They are
development measurements, not site figures.
2026-11-23 04:12:24 -03:00
waozi a200101561 Pass the module build to ZxExecBuild in the web bundler and playground
ZxExecBuild takes the module link description before the assets. The two
web entry points still called it without one and no longer compiled;
they pass an empty description.
2026-11-23 04:12:23 -03:00
waozi 025e29c5c9 Add site pages for the six new standard modules
Build check / check (push) Canceled after 0s
bundle_guest, list, pool, rune_text, tuple and zx_conc get their API
pages, rows in the module index, sitemap entries and the count of 132
standard modules on the home and module pages.

The pages are generated for this commit's VERSION (0.7.0). The working
copies of index.html and modules.html that carry unreleased 0.8.0 text
stay uncommitted with the rest of the release preparation.
2026-11-23 04:11:18 -03:00
waozi b605ffe25a Show only measured figures with units on the targets page
/targets dropped its lead text, pipeline strip, "Verified" state labels,
ratio-to-C columns and the method and provenance paragraphs: each example
cell now shows its run time per call and opens the generated output, and
the benchmark tables show times only. The benchmark and target generators
write that form, and the page's script and styles lose what the removed
parts used.

tests/site_targets_cases.zi adds SiteTargetsPresentation, which refuses
those removed parts in the page's main content.
2026-11-23 04:08:35 -03:00
waozi 96ac611dd0 Add the Limbo replacement plan and its migration scanners
The plan covers replacing Limbo and Dis with Ziran and ZX in TaijiOS.
scripts/scan_limbo_migration.py reproduces its counts of Limbo constructs
across a source tree, and scripts/m2zi.py drafts Ziran declarations from
Limbo module interfaces.
2026-11-23 04:08:12 -03:00
waozi f706bb19bb Add standard modules for porting Limbo programs
std/list is an arena-backed singly linked list for Limbo's `list of T`,
std/pool a generational slot pool for cyclic and reference-graph
structures, std/tuple the generic Tuple2 and Tuple3 records, and
std/rune_text UTF-8 rune operations with Limbo's string semantics
(invalid bytes decode to U+FFFD with width 1). std/zx_conc declares the
portable channel and task services a ZX host may grant, and
std/bundle_guest the child-execution capabilities of a portable
coordinator.
2026-11-23 04:08:12 -03:00
waozi 6920f1551f Add the widget native comparison and profile to the benchmark runner
Build check / check (push) Canceled after 0s
bench/bench.zi lists widget-native, which freezes public two-frame Kryon
Text, Input and Button builds and measures matched native and C runs, and
widget-profile, a SIGPROF profile of the warmed widget entry through its
native runner. The native-speed plan points at the i386 execution plan
and records that its preliminary gains were not reproduced on Alpha.
2026-11-23 04:07:38 -03:00
waozi 26a5e035fa Check typed pointer indexing and heap growth between neighbors
native_instance runs heap_arena_reuse's typed model memory on every
backend and expects a pointer or bounds trap for a negative index and one
past the extent. lowered_exec grows a block that fits between its two
neighbors when no single hole could hold a replacement, keeping the arena
size and both values.
2026-11-23 04:07:38 -03:00
waozi 67c4681f0a Copy less when native x86-64 code loads, returns and passes records
A loaded record snapshot that only constant extracts read copies just the
first-level members those extracts reach, named by an immediate mask the
machine verifier checks; whole-value uses keep the full load. Several
returned record values share the caller's result memory when each is
built and used only in its own terminal return block. Records up to the
vector cutoff are copied and cleared with straight-line vector moves
instead of a counted loop. The register allocator places a join after a
connected predecessor whose allocation is known rather than beside an
unrelated cold block.

native_large_global_fields checks exact copy and zero tails on both
sides of the vector and loop cutoffs, with sentinels and aliased caller
storage; the machine field, place and x86 encoder cases cover the new
forms.
2026-11-23 04:07:38 -03:00
waozi d1ae0da903 Skip the grapheme tables for ASCII text
Between two ASCII scalars only CR+LF forms a cluster, and an ASCII
scalar's break property is control, CR, LF or none. NextGrapheme and the
property lookup answer those directly; a following non-ASCII scalar still
goes through the full rules.
2026-11-23 04:06:59 -03:00
waozi 4666d3f938 Point the cli and lib templates at the Gitea toolchain
Gitea is the primary repository and GitHub a mirror. A project made from
these templates now pins its toolchain from git.waozi.xyz, like the
other templates.
2026-11-23 04:06:59 -03:00
waozi ff583fe0f0 Give mirror URLs of one overridden checkout one module namespace
Two dependencies that name one repository by different URLs, such as its
Gitea and GitHub addresses, are two lock entries. A local override that
selects one checkout for both made the compiler load each source file
once but under two package identities, so the build failed on the second
namespace. An overridden package now takes the identity of an earlier
entry that selects the same checkout.

tests/package_pin_cases.zi adds OverrideMirrors: the app builds and the
saved lock keeps its bytes.
2026-11-23 04:06:59 -03:00
waozi bac564d64a Declare Go's uintptr as a foreign builtin type
A Go function that takes or returns uintptr, such as (*os.File).Fd, could
not be declared: only `any` and `error` were accepted from go:builtin, and
`uint` is a different Go type. `#type #foreign builtin "uintptr"` now names
it, and an explicit cast converts it to a Ziran integer.

The Go foreign-types fixture reads a file descriptor through it. The
guide documents the declaration; seed for compiler_type.
2026-11-23 04:06:44 -03:00
waozi 9629368999 Give one type application one C name in every module
Build check / check (push) Canceled after 0s
0fe03609 gave Vec(Entry) in one module and Vec(C.Entry) in another the
same instance name. When a third module has its own Entry, its Vec(Entry)
shares that name too, so all three are mangled, and the mangled name
hashed the module and the place the application was written. The two
spellings of one application then had two C types: Harmony's
workspace_ledger.c failed with "invalid initializer" on the Vec(Entry)
that token_collection's Selected returns.

A mangled type application is now named by what it applies: its template
and each argument type, where those are declared. Every module that
spells one application emits one native type, and another module's own
Entry still gives another. Declared types keep their names.

tests/tool_diagnostics_cases.zi adds shared_vec, a build case with two
more modules that fails without this. Seed for c_emit.
2026-11-23 04:04:06 -03:00
waozi 203800c091 Hash check inputs in batches and remove make check-incremental
Build check / check (push) Canceled after 0s
check-runner --incremental fingerprints every input of the suite before
and after a run. It started one sha256sum for each of about 3,300 files
and dropped duplicate paths with a quadratic scan, so a run spent
11-12 s on Omega before any check started. It now hashes 256 files per
sha256sum run and drops duplicates after sorting: 0.6-0.8 s per run,
and the runner's self-test still passes its cache invalidation cases.

make check-incremental is removed. The fingerprint covers every input,
so after any one-file edit no result is reused (measured: 1 executed,
0 reused), and only fuzz_regressions.sh is audited for reuse. The
target could not beat make check after an edit; make check
CHECK_FILTER=<name> serves that rerun. make check is unchanged.

plans/2026-11-23-go-check-groups.md records the numbers and maps every
removed Go check to its replacement.
2026-11-23 03:06:24 -03:00
waozi ebf1c642be Group the two Go assembly checks into go_codegen
go_assembly.sh and go_direct_assembly.sh only launched
go_assembly_cases.zi and go_direct_assembly_cases.zi. Their main
procedures became GoAssemblyMain and GoDirectAssemblyMain, and
go_codegen_cases.zi runs both as parallel cases of one check through
the GoChildren pool in go_case_support.zi. The suite has 263 checks.

The native.assembly feature now names the two case programs as its
evidence; docs/FEATURES.json is regenerated from `ziran features --json`,
and the guide, its site page, the assembly feature matrix and the
self-hosting plan name the case programs instead of the wrappers.
2026-11-23 03:06:01 -03:00
waoziandClaude Opus 5.5 0fe03609a9 Give one application one type across modules; keep C names off the runtime's
Build check / check (push) Canceled after 0s
A pointer to Vec(Db.Match) could not reach a procedure of Db that takes
*Vec(Match), nor Vec(*Db.Frag) one that takes *Vec(*Frag): the two
spellings got different instance names, and same_type_application also
required the expanded bodies to match as text (*Match against *Db.Match).
Instance names now hash a qualified argument type the way its own module
spells it whenever the bare name means the same type here
(type_application_identity), so both spellings name one type for the
checker, C, Go and ZX alike. same_type_application compares the template
and the resolved arguments under pointer, slice and array shapes instead
of the body text. The checker accepts two spellings of one application
only when they share that name, because only then do the backends emit
one type; a module whose own Match hides Db.Match is still rejected.

A constant becomes an object-like C macro, so String :: 2 rewrote the
runtime's String typedef, length :: 3 every .length member, and a
file-private constant in one module a parameter of the same name in
another. Constants spelled like a runtime header name, a runtime member,
a record field, or a parameter or local anywhere in the program now take
the mangled zir_d_ name; globals and types spelled like a runtime header
or libc name are renamed the same way.

The "::" inside a multi-line file-scope string was already fixed by
c2ef7933; colon_text now also uses a typed table and the "x ::1 y" text
the TaijiOS port reported. tests/tool_diagnostics_cases.zi adds
runtime_names and module_vec, a case with a second module. Seeds for
c_emit, check_link, check_value, frontend_ir and zir_lower.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 02:55:21 -03:00
waozi a007a9cb73 Refresh checked package entries saved under another toolchain
Build check / check (push) Canceled after 0s
A ziran.lock kept across a Ziran upgrade holds checked-library entries
for the earlier toolchain. `ziran lock` refused them with "saved checked
package requires a different toolchain or profile", `ziran update` did the
same, and builds said only "invalid checked packages in ziran.zx.lock",
so the project had no way forward (Kryon's zx-test, cursor-api-test and
zx-canvas-test).

`ziran lock` and `ziran update` now look such a library up again for the
current toolchain under its saved profile; with nothing published for it
the package goes back to its source, as an unpinned package does. Builds,
`--locked` included, still stop, and name the package and `ziran lock`.
An invalid saved profile, an entry naming another package, a bad digest
and a ziran.zx.lock pin are refused as before.

tests/package_zx.sh covers the build message, both refreshing commands,
the fall back to source and the entries still refused. Its "descriptor
naming another package" case replaced the id's last digit with 0, a no-op
for one id in sixteen; it now always changes the digit.
2026-11-23 02:38:02 -03:00
waoziandClaude Opus 5.5 612bd6133a Run Ziran's shared checks on Build's native primary label [skip ci]
alpha-ziran and build-ziran already ran on Build's primary host executor;
they were container-era names. build-native-primary names the same lane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 02:21:39 -03:00
waozi 7e0000bd41 Add make check-incremental
Build check / check (push) Canceled after 0s
make check-incremental runs the check runner with --incremental: a check
audited in tests/check_cache_audits.json keeps its passing result while no
input of the suite has changed, and every other check runs. make check
still runs the complete suite.

Only fuzz_regressions.sh is audited, and computing the input fingerprint
takes 12-15 s on Omega, so today the target is slower than make check.
plans/2026-11-23-go-check-groups.md records the measurement and what would
make it pay for itself.
2026-11-23 02:20:45 -03:00
waozi 25b81f30ce Group fourteen Go target checks into go_semantics and go_exports
Each tests/go_*.sh wrapper compiled the same helpers and started the Go
toolchain for one fixture. Two Ziran check programs now run those fixtures
as parallel cases of one check: go_semantics (bind, defer, error values,
fields, foreign types, many parameters, maps, results, select, slice nil)
and go_exports (C headers, method exports, named exports, package init).
The suite has 264 checks instead of 276.

Fixtures moved file to file into tests/fixtures/go/<case>/. Every command
and rejection table moved into its case procedure, and go_case_support.zi
states a command the way the shell line did. A command that must be
rejected now has to exit with a diagnostic, so a crash no longer counts as
a rejection.

case_pool.zi holds the parallel child pool that packages_cases.zi used;
both now share it. saved_ir.zi holds the saved IR edits so a case applies
them in process, and saved_ir_mutations.zi stays as their command-line
form for the shell checks that still call it.

The two Go assembly wrappers stay until the feature evidence names their
case programs. plans/2026-11-23-go-check-groups.md maps each removed check
to its replacement and lists the open work.
2026-11-23 02:20:08 -03:00
waozi e225a4fe6a Name a #program_export that two package revisions define in C builds
Build check / check (push) Failing after 2m32s
A Kryon app pinning Kryon at one commit and a CSS package pinning it at
another links both revisions, as packages allow. Generated C gives a
#program_export procedure one symbol, so the build died in the C compiler
with "conflicting types for LightPalette".

zi2c now checks the linked program before writing C: when two modules
define one exported symbol it reports the procedure and both modules, and
for two revisions of one package says the dependencies that pin it must
agree. Procedures the program never calls are already dropped from a
linked program and each module's `main` has its own C name, so only real
clashes are reported. ZX qualifies exports by module and is unaffected.

tests/package_zx.sh locks the two-pin graph, checks it, expects the
build error without the C compiler's message, then agrees the pins and
runs the built program.
2026-11-23 02:10:32 -03:00
waozi dd829704b1 Bootstrap checked IR persistence and package resolution in Ziran
Build check / check (push) Canceled after 0s
compiler_zir_serial, compiler_load, compiler_package_resolve and
compiler_zx_assets replace zir_serial.c, zir_load.c, zir_packages.c and
zir_assets.c. Both compiler stages link the Ziran modules, and the seeds
under bootstrap/ build stage 0.

zir_persistence_host.c supplies host paths and streams and keeps the
existing C entry points, so the tools and embedders call the same
functions. ProgramSet, ZxAsset and ZxAssets now come from the generated
headers. The checked IR format stays version 66; the saved-binary fixture
reads the version from the codec instead of the deleted C file.

Still open in the self-hosting plan: the rest of S16 (portable linking,
the ZX command runner, the embedding and execution APIs, the Wasm
provider), S17 and S18.
2026-11-23 02:09:52 -03:00
waozi 1f6cbf0775 Refresh the parse seed for the caller-location change
Build check / check (push) Failing after 1m30s
cmd/compiler_expr_ir.zi gained file reads for #caller_location without
bootstrap/compiler_parse/compiler_parse.c being regenerated, so
check-bootstrap failed on that one seed. It is regenerated from the
current sources; the header is unchanged.
2026-11-23 01:58:40 -03:00
waozi 856950ad5f Remove the link-stage #program_export uniqueness check
Build check / check (push) Failing after 1m31s
The check added for two linked revisions of one package also refused
programs that are valid: a ZX bundle qualifies each export by its module,
so several modules of one build may export the same name, and
assembly_compare, host_bindings, standalone and target_diagnostics do.
Those four checks failed on master.

Only generated C makes a #program_export one linker symbol. The link
stage is back to what it was, the package test no longer expects the
error, and docs/PACKAGES.md and the reference say what is true: two
revisions coexist, and in generated C their pins must agree when both
define one exported procedure.
2026-11-23 01:57:02 -03:00
waozi 5bf3eaa569 Regenerate stale site pages and add the Tcl and Tk package pages
Build check / check (push) Canceled after 1m29s
The committed site no longer matched its own sources. docs.html,
index.html and modules.html counted 128 standard modules where std/ holds
126. Five std pages (bundle_host, gzip_linux, image, jpeg, png_linux)
lacked declarations that std/ already exports, and nine package pages
trailed their READMEs.

site_pages.py now checks a package whose inventory URL is on
git.waozi.xyz against its Gitea origin and links its sources there, so
the inventory lists tcl and tk and each gets a page.

Every page comes from the generator run on this commit's own inputs
(VERSION 0.7.0 and the tracked std modules); site_pages.py --check
passes on the result and reported 17 stale pages on the parent.
2026-11-23 01:55:32 -03:00
waozi ac3116d543 Order the guide from everyday language to low-level code
Build check / check (push) Failing after 1m33s
docs/USAGE.md opened with inline assembly and filed language rules under
the standard library. It now starts by pointing at docs/REFERENCE.md, then
runs: commands, literals, strings, constant tables, shadowing, conditional
record construction, returned views, checks, imports, the standard
library (vectors, text, maps and files before temporary storage, SIMD and
the native adapters), then building the toolchain, output routes,
generated C and Go, saved IR, foreign functions and assembly.

Every section moves whole and keeps its heading text, so links to its
anchors hold. Constant tables, conditional record construction, audio and
the closing pointers get headings of their own. Sentences that described
an earlier compiler ("no longer", "now", "remains", "retained") state the
current rule instead. No rule is dropped: the only lines that differ from
the old file are those sentences, four headings and the opening.

The site renders the reference as a guide page now that the guide links
to it.
2026-11-23 01:49:25 -03:00
waozi b110b16a9a Note what replaces the removed std/rss_scan and std/http_get_linux
Build check / check (push) Failing after 1m32s
The only user outside Ziran is the atr project's legacy/research folder,
which its manifest's module roots, Makefile and tests do not build, so
both modules stay removed. The changelog names the replacement and the
last commit that has each module.
2026-11-23 01:45:27 -03:00
waozi cceecbbe5d Report a #program_export defined by two linked package revisions
Build check / check (push) Canceled after 1m41s
A Kryon app pinning Kryon at one commit and a CSS package pinning it at
another linked both revisions, as packages allow. Both define the
`#program_export` procedure LightPalette, so `ziran check` passed and the
C compiler then died with "conflicting types for LightPalette".

The link stage now refuses a #program_export symbol that two modules
define, naming the other module; for two revisions of one package it
says so and that the dependencies pinning it must agree on one revision.

Production locks keep each declared exact pin (docs/PACKAGES.md), and
the package tests assert both revisions coexist, so a root pin still does
not replace a dependency's pin. tests/package_zx.sh locks the two-pin
graph, expects the check error, then agrees the pins and checks again.
2026-11-23 01:43:52 -03:00
waoziandClaude Opus 5.5 2523610f6d Name caller locations the same on every machine
Build check / check (push) Failing after 1m47s
#caller_location recorded the absolute canonical path of the call site, so a
library that defaults a location parameter, such as Kryon's widgets, built
different bytes in every checkout and package cache. The file is now named
relative to the module root, or by the package from the nearest ziran.toml
and its path inside that package when the module root lies inside a
package. Other files keep their path. call_argument_cases builds the same
sources from two folders into identical bundles and checks a caller in
another package.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 01:27:48 -03:00
waozi 86db9c6295 Run bundles only on a runtime provider of the same toolchain build
Build check / check (push) Failing after 1m37s
`ziran run app.zx` handed a bundle that needs host capabilities to the
first installed provider whose --check passed, whatever toolchain built
it. Kryon's player in ~/.local/bin/zx, built from an older Ziran, then
ran bundles from a newer one: frame tests aborted silently or hung.

A registration's optional second line, `ziran IDENTITY`, records the
build of the toolchain that installed the provider; `ziran version
--identity` prints it (a digest of the toolchain's zx runner, which holds
the engine and runtime). `ziran run` skips providers of another or an
unrecorded build, and when none of its own build remains it names the
provider and both identities and exits 2 without running anything.

tests/bundle_provider_cases.zi records identities and covers both
refusals; package_zx.sh's provider records its identity. docs/ZX.md and
its guide page describe the line.
2026-11-23 01:24:18 -03:00
waozi c450e3a3f2 Add rooted child file handles and multi-member gzip decoding
Build check / check (push) Failing after 2m54s
file_tree_linux opens a configured root directory and its single-name
children with openat, mkdirat, renameat and unlinkat, never following
links or path components, so a server can confine its file stores to a
root. OpenChildRegularFile refuses FIFOs and non-regular files.
GzipDecompressMembers decodes one or more complete gzip members into a
bounded output. Both have tests, and the backend_process bootstrap
(Linux and Darwin) is regenerated for the new file_tree code.
2026-11-22 22:31:19 -03:00
waozi 8133bd41ef Resolve from source when a checked library names another toolchain
Build check / check (push) Canceled after 0s
ziran lock and add discover a package's checked .zx library at its
revision and profile. The descriptor there names the toolchain it was
checked under, and any other toolchain failed resolution with "checked
package metadata does not match its repository revision, toolchain or
profile", so moving a project to a new Ziran commit needed every package
republished first. Kryon's starter (css, image-codec, webp, avif) could
not leave toolchain 5db3d3c3.

A well-formed descriptor for the same package and profile but another
toolchain now leaves an unpinned package on its ordinary source workflow,
as a missing descriptor already did. A saved pin, an explicit profile
request, or a descriptor naming another package or a malformed digest
still fails. tests/package_zx.sh covers both; docs/PACKAGES.md and its
guide page state the rule.
2026-11-22 22:22:48 -03:00
waozi 1b27d10552 Query paths on Android without statx
Build check / check (push) Failing after 1m33s
Bionic exports statx only from API 30 and errno as __errno, so Android
apps that reached PathQuery failed to link. On Android StatxRaw fills the
same statx record from fstatat, reading each ABI's struct stat offsets.
2026-11-22 18:35:07 -03:00
waozi 2a4f6ff0da Say which std module to use for each layered job; close the audit plan
Build check / check (push) Failing after 2m19s
docs/REFERENCE.md (and site/llms.txt) name the module to reach for where
several cover one job: text, JSON, dates, HTTP and audio. They are
layered APIs, not duplicates, so none is removed.

The LLM authoring audit's last two open items both wait for other lanes
(per-declaration parse recovery for the parser port, exact value carets
for the saved-IR codec); they move to plans/open-work.md as one line each
and the audit plan is deleted.
2026-11-22 17:32:44 -03:00
waozi 1758248473 Name the Gitea toolchain URL in the packages guide
Gitea (git.waozi.xyz) is the primary host; the [toolchain] example in
docs/PACKAGES.md now names it, and site/guide/packages.html is regenerated.
2026-11-22 17:31:37 -03:00
waozi aa6998fcf4 Remove 24 benchmark run logs that no receipt cites
These .log files under bench/results/ (sigprof captures, validation and
publication test runs, zx-loops profiles) are named by no receipt, site
table, check or document. The seven logs that compiler-build receipts
name ("log": "build.log" or "first-run.log") stay with their receipts.
2026-11-22 17:30:42 -03:00
waozi adc26dac04 Remove std/http_get_linux in favor of std/net_http
std/http_get_linux.zi (39 lines) fetched HTTPS through curl beside
std/net_http, the host-capability HTTP API with Linux and curl
implementations. Its only user was the GetHttpsCapped URL case in
tests/std_input_cases.zi, whose net_http half already refuses the same
file:///etc/passwd URL; that case goes with the module. Kryon and Harmony
do not import it. Its site page and its modules.html and sitemap.xml
entries are removed.
2026-11-22 17:29:52 -03:00
waozi 4c62f8b838 Remove std/rss_scan, a module nothing imports
std/rss_scan.zi (149 lines) had no importer in Ziran, Kryon or Harmony and
no test. Its site page and its modules.html and sitemap.xml entries go
with it.
2026-11-22 17:28:33 -03:00
waoziandClaude Opus 5.5 c3ef9fb291 Let ZX embedders stop an active guest run from another thread
Build check / check (push) Failing after 2m12s
A ZxRunControl is a sticky, thread-safe stop request. Pass it to
ZxModuleProgramOpenControlled/RunControlled, or to
BundleInstantiateControlled/BundleInstanceRunControlled for a plain
bundle. The instruction engine polls it at fuel, jump, branch, call and
host-call checkpoints, in the fast and packed tiers too, so it stops
entry loops, global initializers, guest-loaded library initializers and
imported library calls. A host callback that returns after a stop
reports ZX_RUN_CANCELLED. A stop seen before entry skips the run and
leaves the program usable; one seen during execution retires it. Only
the engine backend accepts a control. Uncontrolled callers and finite
step budgets behave as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 17:15:27 -03:00
waozi a1ce537bb0 Key package artifacts by checkout content, not by HEAD
Build check / check (push) Failing after 2m44s
`ziran pkg artifact` mixed each checkout's HEAD into the artifact key
before and after the provider ran, and refused publication when the two
differed. Another lane committing to a local override mid-build (Kryon's
renderer-desktop) moved HEAD without changing a file, and the build
failed with "artifact provider failed or omitted a declared output".

PkgArtifactContent keys each checkout by its checked-out content: a git
tree id written from a private copy of the checkout's index after
`git add -A`, so committed and uncommitted files count alike and the
checkout's own index is untouched. Any real change to the files during
the build still refuses publication.

The fixture provider can commit to its checkout while it builds; the new
last case in tests/package_artifacts_cases.zi passes, and fails when the
key uses HEAD again. docs/PACKAGES.md and its guide page describe the key.
2026-11-22 16:43:39 -03:00
waozi debc381ccb Let checks run from a private BUILD_DIR inside the repository
Build check / check (push) Canceled after 0s
NativeStart refused any work directory outside <repo>/build/, so with
BUILD_DIR=work/NAME the five checks that put their work under the build
directory holding the compiler (zx_web_lifecycle, go_assembly,
go_direct_assembly, host_bindings, portable_entry) failed with "test
outputs must stay inside this repository's build directory". The guard
now also accepts the BUILD_DIR whose bin/ holds the compiler under test,
when that directory lies inside the repository; outputs still never
leave it. All five pass from work/llm-diag.
2026-11-22 16:37:43 -03:00
waozi d9d8764d32 Summarize every std module and read the whole s64 range in TextInteger
Build check / check (push) Canceled after 0s
ziran std --list now gives every one of the 134 modules a one-line
summary: the first sentence of its leading comment, read past imports;
for a module that only forwards to a platform module, "This platform's
std/X_linux:" and that module's summary; otherwise the public names it
declares. The test requires a summary for every module.

TextInteger read at most 18 digits, so not the whole s64 range its
comment promised. It now accumulates negatively with a constant bound,
accepting -9223372036854775808 and 9223372036854775807 and refusing one
past either end; tests/spec/std_number_text.zi covers both ends on every
target. docs/REFERENCE.md drops the workaround. Seeds that embed
text_tools (backend_process for Linux and Darwin, simd) are regenerated.
2026-11-22 16:34:43 -03:00
waozi c2ef7933a6 Read "::" inside a string literal as text in file-scope declarations
Build check / check (push) Canceled after 0s
A file-scope initializer spanning lines, such as a table of records whose
strings hold "NAME :: value" or "main :: () -> s32 { ... }", was split at
the "::" inside the string: the line classifier took it for a constant
("invalid file-scope constant") or a procedure header ("unterminated
declaration at end of file"). The classifier now finds "::" outside
string literals (code_colons in compiler_parse_source, FindCode in
compiler_source for procedure headers).

tests/tool_diagnostics_cases.zi keeps its hint table at file scope again
and builds a record table whose strings hold "::". Seeds for
parse_source and source. Multi-error recovery stays open in the audit:
it waits for the parser port.
2026-11-22 16:31:11 -03:00
waozi 9a5d17123e Accept three forms models reach for instead of explaining them
Build check / check (push) Canceled after 0s
These were top measured causes of programs not compiling; each now works
with no run-time cost:
- `for TextLines(s) { }` and `for line: Call(...)`: the loop lowering
  binds a call result to its loop_items_N temporary inside the loop's
  block, as it already did for literals, so an owned result is freed
  when the loop ends, exactly like `lines := TextLines(s)`. Slicing a
  call result still needs a local and says so.
- `LIMIT :: cast(s64)9223372036854775807;`: a cast of an integer
  constant to an integer type evaluates to the constant when the type
  holds it; a value it cannot hold is still rejected.
- `x := OwnedCall()` then `TextView(x)`: the := binding holds a string
  that keeps its bytes, and TextView of a string is that string, so the
  checker rewrites the call to its argument.

docs/REFERENCE.md (and site/llms.txt) stop teaching the workarounds.
tests/tool_diagnostics_cases.zi checks, builds as strict C and runs each
form. Live stages: compiler_ir_cleanup, compiler_check_value,
compiler_check_expr, compiler_check_statement; seeds for those only.
2026-11-22 16:23:42 -03:00
waozi e597f6052e Record why ziran init keeps a project's floating toolchain ref
Build check / check (push) Canceled after 0s
kryon init now adopts its template's exact toolchain pin. ziran init's
merge keeps the project's own values by rule, already reports the
template's ref next to the kept one, and ziran.lock pins the commit
either way, so the change is not made; plans/open-work.md says why.
2026-11-22 16:14:54 -03:00
waozi f314c9b6b6 Name the bundle option that supplies a missing host capability
"missing host capability: frame_capture:RecordFrameFailure" now goes on
to say the host does not provide it and that the bundle can supply it
with --bind frame_capture:RecordFrameFailure=MODULE:FUNCTION (an exported
Ziran function with the same signature) or --bind-host MODULE, or run in
a host that grants it. host_capability.sh runs such a bundle in a host
with no bindings and checks the message.
2026-11-22 16:14:53 -03:00
waozi 7eac27ba16 Build every program that passes ziran check as strict C
Three programs passed ziran check but failed to compile as C:
- An empty .{} global initializer emitted {}, which ISO C before C23
  rejects under -pedantic; it now emits {0}, keeping {} only for a type
  whose trailing array has zero length.
- A field or local named like a predefined C macro (bool, true, false,
  linux, unix, i386, NULL, EOF, assert, offsetof) reached the C as that
  macro; such names are now renamed like C keywords.
- A global [MONTHS]T with a named constant length was rejected against
  its [12]T initializer; the global check normalizes the declared length
  first, as locals already did.

Live stages: compiler_c_emit_call, compiler_c_emit, compiler_check_program.
Seeds regenerated where generated C changed: runtime_emit (Linux and
Darwin), context, c_emit, c_emit_call, check_program; check-bootstrap
matches every module. tests/tool_diagnostics_cases.zi checks, builds,
compiles with -std=c11 -pedantic -Werror and runs each case.
2026-11-22 16:14:53 -03:00
waozi 527c3d0b18 Keep declaration value spans at the statement start for saved IR
Build check / check (push) Failing after 1m29s
The previous commit started declaration values and assignment targets
at their own column. Saved IR then stored a typed literal such as 42 as a
diagnostic source slice, so the retained standalone check that changes
diagnostic text without changing the program (flow-text, flow-typed)
rejected the rewritten IR. Spans inside a declaration's value count from
the statement start again; the text-mode excerpt and its goldens are
unchanged. Exact value columns need the saved-IR codec to stop reading
those slices first.
2026-11-22 16:07:46 -03:00
waozi 0afcf938e0 Show the source line, a caret and the fix under text diagnostics
Build check / check (push) Failing after 1m46s
Text mode now prints, under the unchanged "path:line:column: message"
line, the source line indented by four spaces with a caret under the
span (tabs kept so it lines up), "expected X, found Y" when the message
does not already name both types, and "fix: replace OLD with NEW" when
the diagnostic carries a name edit. JSON output is unchanged.

A parse diagnostic names its root-relative path, so the excerpt finds
the file through the new DocumentWithSuffix lookup in the document
store, and works from any working directory. Declaration values and
assignment targets now get spans from the line start instead of the
statement start: `t := TextTrim(42)` reports column 19 for 42, in text
and in JSON. Type mismatch details carry the written type names.

Live stages: compiler_diagnostic, compiler_document, compiler_check and
compiler_expr_ir (loaded by compiler_parse); seeds regenerated for those
modules only. Goldens in tests/tool_diagnostics_cases.zi cover a name
fix, a parse hint and tab indentation; operators.sh counts one diagnostic
by its unindented line, and the diagnostic probes stub DocumentWithSuffix.
2026-11-22 16:03:49 -03:00
waozi f2ff55ad99 Regenerate the mesh-client package page from its compacted README
The mesh-client repository's README and AGENTS files were compacted
(mesh-client 17f9e49); site/packages/mesh-client.html is regenerated from
them with scripts/site_pages.py. The tcl and tk pages wait for their
package inventory entries, which are not committed yet.
2026-11-22 16:01:07 -03:00
waozi 02c7847641 Point the milestone open-work note at plans/open-work.md 2026-11-22 15:47:41 -03:00
waozi 54aeaba518 Delete finished and superseded plans, keep open work consolidated 2026-11-22 15:47:39 -03:00
waozi d3f6874326 Compact the performance report and machine IR documents
performance-report.md keeps every schema table and contract; the pending five-core delivery-gate checklist moves to plans/open-work.md and its zx_compare link targets the Older receipts anchor instead of the removed pointer-dispatch section. machine-ir.md drops the encoder Still-required list, now tracked as M4/M5/M6 open work, and the stale broader-M2-open clause. All module, ABI and test references were verified against the tree.
2026-11-22 15:23:00 -03:00
waozi 4ac82147c3 Compact the ZX comparison document around the current receipts
Interim comparison 1 and the pointer-dispatch cohort keep their headings as short subsections pointing at the raw bench/results receipts instead of duplicated tables; the harness, provenance, Moto and visual sections are tightened without dropping facts. Superseded numbers remain in the receipts; no claim was removed.
2026-11-22 15:22:53 -03:00
waozi 835fc9230c Track pending measurement work and delete the finished checks plan
The checks plan was consolidated into tests/check_plan.zi in 241d817f and its scripts (compiler_declaration.sh, wasm_enums.sh, zip.sh) no longer exist, so the plan is finished. plans/open-work.md gains the strict five-core campaign item moved out of ASSEMBLY/performance-report.md and an item to document the 2026-11-16 release receipt.
2026-11-22 15:22:47 -03:00
waozi 9acf8693d8 Bootstrap frontend IR and compiler services in Ziran
Build check / check (push) Failing after 1m9s
2026-11-22 15:14:15 -03:00
waozi 3bdd7c6b7f Leave only the open LLM authoring gaps in the audit plan
Gaps 1, 3, 4, 5, 7, 8, 10 and 11 landed. What stays: multi-error parse
recovery and the file-scope '::' string bug, text-mode caret output
(planned in cmd/compiler_diagnostic.zi after the self-host port lands),
TextInteger's 18-digit limit and the std modules without a summary.
2026-11-22 15:03:16 -03:00
waozi 1b7608b82e Lower typed pointer indexing in portable ZX
Build check / check (push) Failing after 1m44s
2026-11-22 14:54:04 -03:00
waozi b378ac14ad Show signatures, infer the check root, add ziran std and API builtins
Build check / check (push) Failing after 1m25s
Smaller message fixes: an argument-count mismatch now prints the
parameter list, as in "TextFind (a required argument is missing; it
takes (text: string, needle: string, from: s64 = 0))"; a statement that
only reads <<p says to store with <<p = value or bind the read; the
artifact build path says to run ziran lock when the lock is missing.
ziran check FILE.zi outside a project uses FILE's folder as the root,
as ziran build FILE.zi already did, instead of printing zi2zir usage.

ziran check --lint warns on / and % by the constant -1 (lint.divide,
with an explain entry): arithmetic keeps no runtime check, so the lint
names the overflow for the smallest integer. S64_MIN already prints
correctly on C, the engine and native; tests/spec/std_number_text.zi
covers it.

Discovery: ziran std --list [--json] names every standard module with
the first sentence of its leading comment, and ziran api lists the Vec
and builder operations the compiler implements (VecPush, VecPop,
VecSlice, BuilderFinish, ...) under std/vec as builtin lines and a JSON
builtins array.

Live stages: compiler_check, compiler_check_function and
compiler_check_program (seeds regenerated for those modules only), the
launcher (package.zi, package_guide.zi, package_explain.zi) and the C
zi-api tool. tests/tool_diagnostics_cases.zi covers each change.
REFERENCE.md, site/llms.txt, API_DISCOVERY.md and its guide page are
updated.
2026-11-22 14:50:50 -03:00
waozi 0983c2cebc Regenerate the diagnostics guide page for the authoring hints
Build check / check (push) Failing after 1m14s
docs/DIAGNOSTICS.md gained the foreign-syntax and import-hint paragraphs
in the previous commit; site/guide/diagnostics.html is generated from it
by scripts/site_pages.py and is regenerated here so site_pages passes.
2026-11-22 14:48:56 -03:00
waozi 94bab2bb5b Name the Ziran spelling for foreign syntax and suggest names and imports
Build check / check (push) Failing after 1m42s
Habits from C, Go, Rust, Python and JavaScript now get one message that
names the Ziran form instead of a cascade: let/var/const, fn/func/def/
function/pub, for i in a..b, C for (;;), *p = value, .len()/.length/.size,
printf conversions in print and BuilderPrint formats (only when the whole
format is printf style, so v%.4s and %x% stay valid), and a loop or slice
over a Vec a call returned. Errors about names generated for a broken
loop, about operands whose type already failed, and about a local whose
declaration failed are not repeated. Type mismatches print Vec(string)
instead of __type_<hash>.

Unresolved names now consider public procedures of unqualified imports
(TextLins -> TextLines, with suggested_name and a replace_name edit), and
a name declared by a common standard module that the file does not import
says which #import to add.

All edits are in the live Ziran stages (compiler_parse_discover,
compiler_parse_source, compiler_check, compiler_check_expr,
compiler_check_function, compiler_check_statement, compiler_declaration);
only those modules' bootstrap seeds are regenerated. Table-driven cases
in tests/tool_diagnostics_cases.zi cover each hint, a JSON suggestion and
similar spellings that must stay valid.
2026-11-22 14:38:21 -03:00
waozi dec3944830 Add a checked prompt-sized language reference and site/llms.txt
Build check / check (push) Failing after 1m11s
docs/REFERENCE.md teaches Ziran to an author who has never seen it, in
547 lines: syntax by example in writing order, string versus Text, Vec
and HashMap, multiple results, a moves-and-views page, pointers,
modules, % formatting, tests, commands, a "you would guess X, Ziran is
Y" table for C, Go, Rust and JavaScript habits, a std signature table
and arithmetic edges.

Every zi block is a whole file. The site_pages check now writes each
block out and runs ziran check on it, keeps the file at 600 lines or
fewer, and verifies site/llms.txt, which scripts/site_llms.zi generates
from the reference. ziran guide and AGENTS.md point at the reference.
The LLM authoring audit records Top gaps 1 and 8 as landed.
2026-11-22 14:19:56 -03:00
waozi f17d6915f2 Bootstrap declaration parsing and IR cleanup from Ziran
Build check / check (push) Canceled after 5s
2026-11-22 14:13:39 -03:00
waozi 5769bdf699 Fix stale source links in the assembly documents
Links to C sources removed by the bootstrap-from-Ziran ports now point
at their Ziran modules: compiler_zir_lower.zi, compiler_ir_cleanup.zi,
compiler_machine_elf.zi, compiler_simd_metadata.zi, compiler_bundle.zi,
compiler_zx_wasm.zi, compiler_c_backend.zi, compiler_c_range.zi,
compiler_vector_x86.zi, compiler_go_asm_x64.zi, and cmd/inspect.zi.
Links to pruned shell tests point at the retained cases. The assembly
README test block runs plain make targets instead of the removed
build-queue wrapper and the removed make assembly target, and its status
section points at plans/open-work.md instead of dated milestone
narrative.
2026-11-22 13:56:54 -03:00
waozi 7ced8e858b Consolidate open work into plans/open-work.md and delete finished plans
plans/open-work.md holds one line per undone item with its location and
test. Deleted finished plans: 2026-11-13-native-optimizations (all items
landed; cmd/compiler_lowered_x64.zi is gone), 2026-11-15-manual-safety
(--checks and #checks shipped; the optional untrusted-bundle refusal
moved to open work), 2026-11-17-code-size (24 cuts landed; the shell
harness absorption moved to open work), 2026-11-17-standard-benchmarks
and 2026-11-17-site-benchmark-cohort (open items moved to open work),
and the four 2026-11-18 learn-from-lean lane inventories (verified and
triaged into the merged verdict). plans/2026-11-18-learn-from-lean.md
keeps the adopted items, baselines, and the do-not-adopt list. Stale
references to the deleted plans were removed from assembly-remaining,
m4-native-arm, and native-zx-players.
2026-11-22 13:56:54 -03:00
waozi 6651443eab Compact authoring docs and move open proof work to plans/open-work.md
docs/AUTHORING.md drops the build-queue wrapper (not a repository tool)
and lists the direct test commands. docs/FEATURES.md states the
incremental scope without stale not-yet phrasing. docs/LAWS.md and
docs/LANGUAGE_DIRECTION.md point induction and future proof work at
plans/open-work.md instead of restating it.
2026-11-22 13:56:54 -03:00
waozi 5130aaf56c Rewrite AGENTS.md and README.md as compact agent entry points
AGENTS.md gains a layout map, working commands, a question-to-document
index, and shared-checkout rules in 78 lines. README.md drops the stale
0.6.0 version claim (VERSION is 0.8.0), keeps the quick start and tool
table, and indexes the documentation by question.
2026-11-22 13:56:54 -03:00
waozi 62d90ff97d Verify and reuse exact Ziran setup caches
Build check / check (push) Failing after 59s
Restore and verify exact toolchain caches before prebuilt downloads, bound setup jobs, and check build prerequisites. Declare the existing borrowed-slice host ABI in the Ziran standard bindings so the retained hosted module test can run from committed source.
2026-11-22 13:17:42 -03:00
waozi 1eef0a811a Add cancellable PNG and JPEG decoding progress
Build check / check (push) Failing after 1m26s
2026-11-22 13:08:24 -03:00
waozi 7ad836764e Bootstrap source parsing and module discovery from Ziran
Build check / check (push) Failing after 1m25s
2026-11-22 07:26:19 -03:00
waozi 3a5c775ad8 Bootstrap whole-program checking and borrow analysis from Ziran
Build check / check (push) Failing after 1m15s
2026-11-22 06:47:20 -03:00
waozi 26a1e47854 Bootstrap the Go backend and checker from Ziran
Build check / check (push) Failing after 1m51s
2026-11-22 06:27:25 -03:00
waozi 122990b237 Use bulk copies for disjoint ZX frame storage
Build check / check (push) Failing after 1m10s
Check backing bounds and keep the original forward copy for overlaps.
Preserve work charges and the portable executor ABI. Retain matched
hosted i386 and private 128 MiB Taiji results from physical Alpha.
2026-11-22 06:14:19 -03:00
waozi 3116ceb59e Bootstrap the C backend and SIMD emitters from Ziran
Build check / check (push) Failing after 1m6s
2026-11-22 05:54:04 -03:00
waozi b5b8167f18 Reuse the current frame in packed ZX execution
Build check / check (push) Failing after 5m11s
Keep consecutive value operations in the same packed frame and preserve
instruction work charges and native block entry points. Record matched
i386 fixture runs and Taiji guest measurements from physical Alpha.

Discover modular diagnostic codes with the compiler's source scanner and
refresh the affected crypto and mesh-client site entries.
2026-11-22 05:11:53 -03:00
waozi 51e4505dd2 Batch LICM/Layout serialization and avoid redundant LIR re-verification
Build check / check (push) Failing after 4m57s
2026-11-22 04:56:10 -03:00
waozi 920c86a10d Accelerate packed ZX execution on Linux i386
Build check / check (push) Failing after 1h35m0s
Build check / Publish a new Ziran version (push) Skipped
Compile bounded hot integer runs and streamline scalar dispatch, branch
arguments, aggregate loads and opt-in synchronous scalar slice transfers.
Retain exact work and fuel accounting and hosted parity coverage. Record
matched physical Alpha measurements, including the private Taiji lifecycle.

Check package API exports under their selected targets so the retained
site test validates packages using target-conditional native providers.
2026-11-22 03:58:17 -03:00
waozi 2684af8d22 Add portable child bundle capability declarations
Build check / check (push) Failing after 8m40s
Build check / Publish a new Ziran version (push) Skipped
2026-11-22 03:48:18 -03:00
waozi d0435e6b37 Pack hosted ZX instructions for the portable engine
Build check / check (push) Failing after 1h30m1s
Build check / Publish a new Ziran version (push) Skipped
2026-11-22 03:46:11 -03:00
waozi 94dc864260 Pack checked ZX libraries for explicit targets
Build check / check (push) Failing after 14m6s
Build check / Publish a new Ziran version (push) Skipped
2026-11-21 21:04:27 -03:00
waozi 5db3d3c394 Use native Build host runner for Ziran checks and skip ccache symlinks in CheckExecutable
Build check / check (push) Failing after 20m44s
Build check / Publish a new Ziran version (push) Skipped
2026-11-21 15:32:46 -03:00
waozi eb53af7dae Reuse large aggregate slots in portable ZX frames
Build check / check (push) Failing after 29m31s
2026-11-21 13:50:55 -03:00
waozi 3432c0ca26 Keep package source selection isolated during lock resolution
Build check / check (push) Failing after 26m56s
2026-11-21 04:58:24 -03:00
waozi b4d7ad82f8 Reuse temporary ZX address slots across branches
Build check / check (push) Failing after 28m48s
2026-11-21 03:31:52 -03:00
waozi 7e56396c5c Fit native ZX frame arenas in constrained address space
Build check / check (push) Failing after 54m0s
Retry smaller contiguous reservations on ENOMEM and enforce the actual mapped extent. Exercise nested typed callbacks and release of their arenas under a process address-space limit.
2026-11-21 01:23:06 -03:00
waozi b6cc625a55 Speed up portable SHA-256 verification
Build check / check (push) Failing after 29m22s
2026-11-21 00:21:46 -03:00
waozi 9f601753bf Reduce repeated work in package and JSON tests
Build check / check (push) Canceled after 6m16s
2026-11-20 23:36:45 -03:00
waozi 5462fe2ebf Reduce spare capacity for large executor address tables
Build check / check (push) Failing after 27m14s
2026-11-20 17:10:22 -03:00
waozi fc11f5cefb Build and verify versioned ZX library packages
Build check / check (push) Canceled after 6m6s
2026-11-20 17:04:13 -03:00
waozi 9a22b19d74 Discover and pin prebuilt ZX package dependencies
Build check / check (push) Failing after 31m41s
2026-11-20 14:49:18 -03:00
waozi 8818597892 Cut duplicate work from the Ziran check suite
Build check / check (push) Failing after 34m11s
2026-11-20 13:35:37 -03:00
waozi 86827bb4cd Open hosted ZX apps through verified positional reads
Build check / check (push) Failing after 32m40s
2026-11-20 05:21:28 -03:00
waozi 79267de637 Use native-width block indexes in hosted ZX plans
Build check / check (push) Failing after 32m34s
2026-11-20 04:21:29 -03:00
waozi ec96fe0b3f Bound large ZX heap and address table growth
Build check / check (push) Failing after 33m54s
2026-11-20 03:37:14 -03:00
waozi 8e8e53bacd Share ZX plan storage for value locations
Build check / check (push) Failing after 34m3s
2026-11-20 02:34:52 -03:00
waozi ca459aecd9 Compact decoded ZX instructions
Build check / check (push) Canceled after 22m46s
2026-11-20 02:12:15 -03:00
waozi 25a11628d4 Reduce memory in hosted ZX execution
Build check / check (push) Canceled after 16m41s
2026-11-20 01:55:27 -03:00
waozi 34bd23fa4e Lock exact package pins from local Git objects
Build check / check (push) Canceled after 32m36s
2026-11-20 01:22:57 -03:00
waozi be5b40432e Reduce portable ZX working memory on constrained hosts
Build check / check (push) Canceled after 12m33s
Reuse verified instruction and constant data, allocate fast code in chunks, and offer a compact execution plan. Allow an opt-in frame workspace reservation for programs whose verified static frames reach an embedder-selected size. Execution bounds and typed host calls retain their semantics.

The original Taiji Stopwatch rendered and completed its interaction smoke in a 32 MiB guest. The reservation added zero bytes at open and instantiation for hello, fuel, cp, command I/O, and filesystem fixtures.
2026-11-20 01:10:05 -03:00
waozi 81a0bca977 Preserve the largest finite binary64 value on i386
Build check / check (push) Canceled after 29m54s
2026-11-20 00:40:29 -03:00
waozi e9e57d940f Reuse freed storage in the ZX engine heap
Build check / check (push) Failing after 39m27s
2026-11-19 22:16:26 -03:00
waozi d60a9c91fa Expose checked runnable API examples
Build check / check (push) Canceled after 11m6s
2026-11-19 22:05:28 -03:00
waozi f59690f087 Resolve qualified host capability calls in portable programs
Build check / check (push) Canceled after 22m26s
2026-11-19 21:37:24 -03:00
waozi 80b8cca8bb Match Ziran checks to Build runner capacity
Build check / check (push) Failing after 49m20s
2026-11-19 20:25:31 -03:00
waozi a7f112ff48 Support verified ZX modules in hosted filesystems
Alpha check / check (push) Failing after 39m30s
Resolve library images through an optional embedder callback and route app and library descriptor writes through one console. Let bounded instruction-engine entries renew their step budget at explicit host checkpoints.
2026-11-19 19:22:03 -03:00
waozi 7a2ed8ec3b Document pure and native Zstandard compression APIs
Alpha check / check (push) Failing after 38m23s
2026-11-19 18:36:06 -03:00
waozi 5a2ba0a576 Preserve native host arguments across reentrant callbacks
Alpha check / check (push) Canceled after 31m7s
Keep active callbacks' portable values and aggregate input images alive
when a nested native invocation calls the same instance again. Restore
outer storage on both normal return and failure.

Retain raw and checked A-to-B-to-A coverage for records, fixed arrays,
local strings, copied strings across runs, and failed-inner cleanup.
2026-11-19 17:28:36 -03:00
waozi 9432a11070 Reserve native frame storage only while instances execute
Alpha check / check (push) Failing after 17m32s
Keep checked pointer slots persistent and reserve the full frame arena for
an active outermost invocation, including reentrant callbacks. Release it
on return or trap so idle bundles fit in a 32-bit address space.

Add a bounded address-space regression with eight independent native
instances, precise loader diagnostics, and runtime documentation.

Validation: make check (272/274), then passing focused rechecks for the
repaired diagnostic registry and generated architecture page; bootstrap
verification; exact ARMv7 Moto Lumi/Practice, navbar, and PiP tests.
2026-11-19 14:00:28 -03:00
waozi 3a59682d86 Route embedded ZX console output through host callbacks
Alpha check / check (push) Successful in 10m25s
2026-11-19 01:32:24 -03:00
waozi 2cafe84dc8 Integrate verified ZX modules and compiler improvements
Alpha check / check (push) Successful in 10m8s
Add typed separately compiled ZX libraries with independent instances and compatible state replacement. Tighten generated-name diagnostics, remove the fixed loader graph limit, and resolve platform conditions without eager enum-import cycles.

Resolve known function calls, bound specialization work, improve loop inlining, and copy borrowed Wasm records safely across overlapping pointers. Retain measured native vector growth and allocated-state verification improvements with startup phase profiling. Include focused regression coverage, synchronized bootstrap and site documentation, Lean research plans, and raw Alpha comparison receipts with rejected prototypes clearly identified.

Local validation: all 273 retained tests passed across the full run (272/273) and the audio rerun after refreshing stale disposable CMake compiler paths (1/1), with no implementation drift. Linux, Darwin and SIMD bootstrap seeds match. Current-tree Omega installation verified all 11 binary identities and ran Hello World through the installed compiler.

Alpha matched measurements support smaller Wasm modules; the native vector workload improves 4.62%, while printing is 1.41% slower. Separate application, controller and Moto integration remains outside this compiler milestone.
2026-11-19 00:01:23 -03:00
waozi f442d706fe Edit tool: result envelope with embedded diagnostics
Alpha check / check (push) Successful in 10m40s
Every ziran edit invocation now writes exactly one schema_version-1
result document on stdout. Rejected edits answer applied=false with a
diagnostics array holding the collected schema-version-2 records,
matching the streamed stderr lines; accepted edits embed the same
array. Usage errors and unreadable request files go through the same
envelope.

The compiler reports candidate syntax errors through a fatal path that
exits mid-validation, so an atexit exit guard flushes the collected
diagnostics when that happens. Diagnostic collection storage uses raw
libc allocations: allocator-tracked storage would be freed when a
failed frontend scope unwinds, leaving the collector dangling.

semantic_edit.sh rejects now assert the envelope: applied flag,
diagnostics array, and per-record equality with stderr including full
native metadata.
2026-11-18 22:33:15 -03:00
waozi f7516d81d0 Record rejected call-load forwarding measurements
Alpha check / check (push) Failing after 29s
2026-11-18 18:09:51 -03:00
waozi bc946f307e Run Linux checks on Alpha’s Gitea runner
Alpha check / check (push) Failing after 10m55s
2026-11-18 18:02:15 -03:00
waozi 036cb7b5d2 Stream executable asset identities through the shared SHA-256 runtime 2026-11-18 17:55:53 -03:00
waozi 379776191c Run Wine without TMPDIR in the Windows parity check
Ubuntu's Wine 9.0 aborts with "free(): invalid pointer" when it runs as
root while TMPDIR is set, as in CI containers, where the check runner gives
every check a private TMPDIR. Wine needs none, so its commands start
through env -u TMPDIR; the compilers keep the private directory.
2026-11-18 16:56:40 -03:00
waozi ce42bdc0c1 Link the audio check's codecs from the build it tests
audio_checks builds the codec archives with `make audio-codecs` and linked
them from build/audio/native. Under `make sanitize` the sanitize build's
BUILD_DIR reaches that make through MAKEFLAGS, so the archives went to
build/sanitize/audio/native and a fresh runner failed to link
libziran_mp3.a and the Vorbis libraries; a local tree passed on stale
archives. The check now builds them in the directory of the ziran under
test and links them from there.
2026-11-18 16:45:56 -03:00
waozi e69f7143e9 Declare generic copies hidden behind a caller's private guard
A generic's copy is checked in its caller's module. When its signature
spells a type through the template's own `using` alias (Kryon text's
`props: Text.Props`) and the caller has a module-scoped import of that
name (Terminal's `Text :: #import "std/text_buffer"`), the header puts
its prototype behind the _PRIVATE guard. header_has_private counted only
private types and defines, so such a caller's source never defined the
guard, called the copy undeclared, and GCC 14 refused it.

header_has_private now counts these copies too. generic_procedure.sh
builds that shape with -Werror=implicit-function-declaration; it fails
with the earlier zi2c and passes now.
2026-11-18 16:44:02 -03:00
waozi 80a44b3c4c Reload ARM native images from the disk cache
Since 10f60362 an Android app keys and stores its compiled bundle, but
DecodePayload accepted only x86-64 Linux images and relocation kinds up to
PointerRuntime, so every ARMv7 entry (which carries RuntimeHelper
relocations) was refused as WrongStructure and compiled again on each
start: Jungle's 4,354,579-byte .zxn on the Moto, costing 6.5 s per launch.

- Decoding accepts every target native lowering supports and restores
  that target, with relocation kinds through RuntimeHelper.
- The loader maps an entry only when its target is this host's.
- native_cache_module_cases round-trips ARMv7 (with a RuntimeHelper
  relocation) and AArch64 Android images.

Jungle's real Moto entry now decodes (result 0, 8,645 globals; it
returned 7 before). Found and written by the owner's Jungle session.
2026-11-18 16:44:02 -03:00
waozi 31f4184827 Publish the Kryon 3D scene table on Targets
The Targets page gains one table of Kryon's animated GPU scenes: lit
meshes, a skinned character, a textured room and a particle field, at
640x360 and 1920x1080, as mean and nearest-rank p95 frame time in
microseconds. The receipt comes from a clean checkout of Kryon v0.6.0
(8d5d2e75, source_dirty false) on an NVIDIA GeForce RTX 5060 Ti through
OpenGL ES, with 60 completed and hashed frames per scene and size after
8 warmup frames.

site_benchmark_tables.zi renders and checks the table like the others.
It accepts only a visual-suite receipt with a clean 40-character Kryon
revision, a real GPU identity for every run, and 60 samples and 60
frame hashes for each scene and size.
2026-11-18 16:32:07 -03:00
waozi 3fec72ab5f Fold literal range tests into one unsigned comparison
For an integer x and literal bounds L <= U that fit its type, ZX
lowering turns x >= L && x <= U, in either order, into
unsigned(x - L) <= U - L, with the subtraction wrapping at x's width.
x must be a stable local, record member or fixed-array element, as for
the existing x > U || x < 0 fold; calls and other expressions whose
second evaluation can matter keep normal short-circuiting.

Kryon's TextIdeographic, six ranges of code points, drops from 55 to
41 LIR instructions. Across ten alternating Alpha rounds the Text
widget's Wasm module was faster in 8 (3.542 vs 3.677 us and 3.683 vs
3.713 us medians), with the paint result checked on every call. The
lowered parity fixture covers signed, unsigned, narrow and 64-bit
values, both orders, member reads, an empty range and repeated calls.
2026-11-18 15:32:50 -03:00
waozi 9748087d91 Read package mirrors through their GitHub remote in site pages
Package checkouts moved to Gitea keep GitHub as their github remote, so
site_pages.py compared the Gitea origin with the GitHub URL a manifest
names and failed on ziranlang/audio. It now reads the github remote
when one exists and origin otherwise.
2026-11-18 15:20:45 -03:00
waozi e6fdd96421 Pack Wasm frames with only the slots still in use
Wasm lowering lays out a frame slot for every record value before
planning decides which values are read in place, built in their
parent or caller, or never built. Only trailing unused slots were
dropped, so one small record after many in-place reads kept their
whole space: Shovey's LevelReplayPump, which reads single fields of
a 306 KB global 27 times, needed a 10.6 MB frame and failed with
wasm.gap.frame against the 8 MB limit.

CompactFrame now runs after planning. It gives each slot that a lowered
value still uses a packed offset sized to its furthest use, moves the
views into it, and tags unused slots so slot comparisons stay exact.
The frame size skips elided values, whose stale views reserved space
too. Shovey's bundle now lowers to a 16.8 MB module that V8
validates. The Wasm regression reads a 1 MB global ten times beside
a small record argument; the previous zx2wasm needed a 10 MB frame
for it.
2026-11-18 15:20:26 -03:00
waozi 68d845f49a Note verifying once and app native caches in the changelog 2026-11-18 15:12:07 -03:00
waozi 10f603625a Verify allocated code once and cache Android apps' native images
On a phone the bundle compile is the largest startup cost: Jungle spends
8.7 s in HostedAppStart on the Moto. Two parts of it were waste.

- Allocation verifies its program with MachineVerifyAllocated, and every
  encoder verified the same program again. The pipeline now encodes
  through MachineV7EncodeAllocated, MachineA64EncodeAllocated and
  MachineX64EncodeAllocated, which skip the repeat; the public encoders
  still verify what they are given.
- The native disk cache never worked in an Android app. Its key needs the
  compiler's GNU build ID, which Shovey's reproducible libmain.so does
  not have (-Wl,--build-id=none), and its directory came from HOME, which
  an app process lacks. Without a build ID the code is now identified by
  a 64-bit FNV-1a hash of the object's readable executable segments, and
  on Android an app's cache directory is /data/data/PACKAGE/cache. So only
  the first launch after an install compiles a bundle.

native_disk_cache_cases also runs a zi2zx stripped of its build ID: a cold
run stores the image and a warm run maps it.
2026-11-18 14:58:00 -03:00
waozi 5f95fae22f Publish the Targets cohort measured at 10570c2e
Every Targets table is regenerated from one clean pushed revision,
10570c2e, on Alpha's physical host with 11 host-gated samples. It
includes unbounded in-process native ZX, direct native console output
and host-call routing resolved once: the example programs run natively
in 0.024 us (score, text_demo), 0.17 us (enums), 0.48 us (arrays) and
0.70 us (loops), level with C on loops. Kernel and standard Wasm now
run without a step budget, like every other column: Sieve takes 39.0
us in Wasm instead of 59.3 and Hash 27.4 us instead of 37.6, level
with C and Go.
2026-11-18 14:57:20 -03:00
waozi 10570c2e39 Time unbounded Wasm in the kernel and standard tables
C, Go and the in-process ZX runners time calls with no step budget, but
the kernel and standard harness built their Wasm modules with fuel
checks and a zx.budget import. Both now use zx2wasm --unbounded, as
the widget table already does, and their methodology says the Wasm
module charges no step budget. A duplicate definition of the kernel
build function is removed.
2026-11-18 14:47:19 -03:00
waozi a4058c6011 Read large records in place and zero zeroed records once on ARM
Shovey trapped on the Moto when Play was pressed: LevelReplayPump needed
an 11.87 MB frame on ARMv7, and on AArch64, above the 8 MiB render
thread. ARM lowering kept aggregate views and in-place field loads off,
so every member read of the 306 KB global level_replay_check copied the
whole record into the frame.

- Views and field loads run on every target. The ARMv7 and AArch64
  encoders take a view's address as the aggregate of AggregateExtract and
  AggregateInsert, as x86-64 does.
- An aggregate build of zero constants and zero builds lowers to one
  StackAddress and Zero, and a member build only zero builds read emits
  nothing. Shovey's loop-local [241]ShoveyGame was 289,200 member stores:
  LevelReplayPump was 4.69 MB of ARMv7 code, and on AArch64 its branches
  left the conditional range, so the bundle did not compile.

Shovey's bundle: LevelReplayPump's frame is 1.84 MB on all three targets,
and its native code is 1.37 MB on ARMv7 (was 6.40), 0.91 MB on AArch64
(was rejected) and 0.86 MB on x86-64 (was 2.82). machine_fields_cases now
lowers, verifies and encodes on x86-64, ARMv7 and AArch64, with zero
builds; native_large_global_fields joins the parity programs.
2026-11-18 14:46:01 -03:00
waozi 0fdd5cdab1 Record the direct console services on Alpha
arrays.zi, enums.zi and loops.zi take about half the time per call;
enums.zi now runs faster than Wasm.
2026-11-18 14:31:38 -03:00
waozi 244db56e5c Take console service arguments straight from the saved registers (Alpha trial) 2026-11-18 14:21:55 -03:00
waozi 400f4c3edd Record the native console buffer on Alpha
Print-heavy examples take 8–11% less time per call.
2026-11-18 14:13:30 -03:00
waozi ef16754c17 Gather native program output in the console, as the engine does (Alpha trial) 2026-11-18 14:08:17 -03:00
waozi 0f1ed01d71 Record the native print path on Alpha
arrays.zi, enums.zi and loops.zi take about 45% less time per call.
2026-11-18 13:51:48 -03:00
waozi b63ebae04c Resolve each native host call's route once and format prints directly (Alpha trial) 2026-11-18 13:41:14 -03:00
waozi d7146386a5 Record the unbounded native column on Alpha
Unbounded instances run without fuel checks and a normal run no longer
flushes stdio: enums.zi takes 0.688 µs per call instead of 1.213, and
dijkstra 24% less time.
2026-11-18 13:33:18 -03:00
waozi fed9bd0f95 Leave a normal native run's output to stdio buffering, as the engine does (Alpha trial) 2026-11-18 13:27:16 -03:00
waozi 0bb3f36178 Run unbounded native instances without fuel checks (Alpha trial) 2026-11-18 13:09:55 -03:00
waozi 797332dec6 Publish the Targets cohort measured at ac64565e
Every Targets table is regenerated from one clean pushed revision,
ac64565e, on Alpha's physical host with 11 host-gated samples. In-process
ZX native entry no longer makes a system call per call, so the small
example programs run natively in about 0.03 us: score.zi 0.494 to
0.033 us and text_demo 0.493 to 0.032 us, now ahead of Wasm. Arrays,
enums and loops also run faster natively. Kryon widget medians (C / Go / ZX native / Wasm, us):

  Button  2.660 / 4.175 / 4.053 / 2.344
  Text    3.157 / 3.851 / 5.493 / 3.625
  Input   3.846 / 6.694 / 5.936 / 3.442
2026-11-18 13:08:34 -03:00
waozi 91bca360c8 Port the saved IR inspector driver to Ziran 2026-11-18 13:08:28 -03:00
waozi ac64565e50 Record the native entry measurement on Alpha
Every in-process entry made a prlimit64 system call; without it score.zi
takes 0.032 µs per call instead of 0.511, below Wasm.
2026-11-18 12:52:44 -03:00
waozi e6756bf62c Keep each thread's native stack range without a system call per entry (Alpha trial) 2026-11-18 12:42:32 -03:00
waozi 6205d2f20a Drop the ratio column from the Targets example table
The "Example programs compiled to four targets" table shows C, Go,
ZX native and Wasm times without a "Ratio to C" column. The kernel,
standard, widget and JSON/UTF-8 tables keep theirs.
2026-11-18 12:38:07 -03:00
waozi 30134bd9c1 Remove obsolete parser aliases and retired tool rules 2026-11-18 12:27:21 -03:00
waozi 1934aae05e Build saved IR expression ownership and source offsets in Ziran 2026-11-18 11:47:52 -03:00
waozi 55b0176800 Release Ziran 0.7.0
Wasm now runs all three Kryon widget scenarios faster than Go: Button
2.46 µs, Text 3.59 µs and Input 3.24 µs per two frames on Alpha. The
optimizer inlines small procedures and reads record members through
their inserts. Native x86-64 code is faster across division, shifts,
floating-point calls and small allocations. std/base64, JPEG reading
and writing, portable PNG inflate and core audio join the standard
library. The changelog section lists what users get, including the
known ARMv7 LevelReplayPump frame-limit issue. update_version.sh set
the version files and the standard-library inventory, and
site_pages.py regenerated the module pages for 0.7.0.
2026-11-18 11:30:26 -03:00
waozi 13c2a22ae6 Fix the audio codec, sanitizer optimizer and site page checks
- CI puts Emscripten's tree on PATH, and its cmake directory comes
  before the real cmake. Make's own lookup ran that directory, so
  make audio-codecs failed with "cmake: Permission denied". The
  audio rules now run CMAKE, which the shell resolves to the
  executable.
- Under AddressSanitizer, bundling the whole optimizer test takes
  more than the 180-second command limit. NativeRun takes an
  optional timeout, and those two bundle steps get 600 seconds;
  the sanitizer run passes in 220 seconds.
- The site page check reads the released version from VERSION
  instead of a literal, so a release no longer breaks it.
- The test scripts that make runs directly are executable.
2026-11-18 11:29:55 -03:00
waozi 0eaed218e5 Land load-test rotation and fixed member hoisting measured on Alpha
Merge the measured revision. Rotation copies a loop test that loads from
memory, and LICM hoists fixed member extracts such as a slice's data and
count. Across all 29 standard workloads the geometric mean improved
0.67%. Bytecode's unchanged code moves with placement, which the receipt
shows with a cross run.

Add a direct-assembly case: a loop over a slice reads its data and count
before the loop.
2026-11-18 11:27:55 -03:00
waozi 2806fb1cb5 Hoist fixed member reads out of loops (Alpha trial, with rotation) 2026-11-18 11:05:39 -03:00
waozi d898d1d122 Record the loop unswitching trial on Alpha
Splitting FASTA's middle loop on its phase test made FASTA and native
Input slower, so the pass was not kept. FASTA is bound by its modulo
chains and float divide; the plan keeps the raw samples.
2026-11-18 10:50:21 -03:00
waozi 884ef80bdb Publish the Targets cohort measured at 4f49aa9a
Every Targets table is regenerated from one clean pushed compiler
revision, 4f49aa9a, measured on Alpha's physical host with 11
host-gated samples and learning off: kernel tiers, the standard
diagnostic and compile suites, JSON/UTF-8 workloads, Kryon widgets
and the example matrix. The kernel receipt moves to its measurement
date, 2026-11-18.

Kryon widget medians, us per two-frame scenario, paint checked on
every batch (C / Go / ZX native / Wasm):

  Button  2.693 / 4.325 / 4.810 / 2.461
  Text    3.105 / 3.894 / 6.301 / 3.592
  Input   3.998 / 6.588 / 6.400 / 3.236

Wasm now runs every widget scenario faster than Go, and Button and
Input faster than C. The published cohort at 45b74b4e had Text at
4.153 us in Wasm against 3.837 us in Go.
2026-11-18 04:04:10 -03:00
waozi 177bcfd845 Rotate loops whose test loads from memory
The latch's copy of the test runs where the header's test ran, so each
instruction, fuel included, keeps its order and runs once per original
header visit. Loads, element and field addresses, and adds, subtracts,
masks and conversions can therefore join the duplicated test; a load or
address that traps still traps at the same point. Quicksort's scan loops
`while a[i] < pivot` now end in one branch back to themselves.
2026-11-18 03:16:50 -03:00
waozi 4f49aa9aff Add std/base64, portable JPEG decoding, and portable PNG inflate 2026-11-18 02:55:40 -03:00
waozi 6669a95333 Write zeroed records in Wasm with wide stores
A zero-initialized record, such as the 260-byte paint text block Kryon
pushes when a frame starts a new block, was built with one byte store
per array member and then copied into place.

Wasm lowering now tracks values whose bytes are all zero: zero scalar
constants and constructors built only from them. A constructor writes
adjacent zero members as one run, with unrolled 8-byte stores up to
320 bytes and memory.fill beyond. A store or allocation of a zero value
fills its destination. A zero constructor that only stores, allocations
and other constructors read is never built. Omitted members are still
left for the insert that overwrites them.

The Text widget module goes from 609 to 198 byte stores. In five
alternating Alpha rounds its Wasm median went from 3.890 to 3.604 us,
faster in every round, with the paint result checked on every call.
Button and Input keep their paint results. The Wasm regression covers
zeroed vector pushes, a 404-byte filled record and zero members beside
other members.
2026-11-18 02:55:11 -03:00
waozi 674412ede3 Land the Boolean specialization guard measured on Alpha
Merge the measured revision. Button and Input return to their speed
before Boolean specialization in native and Wasm, and spectral-norm keeps
both Multiply copies.

Also drop the compiler_opt_unswitch registration that reached the
Makefile without its module, so a clean checkout builds again.
2026-11-18 02:44:58 -03:00
waozi 7f9c508814 Build typed-body eligibility in Ziran
Move type, expression and statement eligibility to a bootstrapped module. Keep the thread-local memo and recoverable expression scratch in the C services and reuse the existing parameter cache.

Verified identical results for 2,129 checked functions and four rejection cases, all 270 local tests, and Linux, Darwin, and SIMD bootstrap replay.
2026-11-18 02:31:34 -03:00
waozi ee671ab680 Keep Boolean specialization from adding aggregate work
A literal Boolean copy is made only when folding the literal leaves no
record or array load without its field read; the backends would copy the
whole value for an unused aggregate load. Separately, DeadPass drops an
unused load when the same block loads the same type at the same address
again before any effect, since that later load raises the same trap.

TreeLayerAt$1 no longer copies the widget tree on every Button and Input
frame.
2026-11-18 02:25:06 -03:00
waozi 7e0695890c Format the full signed 64-bit range
Take decimal digits from a nonpositive magnitude so the minimum signed 64-bit integer never requires a positive magnitude that cannot be represented. Cover both endpoints in the existing formatter fixture and regenerate all affected bootstrap C.

Verified all 270 local tests and Linux, Darwin, and SIMD bootstrap replay.
2026-11-18 02:22:36 -03:00
waozi 1269a28afd Share SIMD vector type metadata in Ziran
Use one bootstrap table for vector recognition, C and Go spellings, and native block selection. Keep global record fields needed to reparse retained initializers.

Verified 1,022 vector queries against the previous compiler, all 270 local tests, and Linux, Darwin, and SIMD bootstrap replay.
2026-11-18 02:18:24 -03:00
waozi a1325927ad Copy fewer record bytes in Wasm lowering
Kryon widget calls copied whole records into Wasm linear memory to read
a few fields. Unchecked Wasm lowering now:

- copies only the byte span of the fixed members a snapshot's uses
  extract, and skips the member a single in-place insert replaces;
- initializes a fresh allocation straight from an aggregate member read
  in place while its source is unchanged;
- writes a load, fixed-member insert and store to the same pointer as a
  single member store when neither snapshot escapes.

Snapshot reads after an intervening write keep the original values. In
five matched Alpha rounds the Text widget scenario measured 3.851 us in
Wasm against 3.848 us in Go, with the paint result verified on every
call. The optimized zx_wasm regression covers snapshot reads and member
replacement across calls and vector member stores.
2026-11-18 02:17:40 -03:00
waozi e0a05faa5e Check site receipt inputs at the commits that measured them
The site receipt checks compared every recorded stdlib, workload and
harness hash with the working tree, so an unrelated std edit made
make check fail until the whole cohort was re-measured on Alpha.

Compiler inputs (stdlib, source inputs, workloads) are now read with
git cat-file at the receipt's measured revision. Harnesses are read at
the commit that published the receipt, or from the working tree while
a fresh receipt is uncommitted. Published copies and artifacts are still
checked on disk, and a missing revision or changed digest still fails.
The site workflow fetches full history so those commits are available.
2026-11-18 02:17:12 -03:00
waozi 0c4465a461 Build frontend expression IR in Ziran
Move statement structuring, default arguments, and caller locations into the Ziran parser seed. Keep the frontend ABI and checker diagnostics, and remove the former C implementation.
2026-11-18 01:47:58 -03:00
waozi 05ced3662c Read local fixed-array lengths without loading the array
Fold the count of a plain fixed-array local before loading its value. Keep evaluation of calls and other effectful receiver expressions. Record the matched k-nucleotide improvement on Alpha for native ZX and Wasm.
2026-11-18 01:06:09 -03:00
waozi 343de87f21 Specialize loop branches for literal Boolean arguments
Keep one out-of-line copy per literal value of an entry Boolean that controls a loop branch. Preserve the original function for runtime arguments and indirect calls. Spectral-norm improves in all 18 matched rounds on Alpha.
2026-11-18 00:26:13 -03:00
waozi 93853cd5ee Shorten the x86-64 multiply-by-31 dependency chain
Use the encoder scratch register to keep the original value while shifting. Extend the existing constant-arithmetic parity fixture to cover narrow and wide signed wrap. FASTA improves in 17 of 18 matched rounds on Alpha.
2026-11-17 23:11:19 -03:00
waozi d1b30019b2 Emit one shift for signed halves of even products
Keep exact truncation for odd products and cover signed wrap at narrow and wide widths. Alpha spectral-norm is 24.2% faster in the matched run. Extend the existing file-scope fixture to check private procedures with different signatures across named imports.
2026-11-17 22:33:11 -03:00
waozi adcf0873b2 Publish expanded standard benchmark cohort 2026-11-17 22:31:24 -03:00
waozi 241d817fa2 Consolidate Ziran check drivers and Unicode conformance cases 2026-11-17 22:30:07 -03:00
waozi c243baa6ae Canonicalize package graph roots through symlinks 2026-11-17 22:30:06 -03:00
waozi 68dc0f8cac Record the in-process step-check cost and the n-body record copies
The native speed plan now has the diagnostic Alpha comparison of the
same kernels compiled with and without fuel (fib +12%, spectral-norm
+16%, quicksort +10%) and what an unbounded in-process mode would need,
and notes the whole-record copies in n-body's body loop.
2026-11-17 22:25:16 -03:00
waozi 94e4fdcfc4 Check with the pinned Emscripten instead of Ubuntu's package
Since the check job started installing Ubuntu's emscripten package
(dd0aff64), the emcc checks that used to skip run against emcc 3.1.6 and
fail: audio_checks and native_entry run /usr/share/emscripten/wrapper,
the resolved target of Ubuntu's emcc symlink, which finds its script only
under the name it was called by; std_file_tree_wasm32 passes -sSTACK_SIZE,
which 3.1.6 does not have; date_time_linux fails in its clang-15 build.

Both check jobs now install Emscripten 6.0.6 with setup-emsdk, the
version the site workflow and local builds use, in place of the apt
package. With emsdk 6.0.6 first on PATH the four checks pass locally, and
std_file_tree_wasm32 runs rather than skipping.
2026-11-17 22:17:37 -03:00
waozi 8489739d3f Leave float constants at their uses again
Hoisting float constants out of call-free loops (96ce8d50) removed
mandelbrot's in-loop movabs/movq rebuilds, but the matched Alpha run made
the floating-point kernels slower, C / before / with it, µs: spectral-norm
10,457 / 20,924 / 33,951, mandelbrot 69,062 / 110,890 / 139,693, n-body
29,940 / 62,720 / 67,040. LICM keeps standalone constants at their uses
again, as before; the cause is not isolated yet. `x*2.0` as `x+x` stays.
The plan records the numbers and what a retry should check.
2026-11-17 22:16:25 -03:00
waozi 512ddb2e88 Make a loop-carried value in the register its parameter holds
Register allocation hinted a block parameter toward its first incoming
value's register, but not the other way round. A value computed in a loop
and passed back to the loop's parameter got whichever register was free;
after a call that was the result register, so the back edge copied it
into the parameter's register on every iteration, in a block of its own
with an extra jump. The rewritten Fib's accumulator did exactly that:
`add %r12,%rax`, then `mov %rax,%r12` on the way back.

A value passed on an edge now prefers its destination parameter's
register, choosing a back edge's parameter, which is assigned before the
value, over a forward one. The hint only orders registers that are free
for the whole interval, so allocation stays valid as before. Fib's loop
now adds into %r12 and jumps straight back; the one copy moves to the
exit.

regalloc_cases BackEdgeCase builds that loop shape and checks that its
back edge carries no register-changing move; it fails without the hint.
2026-11-17 22:07:23 -03:00
waozi 96ce8d50d6 Keep float constants in registers through call-free loops; x*2.0 is x+x
LICM leaves standalone constants at their uses, which suits integers: x86
takes them as immediates. A float constant has none: each use rebuilt it
with movabs and movq inside the loop. In a loop with no call, which would
clobber every XMM register, a float constant now moves to the preheader
and stays in a register. Mandelbrot's inner loop no longer rebuilds 4.0
and 2.0 on every iteration.

Constant folding rewrites a float multiply by 2.0 as an add of the other
operand to itself. x+x is exactly x*2.0 for every input, signed zeros,
infinities and NaNs included, and needs no constant; GCC emits the same
addsd for mandelbrot's 2.0*zr*zi.

Retained cases: a call-free float loop whose 1.5 moves to the preheader
while its integer constants stay (compiler_opt_licm_cases), and x*2.0
becoming x+x with the same results for 1.5, -0.0, infinity, a NaN and the
smallest subnormal (compiler_opt_float_cases).
2026-11-17 21:39:48 -03:00
waozi 45b74b4e31 Turn a self call added to a value into an accumulator loop
A function whose block ends `r = F(args); s = x + r; return s` (integer
result, either operand order) now adds x to an accumulator and jumps back
to its old entry with args instead of calling itself; every other
`return v` returns `acc + v`, and a new entry starts the accumulator at
zero. Integer addition wraps, so the regrouped sums are exact. The
replaced call ran last in its block, so effects keep their order. The old
entry's fuel moves to the new entry and each jump back charges one step,
so a run counts the same steps as before. GCC does the same at -O2.

Only a function that also has a base-case return is rewritten: one whose
only exit is the self call cannot return normally, so runaway recursion
such as `1 + Forever(depth + 1)` still takes the stack trap instead of
becoming an endless loop.

Fib(n-1) + Fib(n-2) keeps one call per loop iteration, half the calls.
The pass runs first in LirOptBuild, before inlining, as
compiler_opt_accumulate.zi. The new entry takes values 0.. as its
parameters, which native lowering expects of an entry block.

The three passes that each kept a private copy of the same encode/read
helper now share LirSsaSerialize in compiler_opt_ssa.zi.

compiler_opt_accumulate_cases covers fib (one self call left, values for
n = 0..20 with and without inlining), a call added to itself, a float sum
and a function with no base case (all three unchanged).
2026-11-17 21:23:03 -03:00
waozi e0f10da84b Move the compiler lexer adapter into Ziran 2026-11-17 21:19:44 -03:00
waozi aa3e9452bf Keep native heap offset assertions specific to x86-64 2026-11-17 21:09:06 -03:00
waoziandClaude Opus 5.5 91af270734 Share the ARM encoders' trap codes and Relocate
Both targets numbered their nine trap codes alike; they are now
NativeTrap* in compiler_encode.zi, and Relocate, identical once the
relocation kind was shared, moves there too. Each trap sequence's size
stays with its target. The encoders' output is unchanged for all 473
programs of the ZX corpus. Code-size cut 14: 15 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 19:50:52 -03:00
waozi 4c5b7e8eec Expose processor counts and explicit native pool sizing 2026-11-17 19:44:15 -03:00
waoziandClaude Opus 5.5 37f7455c4e Share the ARM encoders' relocations and image builder
One NativeRelocationKind, numbered as both targets' enums were, and the
NativeRelocation record replace each target's own; the mapping to
machine-image kinds and widths and BuildMachineImage, generic over the
encoder's owner, move into compiler_encode.zi. The AArch64 and ARMv7
encoders produce the same output for all 473 programs of the ZX corpus.
Code-size cut 13: 139 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 19:40:48 -03:00
waozi 7f17dcabeb Fold constant divisors and align loop heads on x86-64
The x86 selection plan folds a positive constant divisor that fits an
immediate into the division, which divides by shifts or a high multiply,
so the encoder no longer leaves the divisor's dead register load in loops.
Every loop head now starts on a 32-byte boundary: the divisor change alone
moved fannkuch-redux's loop and cost it 9%.

Alpha A/B against master, microseconds (C, master, now): spectral-norm
10483 23258 21745, fannkuch-redux 16101 19981 19162, mandelbrot 71693
115721 114387, matmul 3992 10673 11877 (five spills in its inner loop
instead of four), quicksort 12692 14119 14439; others within noise.
2026-11-17 19:32:31 -03:00
waozi e6f45f0d57 Keep XMM values across calls whose callee leaves them untouched
A direct x86-64 call to an internal function that register allocation has
already finished now clobbers only the XMM registers that function's
allocated code writes, plus its own calls' masks and the cycle scratch.
Callers keep floating-point values live across such calls in registers
instead of spilling and reloading them. Indirect, recursive and
not-yet-allocated callees keep the full ABI set.

The allocated-code verifier recomputes every function's mask and rejects
a direct call whose XMM clobber does not cover its callee's. The
regalloc cases cover a float leaf, a transitive wrapper, indirect,
recursive and later-allocated callees, a removed clobber, and the mask
collection's work budget.
2026-11-17 19:25:31 -03:00
waoziandClaude Opus 5.5 84f33e9b6a Share the ARM encoders' bookkeeping in compiler_encode
compiler_aarch64.zi and compiler_armv7.zi held the measuring and writing
passes' bookkeeping, operand and type lookups, block and function targets,
the layout arrays and the global image writer twice, word for word. They
now live once in compiler_encode.zi; procedures over the encoder state are
generic over it, so each target keeps its own State. zi2c now declares a
generic's copy whose signature names a module-private type behind the
header's _PRIVATE guard, which this needed.

The AArch64 and ARMv7 encoders produce the same code, ranges, relocations
and entry for all 473 programs of the ZX corpus. Code-size cut 12: 126 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 19:16:28 -03:00
waozi 66bd467132 Shift by constant counts with an immediate on x86-64
The x86 selection plan folds a shift whose count is a constant inside the
operand's width, and the encoder emits shl, shr or sar by that immediate:
no count in cl and no range check, which such a count cannot fail.
native_constant_shifts checks every width and signedness against C.

Alpha A/B against master, microseconds (C, master, now): nqueens 5324 7918
7568; other workloads unchanged within noise.
2026-11-17 18:56:58 -03:00
waozi 0422744e10 Test an inclusive range's end once per iteration on x86-64
An inclusive range with a computed end desugars to a loop that leaves on
cursor == last and steps; rotation copies the header test cursor + 1 <=
last into the latch, where it always holds. The x86 selection plan marks
it known when every entry into the loop tested its value against last and
the latch runs only after the equality exit; lowering drops the compare and
jumps. LIR keeps the test for the vectorizer.

Alpha A/B against master, microseconds (C, master, now): fasta 111321
134842 131285, spectral-norm 10473 24260 23271, fannkuch-redux 15952
20472 20006, quicksort 12712 14342 14088, matmul 3983 10879 10690.
2026-11-17 18:43:53 -03:00
waoziandClaude Opus 5.5 65084bf882 Share the constant owner and the bounded file reader
zi2go repeated the emitter's lookup of the module that owns a constant;
it now calls NativeConstantOwner. zi2zx, zx2wasm and zx2native each read
a bounded whole file; they now call CommandReadBounded, each keeping its
own diagnostic. Code-size cut 11: 53 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 18:39:23 -03:00
waoziandClaude Opus 5.5 b488c2a322 Share the expression owners and the target choice
zi-inspect repeated zir_serial.c's expression owners word for word; it now
calls ExpressionOwners. zi2c, zi2go and zi2zir each chose the target from
--target-os and --target-cpu; they now call CommandConfigureTarget.
Code-size cut 10: 40 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 18:23:16 -03:00
waozi 680f746969 Inline Finite32 and Finite64 in generated C
They move to std/finite, which std/math re-exports. std/math's C header is
named math.h, like the C library's, and such headers get no inline copies,
so every caller made an out-of-line call for three comparisons. finite.h now
carries #inline copies. std_finite_cases checks NaN and infinities on C and
native ZX and that finite.h holds both copies.
2026-11-17 18:23:03 -03:00
waoziandClaude Opus 5.5 46b5935540 Hold the Go SIMD helpers to the C reference
zir_emit_simd_go.c carried a 690-line Go port of zi_ref as a C string,
written only by GoSimdWriteCheck: every helper a program calls has a
typed body, so a missing one is now an internal error. tests/simd_go_ref.go
binds zi_simd_ref to the C zi_ref through cgo, and tests/simd_go.sh checks
all 1,060 typed helpers against it. Code-size cut 9: 665 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 18:12:53 -03:00
waozi b8d9637711 Publish the site's benchmark tables measured at fa65a3fb
One Alpha cohort at fa65a3fb, host gate on, 11 samples: kernels, standard
diagnostic sizes, compile times, examples, JSON and text, and widgets with
the unbounded Wasm build. In the standard set ZX native now beats C on
binary-trees (42.2 against 92.2 ms) and ties it on string-hash. The plan
records matmul's remaining redundancies.
2026-11-17 17:45:56 -03:00
waozi fa65a3fbd9 Report no value for in-process native entries without a result
NativeInstanceRun copied the result register even for a void entry, so
an embedder that compared the value saw whatever the entry's last call
returned. The site's Printing kernel failed this way once allocation stopped
leaving zero there. native_load runs a void entry whose last call returns
42 and expects no result and zero.
2026-11-17 17:32:31 -03:00
waoziandClaude Opus 5.5 3c905a61c1 Unroll Wasm record copies up to 320 bytes
CopyFixed moved a fixed-size value of more than 64 bytes with
memory.copy, which engines run out of line: V8 calls into the runtime for
it. A Kryon paint command (284 bytes) and text record (303 bytes) were
copied that way each time a command was queued or read back. Copies up to
320 bytes are now unrolled into 8-, 4-, 2- and 1-byte loads and stores;
bulk copies keep memory.copy.

Alpha (i7-8700, Node), unbounded Kryon widget scenarios, µs per two-frame
call, before -> after: Button 3.18 -> 3.00, Text 4.63 -> 4.41, Input
5.15 -> 4.45.

Local tests: zx_wasm.sh, zx_web_lifecycle.sh, zx_lowered_parity.sh,
compile_targets.sh, checks_granularity, proven_pointer, nested_vec,
module_parameters, context_scope, insert_source and tool_names pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 17:18:46 -03:00
waozi 478c74a9cf Allocate small blocks in in-process x86-64 code
Resize in in-process native code takes a machine-code fast path for blocks
of at most 256 bytes: per-instance free lists of 16-byte classes and bump
allocation from 1 MB chunks, behind a 16-byte header of count and element
size xor a per-instance cookie. Anything else, including a block whose
header does not match, goes to the host as before, which uses the same
heap for small blocks.

Alpha A/B against master, microseconds (C, master, now): binary-trees
98101 223496 46346; other workloads unchanged within the session's noise.
plans/2026-11-17-standard-benchmarks.md ranks what native still loses.
2026-11-17 17:17:07 -03:00
waoziandClaude Opus 5.5 284fd5ae59 Delete the C functions nothing calls
ImportKindName, FoldIntegerOperation and ExecBundleBytes (with its
no-engine stub) have no caller in any source, test or consumer repo.
The plans drop finished and stale items: the range proofs, the deleted
GPU emitter and Go SIMD body header, and SHA-256, which keeps its C
hardware path. Code-size cut 8: 35 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 17:02:31 -03:00
waozi 7899b2d32b Bound the wasm disassembly in the SIMD check
llvm-objdump 18, the one CI installs, never finished disassembling the
check's 12 KB wasm32 modules, which LLVM 19 lists in 20 ms, so the check
and sanitize jobs ran out of time. A disassembly past a minute now leaves
the SIMD128 count unchecked with a message; a failing one still fails.
2026-11-17 17:01:08 -03:00
waoziandClaude Opus 5.5 bd243f9915 Lower unbounded Wasm without fuel and drop unused frames
`zx2wasm --unbounded` (LowerExecutableUnbounded) makes the module for a
run with no step budget, as a native executable with unbounded fuel is:
fuel instructions emit nothing, no procedure keeps a budget local, and
the module defines global 0 itself instead of importing the mutable
zx.budget, so every other global keeps its index. The budgeted module is
unchanged and stays the default for the playground and limited runs.

The site's widget table builds its Wasm column unbounded, like the C and
Go builds, says so in its methodology, and hashes the Ziran Wasm lowering
(cmd/compiler_zx_wasm*.zi) in place of the deleted zx_wasm_lower.c.

A procedure reserved edge scratch for every block's aggregate
parameters, the entry's arguments included, so one taking a string or a
record set up a stack frame it never used. Scratch is now reserved only
for a block an edge enters with two or more aggregates, the only case
EdgeCopy stages through it.

Alpha (i7-8700, Node), Kryon widget scenarios, µs per two-frame call,
budgeted before -> unbounded with the frame fix: Button 4.07 -> 3.00,
Text 6.05 -> 4.37, Input 6.09 -> 4.57.

Local tests: zx_wasm.sh (new unbounded case: no zx.budget import, same
output, a host with no budget), zx_web_lifecycle.sh, site_pages --check;
make check on HEAD plus this change passes everything a source-only copy
can run (277/284: the 7 others need git metadata, the site tables or a
short path); check-bootstrap matches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 16:53:31 -03:00
waozi 398bd43d9c Divide by constants, align code and branch on float compares on x86-64
Division and remainder by a positive constant that is no power of two use
a high multiply. Functions and ELF/PE code start 32-byte aligned, and
branches stay inside 32-byte blocks, which the jump-erratum fix on Intel
cores needs to keep loops decoded. Ordered float compares fuse with their
branch.

Alpha A/B against master, in-process native, microseconds (C first):
fib 18657 71209 55947, spectral-norm 10433 33048 24017, fasta 110915
288201 134253, quicksort 12684 18539 14294, string-hash 5594 6916 5610,
fannkuch-redux 15693 24525 20530, mandelbrot 71657 120123 114955.
2026-11-17 16:40:01 -03:00
waoziandClaude Opus 5.5 c510c4c8ff Port the C emitter's index range proofs to Ziran
cmd/compiler_c_range*.zi (six modules) replace cmd/zir/zir_emit_range.c:
range facts, conditions and guards, polynomial index proofs, callers'
spliced copies and definite initialization. bootstrap/compiler_c_range/
seeds them for the bootstrap compiler, and zir_emit_internal.h keeps the
emitter's call names as macros over the Ziran entry points.

zi2c and zi2go write the same C and Go as before for 475 programs, with
and without --checks. Code-size cut 7 (bootstrap rank 3).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 16:34:23 -03:00
waoziandClaude Opus 5.5 d11ae9fe3b Delete zx2native paths it can never run
zx2native reads only .zx and emits only elf, map and image, so its
source-loading branch, optimizer run, lir/opt-report/zx outputs, run
path and their helpers were dead; it also no longer links zx_exec_run.o.
The explain registry drops assembly.gap.machine-parallel, which only
the deleted path emitted. Code-size cut 6: 184 lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 15:32:59 -03:00
waozi c4c853819a Place x86-64 check traps after each function's blocks
A passing check now falls through instead of taking a branch over its
trap. Each trap call sits after the function's blocks, and the image
writer and trap-site lookup accept trap and fuel fields there for the
checking instruction's own function.
2026-11-17 15:25:51 -03:00
waoziandClaude Opus 5.5 7fbc8152b0 Look for loops only at blocks an edge leads back to
Hoisting, induction-variable rewriting and loop rotation tried every
block of every function as a loop header, and each try walked the whole
function, so their work grew with the square of a function's size.
Shovey's hosted app bundle (1,178 functions, 215,660 instructions) ran
out of the optimizer's budget in hoisting: "optimization rejected:
problem=5". LirLoopHeaders in cmd/compiler_opt_dom.zi marks the blocks a
depth-first walk from the entry reaches again through an edge back to a
block still on its path; every natural loop's header is one, so no loop
is missed. The three passes search only those blocks, marking them again
after each rewrite, and jump threading uses the same walk.

tests/compiler_opt_budget_cases.zi builds a 3,000-block function with
one loop and requires the optimizer to finish in under 20 million units
of work with unchanged results: it now takes about 0.55 million, and
took 253 million before.

Local tests: compiler_opt.sh and compiler_vectorize.sh pass; make check
on HEAD plus this change passes everything a source-only copy can run
(277/284: the 7 others need git metadata, the site tables or a short
path); check-bootstrap matches; the Kryon widget benchmark and bitmap
image tests pass; Shovey's desktop app.zx bundle builds (48.5 MB).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 14:34:35 -03:00
waoziandClaude Opus 5.5 3005017a2c Port the ZX to Wasm lowering to Ziran
cmd/compiler_zx_wasm*.zi replaces cmd/zx2wasm/zx_wasm_lower.c and .h:
module-wide types, layout, signatures and host shapes; the per-procedure
encoders; block ordering, loop structure, in-place views, member
placement and slot coalescing; instruction lowering; procedure bodies
with frame save and rewind; the heap, image and output helpers; and the
module assembly and API. The modules are part of the instruction engine
that cmd/compiler_runtime.zi names, so zir_zx_wasm.c and zx2wasm call
them under the engine names. A bootstrap build has no engine and keeps
failing stubs for the bundle Wasm tier, as before.

The C and Ziran lowerers give the same bytes for 310 executables from
this tree and Kryon (plain, --opt and --checks), both normal and
suspendable, and report the same wasm.gap codes. The explain inventory
finds the Ziran Gap and WasmDiagnose calls.

Net hand-written code: -794 lines (running total 39,710, 13.69% of the
290,000-line baseline).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 14:29:31 -03:00
waoziandClaude Opus 5.5 e6f4ccecce Publish the mesh-client package page and refresh package pages
GitHub renamed ziranlang/daochi-client to ziranlang/mesh-client, so the
site package inventory lists mesh-client and its page replaces the
daochi-client page. Its exported modules import each other as
mesh_client/..., so site_pages.py reads a package like that through its
own manifest (ziran api --project) instead of plain module paths.

The modules, telegram and webp pages and the sitemap are regenerated from
the current, pushed package sources and the current sitemap order. The
Records native frequency receipt records which harness files and settings
its remeasurements share with the published run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 14:10:13 -03:00
waoziandClaude Opus 5.5 c3b3028f18 Eliminate common subexpressions over the dominator tree
cmd/compiler_opt_dom.zi orders a function's blocks in dominator-tree
preorder, with immediate dominators from the iterative method of Cooper,
Harvey and Kennedy. The CSE pass walks that order with a scoped table, so
arithmetic, comparisons and record reads repeated in a block that an
earlier copy dominates reuse that copy; the earlier one runs first on
every path, so traps and effect order are unchanged. Constants,
conversions, addresses and byte comparisons are still reused only within
their own block: the backend folds them into their uses there, the
pointer prover sees an index converted beside its access, and a byte
comparison reads memory.

Copy propagation and jump threading also run before inlining, so callees
are measured as they will be after cleanup. Member-read inlining charges
its growth to the program's size after each round's cleanup rather than
to each copy it inlines, for up to four rounds.

tests/compiler_opt_cse_cases.zi checks reuse across a dominating block
and none between sibling blocks (fails with the block-local pass). The
optimizer fixture's answer function now merges into one block, and the
regression's compacted constant table lists the folded 14 before 65535.

Local tests: compiler_opt.sh, compiler_vectorize.sh and
proven_pointer_cases.zi pass; make check on HEAD plus this change passes
everything a source-only copy can run (277/284: the 7 others need git
metadata, the site tables or a short path); check-bootstrap matches; the
Kryon widget benchmark and bitmap image tests pass. Alpha A/B of the Wasm
widgets against the previous commit is within noise (Button 4.11 vs
4.17 us, Text 6.23 vs 6.31, Input 6.12 vs 5.87).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 14:05:46 -03:00
waozi 386130b636 Allow independent x86-64 addition results with LEA
Leave integer ADD untied so reused inputs do not require allocator copies. Emit ordinary ADD for shared input/result registers and LEA for independent results, retaining immediate bounds and narrow normalization. Other operations and architectures retain their ties.

Local tests: old encoder and lowering fail the new cases; candidate passes exact bytes, allocation with zero copies/spills, native/lowered parity, full suite 284/284 and bootstrap comparisons. Alpha timing pending.
2026-11-17 12:19:37 -03:00
waoziandClaude Opus 5.5 794a12f458 Thread jumps and merge straight-line blocks
cmd/compiler_opt_thread.zi runs before each CFG simplification. An edge
into a block that only jumps goes on to that jump's target. An edge into
a block that only branches goes to the side it selects when the
condition is a constant there, and a jump into such a branch becomes the
branch. A block is skipped only when its parameters are used in its own
terminal, and no edge moves onto a loop header, so each loop keeps the
one unconditional entry and the one latch that hoisting and rotation
need. Each block whose only predecessor jumps to it then joins that
predecessor. Blocks no longer reached go with their values; every
instruction, fuel included, still runs on each path it ran on.

Short-circuit conditions lower to blocks that join a flag and branch on
it; they now branch directly. The Kryon Button bundle falls from 7,255
blocks and 4,276 jumps to 4,169 and 1,175, and from 1.58 to 1.35 MB;
Text and Input shrink alike.

Local tests: tests/compiler_opt_thread_cases.zi (fails without the
pass), make check 284/284, check-bootstrap matches, and the Kryon widget
benchmark and bitmap image tests pass. Alpha timing is pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 12:19:05 -03:00
waoziandClaude Opus 5.5 0b34cc8a11 Fold theme lookups through joined records and member-read inlining
A member read of a record joined from several branches moves into each
branch, so the edges read the member instead of carrying the record. A
call to a pure procedure whose result is then read only member by member
is inlined for those reads, from callees up to four times the call limit,
for up to three rounds after the program is folded. A Kryon widget's
theme lookup becomes the constant colour or size it reads: the Button
scenario calls DefaultTheme once instead of 17 times.

Control-flow simplification that makes a jump's target the new entry
block drops the old entry instead of leaving it jumping into the new
one, and leaves an entry block with parameters in place.

Local tests: make check 284/284, check-bootstrap matches, and the Kryon
widget benchmark and bitmap image tests pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 12:19:05 -03:00
waoziandClaude Opus 5.5 c6768a4d60 Port zi2c's C pruning pass to Ziran
cmd/compiler_c_prune.zi replaces cmd/zi2c/zir_c_prune.c and .h: it keeps
only the C interface an entry-linked program uses, chunk by chunk, as the
C pass did. zi2c links its generated module, and bootstrap/compiler_c_prune
seeds it for the bootstrap compiler; check-bootstrap compares that seed.
zir_c_lower.c keeps the mark writer and the inline-section text it shared
with the pass, which the Ziran module calls as PruneInlineText.

The C and Ziran passes write the same files for 178 closed programs in
this tree and 119 Kryon programs, lowered directly with zi2c.

Net hand-written code: -117 lines (running total 38,916, 13.42% of the
290,000-line baseline).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 11:46:12 -03:00
waozi ffef721f5e Keep spilled values in memory through unused successor blocks
Only propagate a spilled location over its sole actual incoming edge, leaving joins and real fixed/tied reads under the existing allocation policy. Charge the scans to the allocator work budget.

Local tests: regression fails with the old allocator (two spills and two reloads) and passes with this change (one of each), existing cold joins and allocated verification pass, native/lowered parity pass, full suite 284/284 and bootstrap comparisons match. Alpha timing remains pending.
2026-11-17 11:27:41 -03:00
waoziandClaude Opus 5.5 ba6290c771 Publish the Alpha cohort at 5a2ee505 with in-process kernel native
Kernels, the standard suite at diagnostic sizes, compile time and the
example, JSON/UTF-8 and widget tables are measured again on Alpha behind
the host clock gate at 5a2ee505, which has hardware sqrt, the scalar
conversion fix and the callee-first inliner. Native n-body falls from
378 to 64.5 ms (C 30.1) and spectral-norm from 112 to 26.9 ms (C 10.3).

The kernel table's ZX native column now runs each bundle translated in
process, so it no longer carries process startup: Records reads 21.1 us
against C 16.5. Sieve, Vectors and Printing are slower in process than
the old per-process figures; the gap list explains why.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 11:21:34 -03:00
waozi 0bf00c77db Remove record-field pairing; it measured neutral on Alpha
The SSE2 pairing of adjacent record-field updates fired in the Records
hot loop but did not change its speed: 19.48 against 19.50 µs per call
on Alpha's i7-8700 with process startup amortized over 512 calls (C:
16.5 µs). Both lanes must return to general registers for the bounds
compares, so seven vector instructions replaced eight scalar ones. The
other kernels' executables were byte-identical with and without it.

Restore the pre-pairing machine IR, lowering, verifiers and x86 emitter,
delete cmd/compiler_vectorize_pair.zi and its tests, and keep both Alpha
receipts (bench/results/records-pair-*-alpha-2026-11-17.json). The plan
names the remaining Records gap to C.
2026-11-17 11:07:40 -03:00
waoziandClaude Opus 5.5 5a2ee505c0 Time kernel native in process and re-pick the gated core
The kernel native column ran 32 calls per zx2native process, so every figure
carried about 5 µs of process startup that C, the engine and Wasm exclude. It now
runs the same bundle through site_target_host.c with the native backend, translated at instantiation before warmup; the ELF is still run once as an output check. The host gate re-picks the quietest core after a rejection, waits for its hyperthread to settle, and logs each rejection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 11:02:37 -03:00
waoziandClaude Opus 5.5 08f85f5d15 Generate the SIMD headers at build time from a Ziran generator
scripts/simd/ (17 Ziran modules) replaces scripts/simd_header.py and
writes ziran_simd_ops.h, ziran_simd_types.h and zir_simd_go_bodies.h into
$(BUILD_DIR)/simd before anything includes or embeds them. The build
compiles the generator from its seed in bootstrap/simd; check-bootstrap
regenerates and compares that seed and update-bootstrap refreshes it.
The committed headers are deleted; the generated output is byte-identical
apart from the first comment line naming the generator. tests/simd_go.sh
drops its Python comparisons, which the seed check replaces.

Net hand-written code: -38,751 lines (running total 38,799, 13.38% of
the 290,000-line baseline).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 10:59:38 -03:00
waozi d033f60448 Read record members through inserts and drop unused pure calls
The copy pass follows an extracted member down the chain of inserts that
built its record: the insert that replaced that member gives the value,
and inserts of other members are looked past, up to the aggregate that
began the chain. The dead-code pass removes a call whose result is unused
when its procedure cannot be observed: no stores, host or indirect calls,
operations that may trap or loops, and calls only to such procedures.
Effects are renumbered after removal.
2026-11-17 02:24:08 -03:00
waozi 3f69e9c5fd Remove argument-register hint after matched Alpha regression
Restore the prior allocator and retained fixtures: the candidate removed both fib argument moves but increased measured fib time by 13.20%, despite passing correctness tests. Keep all 165 timed results and standard host-gated samples in the negative Alpha receipt. No unmeasured microarchitectural cause is claimed.

Local tests after removal: regalloc, zx_native, lowered execution parity, full make check (284/284), and make check-bootstrap, with learning off.
2026-11-17 02:16:59 -03:00
waozi 1ac1653faa Inline callees after their own calls are inlined
The call inliner visits functions callees first, by a depth-first search
of the call graph without recursion, and copies each callee in its
expanded form. A helper's inlined helpers come with it, and a callee that
grew past the size limit stays a call instead of bringing its original
calls along. spectral-norm's Spectral now calls Multiply, which has A
inlined, instead of calling A inside its loops.
2026-11-17 02:06:30 -03:00
waozi b9b66c1b8a Prefer tied arithmetic results in available fixed argument registers
Carry the result fixed-register preference back to its short tied-input copy only when the register is free through the result interval. Preserve source and previous-part hints otherwise, avoiding new pressure splits.

Local tests: free and occupied argument register fixtures, regression fails with old allocator, zx_native, C/engine/native/Wasm execution parity, full make check (284/284), and make check-bootstrap. Alpha matched timing follows at this pushed revision.
2026-11-17 02:01:55 -03:00
waozi 378e2870d3 Merge record-field pairing onto master
Keeps the Alpha-measured pairing commit in history.
2026-11-17 01:53:19 -03:00
waozi 4a488a44f3 Inline single-block callees in place
A callee with one block whose returned value one of its instructions
defines, such as std/math.Sqrt, is copied straight into the caller's
block: its parameters become the call's operands and the returned value
becomes the call's result, with no continuation block, jump or block
parameter. n-body's Nbody returns to 31 blocks with no calls left.
2026-11-17 01:51:52 -03:00
waozi 970b7687db Record Alpha scalar conversion dependency comparison
Retain 11 matched interleaved samples, standard host gates, raw samples and symmetric IQR exclusions. All 165 timed runs match C. Spectral-norm takes 13.84% less time. Retain the unrelated matmul timing difference without attributing it to the conversion encoder, and document remaining assembly findings. Source changes passed the full local suite and bootstrap before their feature pushes.
2026-11-17 01:51:23 -03:00
waozi f662d6c53a Pair adjacent record-field updates into SSE2 operations
Native x86-64 lowering now recognises two adjacent 64-bit integer
record-field updates read from disjoint adjacent fields of the same
record (x += dx; y += dy and the subtract/and/or/xor forms) and emits one
VectorPair instruction: two unaligned 16-byte loads, one packed integer
operation and one store, then both scalar results extracted for later
uses such as bounds comparisons.

The planner (cmd/compiler_vectorize_pair.zi) runs after the verified
virtual program is finalised, under the compiler's work and byte
budgets, and only for unchecked, unfueled x86-64 code. Both verifiers
check the packet form; XMM0/XMM1 are explicit clobbers so live
floating-point values are allocated elsewhere. Overlapping field pairs,
extra uses of the loaded values and checked builds keep scalar code.
2026-11-17 01:48:35 -03:00
waozi d647525b07 Break false XMM dependencies before scalar integer conversions
Clear unused high lanes before legacy CVTSI2SD/CVTSI2SS, preserving the converted value and condition flags while making the conversion independent of earlier arithmetic. Measure and write paths share the same encoder.

Local tests: exact low/high register encodings and output limits, signed/unsigned f32/f64 rounding boundaries and random integers against an integer ties-to-even reference through C/engine/native/Wasm, zx_native, full make check (284/284), and make check-bootstrap. Alpha matched timing follows at this pushed revision.
2026-11-17 01:39:58 -03:00
waozi 5065f7a577 Delete superseded historical benchmark receipts 2026-11-17 01:36:16 -03:00
waozi ceb9de7737 Record Alpha hardware sqrt and recursive entry comparisons
Retain 11 matched interleaved samples, standard host gates, raw samples and symmetric IQR exclusions. All 330 timed runs match C. Separate the two compiler cohorts and identify remaining native gaps. Source changes passed the full local suite and bootstrap before their feature pushes.
2026-11-17 01:28:32 -03:00
waozi 439dbcf10d Remove unused C helpers and superseded records 2026-11-17 01:21:52 -03:00
waozi 84a89f4c8e Return simple integer base cases before the x86-64 frame setup
Track original incoming integer arguments through pure allocated copies and emit a small leaf return before saving registers or reserving the frame. Keep checked, fueled, effectful and narrow-integer entries on their ordinary path. Fold adjacent 64-bit copies and constant additions/subtractions into LEA.

Local tests: exact encoder and exclusion fixtures, recursive signed/unsigned call parity against C, zx_native, full make check (284/284), and make check-bootstrap. Alpha matched A/B follows at this pushed revision.
2026-11-17 01:10:10 -03:00
waozi 52aad2d6cf Document the optional audio package after the core move
Regenerate the published audio package page and its module index row from the validated Opus and sinc package.
2026-11-17 01:00:02 -03:00
waozi 2313b49cb0 Add core IMA and Microsoft ADPCM WAV decoding
Validate mono/stereo blocks, coefficients, fact frame counts and bounded output. Exercise exact independent PCM references, source/saved mixer playback and malformed input. Limit the upstream Vorbis shift sanitizer exception to its external target.
2026-11-17 00:49:53 -03:00
waozi bda3d67882 Inline small procedures across their callers' control flow
LirInlineCalls copies a direct call's small portable callee into the
caller: the call's block ends with a jump to the copied entry, each copied
return jumps to the rest of the block, whose parameter is the result, and
effects are renumbered. Callees are the input versions, so the pass goes
one level deep. Eligible callees have at most 48 instructions, keep no
stack storage, do not call their host and do not call themselves. The
program grows by at most half (at least 256 instructions) and never past
what the remaining optimizer work admits, so a very large program keeps
its budget. The program is written and verified once.

Inlining makes accesses through small helpers' parameters direct, so the
pointer-proof fixture expects the new direct counts and its width tamper
targets the widest direct store. Fixtures that test a nested call, Twice
for the frame budget and Divide for a debug trap's procedure name, call
themselves on a never-taken branch so they stay calls.
2026-11-17 00:29:16 -03:00
waozi 515449986e Lower f64 square root to hardware instructions across native and portable targets
Replace software normalization and Newton iterations with a checked f64 sqrt intrinsic and pure LIR operation. Emit sqrtsd, fsqrt, vsqrt.f64 or f64.sqrt; use the corresponding C/Go operation in generated output and the portable engine. Keep the embedding library free of a new errno fallback dependency.

Local tests: full make check (284/284), make check-bootstrap, exact encoder bytes on all native backends, source/saved C and Go parity, native/Wasm/engine parity, malformed LIR rejection and portable budget equivalence. Independent integer digit-by-digit reference matches libm at every exponent and one million bit patterns. Alpha A/B follows at this pushed revision.
2026-11-16 23:56:16 -03:00
waozi e0367fa9c5 Restore signed interval comparison folding
Restore the compiler, bootstrap and regression hunks inadvertently reset by the audio integration.
2026-11-16 23:35:04 -03:00
waozi 03543b73fd Fix bank-specific scratch detection in native copy verification
Retain the conditional floating-point argument regression.
2026-11-16 23:20:52 -03:00
waozi 255a96027a Retain interleaved Alpha native backend measurements
Measure the same frozen standard ZX bundle with baseline and improved native runtimes and independent C on physical Alpha. Retain eleven interleaved samples per target, all host-gate attempts, raw timings, checksums and the driver source.

N-body improves13.1% and spectral-norm38.0%; large gaps remain. Other measured kernels change little. Local receipt validation verifies11 accepted checksum-matching runs per target; compiler full local suite and bootstrap passed before the measured commit.
2026-11-16 22:50:43 -03:00
waozi b88ab90c92 Share native Vorbis builds and validate Windows audio ABI 2026-11-16 22:40:16 -03:00
waozi 426c732928 Optimize native constant division and fix cross-block register copies
Use shifts with a signed rounding bias for division and remainder by known positive powers of two. Keep layout-adjacent live-range gap transfers inside one block; existing edge copies reconcile actual control flow.

Local validation: make check (284/284), make check-bootstrap, exact x86 encoder bytes, integer width/boundary/random parity, and a backward-definition regression that fails with the old allocator. All 54 inlined parity bundles also match engine output with the fix. Alpha timing follows at this pushed revision.
2026-11-16 22:37:31 -03:00
waozi 13bb919632 Measure every site table at one commit behind a host clock gate
The published native kernel column had run at about half clock: Alpha's
powersave/HWP governor moves between 0.8 and 4.3 GHz and short native
processes caught it low. wasm_tier.py --host-gate now runs each
measured job on one logical CPU of the quietest core, inherited by the
child so no wrapper process adds time, with Go at GOMAXPROCS=1, and
polls that CPU's clock and its hyperthread sibling from the other
cores. A job is kept only if its clock stayed within 3% of its median
at 95% of the calibrated sustained clock with the sibling idle;
otherwise it runs again, and rejected attempts stay in the receipt.
The kernel and standard generators refuse ungated receipts.

Kernels, the standard suite at diagnostic sizes, compile time and the
example, JSON/UTF-8 and widget tables are all measured again at
d3feb8a3; native Sieve, Records, Hash and Vectors now read 52.8, 36.5,
33.2 and 41.5 us, matching the matched A/B lanes. Widget downloads name
Kryon's license after its repository and drop stale copies, and the
example, JSON and widget generators gain --render.
2026-11-16 22:30:21 -03:00
waozi d3feb8a34b Rotate loops in memory and write the program once
LirRotate serialized, re-read and re-verified the whole program after
every rotated loop, so a large program paid one full codec round trip and
three verifications per loop: bundling compiler_opt_test made 1041
whole-program reads and 3144 verifications, past CI's 180 s step limit.
Rotations now rebuild each function in memory, keep only its latest
version, and the program is written and verified once at the end. An
unsupported rotation is still skipped and any other failure still stops
the pass.

That bundle takes 10.8 s instead of 41 s (88 s before the verifier and
codec fixes), and compiler_opt.sh 65 s instead of 250 s.
2026-11-16 21:55:24 -03:00
waozi 6742ac54cc Retain Alpha Records bounds-fold measurements and limitations
Keep fresh matched-harness raw samples, compiler provenance, restoration
guards and independent IQR verification. Document unchanged-binary host
variation and the remaining native gap against C without a causal claim.
2026-11-16 21:50:30 -03:00
waozi dd0aff6424 Move non-UI audio into std with Android PCM and async sinks 2026-11-16 21:46:29 -03:00
waozi 617dd0ede2 Fold stable signed interval checks during ZX lowering
Use one same-width unsigned comparison for repeated signed interval checks
on stable locals, record members and fixed-array elements. Preserve calls
and other expressions whose second evaluation can matter.

Cover signed widths, extrema, member/index paths and short-circuit behavior
in the retained lowered parity fixture; refresh generated bootstrap code.

Local validation: compiler optimization/vectorization and lowered parity,
full retained suite (284/284), and bootstrap comparison.
2026-11-16 21:45:54 -03:00
waozi 6d7ddadb72 Document only current Ziran behavior
Remove obsolete migration, roadmap and research documentation. Describe the current native/ZX/Wasm pipeline, manual safety and offline learning. Refresh current guides and remove historical website prose while preserving unpublished audio work.
2026-11-16 21:40:58 -03:00
waozi 83d541dc68 Keep cheap loop invariants near their uses
Retain dependencies of useful invariant expressions without hoisting standalone cheap values across growth loops. Add spill and correctness regressions and retain matched Alpha comparisons.

Local validation: 284/284 retained tests and bootstrap matched. Vectors improved from 85.8 to 42.5 microseconds on physical Alpha.
2026-11-16 21:27:29 -03:00
waozi 8cabdb9e64 Add standard language benchmarks and one clean site number format
bench/standard/ holds recursive Fibonacci, n-body, spectral-norm,
mandelbrot, fannkuch-redux, binary-trees, fasta, nqueens, integer matrix
multiplication, quicksort and FNV-1a hashing in Ziran, C and Go, every
input read at run time and every result checked against C.
wasm_tier.py --standard measures C, Go, native ZX and Wasm on Alpha's
physical host; standard-compile times whole-suite builds. The kernel
table gains Go references. Receipts at the published compiler commit
6a066abd, the earlier 96c23c7d receipts and a ranked native-versus-C
gap list are retained in bench/results/standard/.

Every benchmark table on /targets now uses one format: three significant
digits, thousands separators, no scientific notation, one unit per
table in its header. Python generators share format_number in
site_targets.py; the Ziran renderer uses scripts/site_numbers.zi; the
site test checks both against NUMBER_CASES and the page for exponents.
targets.js shows the pre-formatted texts instead of formatting itself.
The example and JSON/UTF-8 tables were re-measured with the updated
harness on the same host and commit so their harness hashes hold.
2026-11-16 21:06:32 -03:00
waozi 7897145d25 Verify dominance once per function and read codec fields whole
The LIR verifier checked that a definition dominates each use by searching
the control flow graph from the entry around the defining block, once per
use, so a large function cost uses times blocks. It now builds one
dominator tree per function (Cooper, Harvey and Kennedy over reverse
postorder) and answers each use with a pre/post interval comparison. The
verifier also frees its tables.

The codec read and wrote every integer byte by byte with a bounds check
per byte; a whole 32- or 64-bit field now takes one check, and a field
that does not fit still goes byte by byte, so truncation errors and their
offsets are unchanged.

Every optimizer pass verifies and round-trips the whole program, and the
loop passes added more of both, so bundling compiler_opt_test grew past
CI's 180 s step limit. That bundle now takes 41 s instead of 88 s on the
development desktop.
2026-11-16 20:49:05 -03:00
waozi bafbad6c8b Publish one-revision site tables with the Wasm widget fix
Kernels, examples, JSON/text and Kryon widgets were measured together at
6a066abd on one physical Intel Core i7-8700 host, 11 samples each, checks
and learning off, with Kryon exported at its pushed 08f70214. Wasm widgets
take 5.59, 7.27 and 8.41 µs per two frames (Button, Text, Input) instead
of 1056, 715 and 1234 µs, faster than native ZX (7.09, 9.14, 9.86 µs);
Go takes 4.11, 3.72 and 6.65 µs.

The kernel table drops the constant-folded Calls row, and its driver no
longer builds it. Library receipts record the compiler package path, so a
project pinned to an older compiler cannot pass as the one measured.
2026-11-16 20:03:23 -03:00
waozi 22c756016b Record matched Alpha loop and SIMD benchmark results
Retain both physical Alpha cohorts, raw samples and exclusions, host observations, compiler provenance and the exact measured harness delta. Record the remaining C gaps and Vectors regression without attributing changes to an individual pass.

Local verification passed for all 40 target/kernel sample sets and exact harness reconstruction. Compiler suite and bootstrap validation are retained in the prior milestone receipt.
2026-11-16 19:55:40 -03:00
waozi 6a066abdb2 Build Wasm record members where their parent keeps them
zx2wasm reads a large record's fields where the record lies instead of
copying it whole, gives record parameters and results the caller's
storage, and leaves out constructor stores that are overwritten before
use. A member, call result or returned record is now built directly in
the parent field, caller result or join where it ends up, and a returned
load copies once, from its pointer. Kryon's default theme was copied
record by record on every lookup; its constructors now copy nothing.

A host call that only reads a []T argument no longer copies its elements
back when they are unchanged.

The Wasm fixture covers snapshots across stores, calls and edges,
by-value aliasing, members that read the field they replace, a parent
made after its member, joins, and read-only host views.
2026-11-16 19:51:53 -03:00
waozi ebd19223fa Link Windows ZX external hosts through named DLL imports 2026-11-16 19:15:37 -03:00
waozi ddd853e149 Retain record types referenced by linked foreign signatures 2026-11-16 18:43:50 -03:00
waozi 18fb5aeb6c Optimize shared LIR loops and native SIMD prefixes
Add bounded natural-loop discovery, total scalar LICM, modular induction
strength reduction and deterministic block layout before native/engine
lowering. Preserve SSA edges, effects and zero-trip behavior, with retained
Ziran coverage through the existing optimizer entry point.

Add guarded SSE2 prefixes for supported integer reductions and slice maps,
with scalar tails, checked/fuel fallback, overlap guards and retained C
differential tests. Reject unsupported entry instruction placement and
malformed vector forms with a diagnostic.

Repair merged scalar allocator intervals and selected-expression binding
joins; retain allocation/short-circuit regressions and regenerate the matching
bootstrap seed.

Local validation: full retained suite 281/282, all compiler tests pass;
bootstrap matches. The sole suite failure is stale generated site pages.
Compiler inputs and seven binaries stayed unchanged. The global source guard
recorded an unrelated site generator change and two new foreign-record test
fixtures; these files are excluded. Alpha performance remains unmeasured.
2026-11-16 18:31:38 -03:00
waoziandClaude Sonnet 5.5 ae16ed5112 Record that the Records native slowdown is CPU frequency, not code
The published Records native 100.5 us (revision 96c23c7d) against 47.8 us
(revision 1fd89e81) is not a compiler regression. The native ELF in both
receipts has the same sha256 (as do all six kernels' native ELFs between
them), the same revision re-measured on the same physical host with the
same harness gave 47.75 us, and one unchanged ELF takes 45.4 us per call
at 4.3 GHz and 240.9 us at 0.8 GHz: time x frequency is constant
(195.7 us*GHz, 192.7-197.2 over 26 steady rounds), which puts the 100.5 us
run at about 1.95 GHz. Revision 36e6caf9, with the constructor placement
commit, measures 47.2 us. Pinned to cpu 0, 2 or 4 the same ELF is slower
still because those logical CPUs share a core with a busy sibling thread.

The receipt keeps the script, the raw rounds with the frequency read
before and after each, and the same-revision re-measurements.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-16 18:30:15 -03:00
waozi 225784c977 Record guarded Alpha C-teacher and widget comparisons 2026-11-16 18:25:03 -03:00
waoziandClaude Sonnet 5.5 898f58a5fb Build a returned record in the caller's result memory
When every return of a function gives the same aggregate class, that class
and every member class placed in it now live in the memory the caller's
hidden result address names, so the return has nothing to copy. The hidden
address belongs to the callee alone while it runs: callers pass a frame
object of their own (or a host buffer), and nothing else holds its address.

The planner (ChooseResult) picks the class only when the record is at least
16 bytes (a smaller copy is one or two moves, cheaper than saving and
setting a register) and declines a returned parameter or a class holding
one, two different classes returned on different paths, a split record, a
view, and anything but a plain aggregate operand; those keep the copy.

On x86-64 such a function keeps the address in r14
(MachineAbiResultPointerRegister): the prologue sets it from rax beside the
existing store of the hidden address, frame layout saves it like any
callee-saved register, allocation never hands it out
(MachineFunction.result_register), StackMemory turns an object placed in
the ResultAddress object into [r14 + placed_at], and Return skips the copy.
A nested shadow-token builder shaped like Kryon's DefaultShadows now zeroes
and fills [r14 + ...] directly; a recursive Chain passes its own result
memory to its recursive call.

Both machine verifiers check the new form: a placed Value object lies in
the result memory only in a function that says so, within the result type's
size, with offset equal to placed_at; the allocated verifier also requires
exactly one hidden result address, the saved register, and no allocated use
of it. A member placed at a packed, unaligned layout offset keeps only the
alignment that offset has (commented in lowering).

Retained tests: machine_place_cases gains the result cases (returned record
and its members placed, small records, parameters and two returned classes
copied, a call between a member and its record, a member spanning two
blocks) and structural and allocated negatives for the result placement;
machine_elf.sh runs a native program with a loop-built 280-byte record, a
packed record with an unaligned float64, a record inside another at an odd
offset, recursion, many live values, shared and rebuilt records.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-16 17:16:07 -03:00
waozi a129921478 Repair shared LIR SSA arguments and rotate guarded loops
Add bounded SSA repair and loop rotation modules with retained tests for exits, nesting, parameter renaming, fuel ordering and unsupported CFGs. Keep rotated integer range proofs precise with finite widening thresholds.

Validated on canonical Omega: build and bootstrap pass; all compiler suites pass in the stable full run, and the two publication failures pass after focused reruns. Retain raw benchmark samples and report the remaining C performance gap.
2026-11-16 16:57:57 -03:00
waozi 36e6caf964 Learn verified native integer idioms from C and tune offline policies
Add modular Ziran C/native assembly comparison and SIGPROF reports for the
six kernels, three widget scenarios and hello. Use closed differential-tested
multiply idioms, compact IMUL immediates and bounded scalar leaf inlining.

Extend ziran learn with offline rule verification and deterministic policy
selection joined to current-format corpus identities. Builds use a reviewed
versioned source table; benchmarks keep recording off. Identical artifacts
share timing evidence, so the initial calibration retains the baseline policy.

Local validation: 281/281 tests and bootstrap passed; the subsequent stable
constructor checkpoint passed all compiler tests and bootstrap. Its two site
receipt failures were resolved and both retained site tests passed in a
separate final run. Preserve all raw timings, exclusions and source-epoch
limitations in bench/results. Remaining loop/widget work stays with its lanes.
2026-11-16 16:56:03 -03:00
waoziandClaude Sonnet 5.5 e991274a2e Build record members where their parent keeps them and fold float constants
A member value built only to be put into a parent's storage now takes a
frame object inside the parent's on x86-64, so the copy at the use moves
a member onto itself and emits nothing. It covers the members of an
aggregate build, the value of an insert that updates its source in place,
a value inserted through a changed view at a constant offset, and a call
result used as a member. A class qualifies when it lives in one block, has
exactly one use outside it, nothing between its first definition and that
use touches the parent's storage, nothing defines or uses it after that
use, and the parent has a frame home. An aggregate build whose members
are all replaced one constant member at a time before it is read emits
nothing. The planner charges all of its work to the shared budget and
declines instead of failing when it would run out.

The machine IR gains placed stack objects (placed_in, placed_at). Frame
layout gives them no space, x86-64 CopyMemory skips a copy onto the same
memory, and both verifiers check that a placed object is a Value of the
same function lying inside a parent that has a home; the allocated
verifier also keeps placed objects out of the no-overlap sort.

The optimizer folds f64-to-f32 and f32-to-f64 constant conversions to the
hardware's patterns (ties to even, overflow to infinity, subnormals) and
float negations; a NaN keeps its operation.

A nested shadow-token builder shaped like Kryon's DefaultShadows shrinks
from 1759 to 661 bytes of code. Retained tests: machine_place_cases (eight
planner cases on hand-built LIR with frame verification, budget accounting
and malformed placements), compiler_opt_float_cases (28 vectors checked
against hardware conversion), and a native nested-record program in
machine_elf.sh with shared, escaping, loop-carried and call-result
members.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-16 16:53:04 -03:00
waozi 1a97a1a571 Publish verified Wasm widgets and one physical-host benchmark cohort 2026-11-16 16:52:02 -03:00
1932 changed files with 1448946 additions and 249991 deletions

No files matched your search

+144
View File
@@ -0,0 +1,144 @@
# Generated by waozixyz/gitea-ops scripts/test-ziran.py --emit from
# .github/workflows/check.yml (Linux check job) for Build's Gitea runner.
name: Build check
on:
# Prose alone cannot break a check. CHANGELOG.md is read by the version check.
push:
branches: [master]
paths: ['**', '!**/*.md', CHANGELOG.md]
pull_request:
paths: ['**', '!**/*.md', CHANGELOG.md]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: false
jobs:
check:
name: check
runs-on: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'build-native-ziran' || 'build-primary' }}
timeout-minutes: 90
env:
JOBS: 2
BUILD_NATIVE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'true' || 'false' }}
steps:
- name: Check out the exact Build commit
id: native
if: env.BUILD_NATIVE == 'true'
run: gitea-native-build checkout
- uses: actions/checkout@v4
if: env.BUILD_NATIVE == 'false'
# site_pages.sh marks std modules shipped in the latest v* tag.
with:
fetch-depth: 0
- uses: actions/setup-go@v5
if: env.BUILD_NATIVE == 'false'
with:
go-version: '1.25'
cache: false
# tests/zstd_go_cases.zi builds against this module with GOPROXY=off,
# and the module itself requires Go 1.25.
- name: Fetch the Go Zstandard module for the offline Go checks
if: env.BUILD_NATIVE == 'false'
run: cd "$RUNNER_TEMP" && go mod download github.com/klauspost/[email protected]
- name: Install ripgrep, MinGW, Wine, Vorbis, ARMv7 tools and the private display for the test scripts
if: env.BUILD_NATIVE == 'false'
timeout-minutes: 5
run: sh scripts/ci_packages.sh ccache ripgrep zip unzip gcc-mingw-w64-x86-64 wine wine64 xvfb xauth libsdl2-dev ffmpeg libvorbis-dev python3-markdown gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user clang-18 lld-18
# The emcc checks use the Emscripten the playground and the site use;
# Ubuntu's emscripten package is 3.1.6, and its emcc is a symlink to a
# wrapper that cannot run under its resolved name.
- name: Set up Emscripten
if: env.BUILD_NATIVE == 'false'
uses: emscripten-core/setup-emsdk@v15
with:
version: '6.0.6'
- name: Keep compile results between runs
if: env.BUILD_NATIVE == 'false'
uses: ./.github/actions/compile-cache
with:
key: check
- name: Verify the cached native toolchain and Go modules
if: env.BUILD_NATIVE == 'true' && steps.native.outputs.current == 'true'
run: gitea-native-build run bash -ec 'emcc --version && go mod download github.com/klauspost/[email protected]'
- name: Build the toolchain
if: env.BUILD_NATIVE == 'false' || steps.native.outputs.current == 'true'
run: |
if [ "$BUILD_NATIVE" = true ]; then
gitea-native-build run make
else
make
fi
- name: Run the language, backend, and portable runtime checks
if: env.BUILD_NATIVE == 'false' || steps.native.outputs.current == 'true'
run: |
if [ "$BUILD_NATIVE" = true ]; then
gitea-native-build run env -u DISPLAY -u WAYLAND_DISPLAY WINDOWS_REQUIRED=1 ARM_REQUIRED=1 WASM_REQUIRED=1 ZIRAN_WASM_CC=clang-18 make check CHECK_JOBS=2 </dev/null
else
env -u DISPLAY -u WAYLAND_DISPLAY WINDOWS_REQUIRED=1 ARM_REQUIRED=1 WASM_REQUIRED=1 ZIRAN_WASM_CC=clang-18 make check CHECK_JOBS=2 </dev/null
fi
- name: Pack the tested Ziran toolchain
id: toolchain
if: github.server_url == 'https://git.waozi.xyz' && github.event_name == 'push' && github.ref == 'refs/heads/master' && (env.BUILD_NATIVE != 'true' || steps.native.outputs.current == 'true')
env:
SOURCE: ${{ steps.native.outputs.source || github.workspace }}
run: |
output="build/toolchains/$GITHUB_SHA"
if [ "$BUILD_NATIVE" = true ]; then
gitea-native-build run python3 scripts/toolchain_package.py pack "$GITHUB_SHA" "$output"
else
python3 scripts/toolchain_package.py pack "$GITHUB_SHA" "$output"
fi
printf 'directory=%s/%s\n' "$SOURCE" "$output" >> "$GITHUB_OUTPUT"
- name: Keep the verified toolchain archive
if: steps.toolchain.outputs.directory != ''
uses: actions/upload-artifact@v4
with:
name: toolchain-${{ github.sha }}
path: ${{ steps.toolchain.outputs.directory }}
if-no-files-found: error
- name: Publish the toolchain to Gitea Packages
if: steps.toolchain.outputs.directory != ''
env:
SOURCE: ${{ steps.native.outputs.source || github.workspace }}
OUTPUT: ${{ steps.toolchain.outputs.directory }}
ZIRAN_TOOLCHAIN_PACKAGE_USER: ${{ secrets.ZIRAN_TOOLCHAIN_PACKAGE_USER }}
ZIRAN_TOOLCHAIN_PACKAGE_TOKEN: ${{ secrets.ZIRAN_TOOLCHAIN_PACKAGE_TOKEN }}
run: |
if [ -z "$ZIRAN_TOOLCHAIN_PACKAGE_USER$ZIRAN_TOOLCHAIN_PACKAGE_TOKEN" ]; then
echo "Gitea package writer is unavailable. The toolchain is in this run's artifacts."
exit 0
fi
for descriptor in "$OUTPUT"/*.json; do
python3 "$SOURCE/scripts/toolchain_package.py" publish "$GITHUB_SHA" "$descriptor"
done
- name: Show how much the compile cache saved
if: always()
run: |
if [ "$BUILD_NATIVE" = true ]; then
gitea-native-build run ccache --show-stats || true
else
ccache --show-stats || true
fi
- name: Keep complete check logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: check-logs
path: ${{ steps.native.outputs.source || github.workspace }}/build/check-logs/
release:
name: Publish a new Ziran version
needs: check
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: build-native-ziran
permissions:
contents: write
steps:
- name: Check out the tested Build commit
run: /usr/local/libexec/gitea-native-build checkout
- name: Publish the tested VERSION to Gitea
env:
ZIRAN_RELEASE_TOKEN: ${{ github.token }}
run: /usr/local/libexec/gitea-native-build run python3 scripts/release_gitea.py
+114
View File
@@ -0,0 +1,114 @@
name: Publish website
on:
push:
branches: [master]
paths:
- examples/**
- site/**
- web/playground.c
- web/bundle.c
- scripts/build_playground.zi
- scripts/site_target*
- scripts/site_library_targets.py
- scripts/site_kernel_targets.py
- scripts/site_standard_benchmarks.zi
- scripts/site_benchmark_*.zi
- bench/standard_cases.zi
- bench/json_text.py
- scripts/site_numbers.zi
- bench/results/standard/**
- scripts/benchmark_samples.py
- bench/results/wasm-tier-*.json
- tests/site_targets.sh
- bootstrap/runtime/**
- cmd/package*.zi
- cmd/compiler_*.zi
- bootstrap/**
- std/**
- Makefile
- .gitea/workflows/pages.yml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: site-production
cancel-in-progress: false
jobs:
build:
if: github.ref == 'refs/heads/master'
runs-on: build-primary
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
# Receipt checks read inputs at the commits that measured and published them.
fetch-depth: 0
persist-credentials: false
- name: Set up Emscripten
uses: emscripten-core/setup-emsdk@v15
with:
version: '6.0.6'
- name: Build the browser playground
run: |
rm -rf site/examples
mkdir site/examples
cp examples/*.zi site/examples/
make -j2 all
emcc_path=$(command -v emcc)
build/bin/ziran run --target=c scripts/build_playground.zi -- --emcc "$emcc_path"
node tests/playground_runtime.cjs
node tests/web_bundle_runtime.cjs
- name: Verify target matrix and site links
run: |
env -u DISPLAY -u WAYLAND_DISPLAY sh tests/site_targets.sh build/bin/ziran
python3 scripts/site_links.py
- name: Upload the verified site
uses: actions/upload-artifact@v4
with:
name: ziran-website
path: site/
if-no-files-found: error
include-hidden-files: true
deploy:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: build-native
timeout-minutes: 15
steps:
- name: Download the verified site
uses: actions/download-artifact@v4
with:
name: ziran-website
path: site/
- name: Prepare Wrangler
run: npm exec --yes [email protected] -- wrangler --version
- name: Deploy Ziran to Cloudflare Pages
shell: bash
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
WRANGLER_SEND_METRICS: 'false'
run: |
set -euo pipefail
test -s site/index.html
: "${CLOUDFLARE_API_TOKEN:?Missing Pages deployment token}"
: "${CLOUDFLARE_ACCOUNT_ID:?Missing Cloudflare account}"
npm exec --offline --yes [email protected] -- wrangler pages deploy site \
--project-name=ziran --branch=master --commit-hash="$GITHUB_SHA"
- name: Verify the production asset
shell: bash
run: |
set -euo pipefail
for attempt in 1 2 3 4 5 6; do
if curl -fsSL --max-time 20 "https://ziran-lang.org/assets/playground-runtime.js?revision=$GITHUB_SHA" | cmp -s - site/assets/playground-runtime.js; then
exit 0
fi
if [ "$attempt" -lt 6 ]; then sleep 5; fi
done
echo 'Production Ziran asset differs from the deployed site' >&2
exit 1
+26
View File
@@ -0,0 +1,26 @@
name: Quick Ziran build
on:
workflow_dispatch:
permissions:
contents: read
jobs:
quick:
# Build's primary host slot. ccache is installed on the host.
runs-on: build-primary
timeout-minutes: 15
steps:
- uses: https://github.com/actions/checkout@v4
with:
persist-credentials: false
- uses: ./.github/actions/compile-cache
with:
key: check
- name: Compile and start Ziran
run: |
make JOBS=2 build/bin/ziran
build/bin/ziran --version
- name: Report compile cache savings
if: always()
run: ccache --show-stats
+291 -76
View File
@@ -1,11 +1,11 @@
name: Set up Ziran
description: >
Check out the Ziran a project's ziran.lock pins with its compiler built, put
its build/bin on PATH and optionally fetch the locked packages. The build
tree is the Toolchains workflow's prebuilt archive for that commit, else
this repository's cache, else a build here. Package checkouts are cached by
the whole lock and start from the previous checkouts when it changes,
keeping only the ones the lock uses.
Set up the Ziran revision pinned by a project's ziran.lock, put its
build/bin on PATH and optionally fetch the locked packages. The build
tree comes from this repository's exact verified cache, the Toolchains
workflow's prebuilt archive for that commit, or a build here. Package
checkouts are cached by the whole lock and start from the previous checkouts
when it changes, keeping only the ones the lock uses.
inputs:
project:
@@ -25,6 +25,12 @@ inputs:
Ubuntu packages to install, separated by spaces or lines, from the
canonical Ubuntu archive with time limits (scripts/ci_packages.sh).
default: ''
jobs:
description: Make jobs (1–64), capped by the runner's JOBS allocation when set. Defaults to JOBS or 1.
default: ''
min-free-mib:
description: Minimum available MiB at each destination (checkout, runner scratch, and requested package cache).
default: '1024'
recommends:
description: Also install the packages' recommended packages.
default: 'false'
@@ -51,49 +57,90 @@ outputs:
runs:
using: composite
steps:
- name: Resolve the Ziran commit
- name: Resolve inputs and check available space
id: resolve
shell: bash
env:
PROJECT: ${{ inputs.project }}
CHECKOUT: ${{ inputs.path }}
COMMIT: ${{ inputs.commit }}
FETCH: ${{ inputs.fetch }}
PACKAGES: ${{ inputs.packages }}
REQUESTED_JOBS: ${{ inputs.jobs }}
MIN_FREE_MIB: ${{ inputs.min-free-mib }}
run: |
set -euo pipefail
lock="$PROJECT/ziran.lock"
digest=none
if [ -f "$lock" ]; then
digest=$(python3 -c 'import hashlib, sys; print(hashlib.sha256(open(sys.argv[1], "rb").read()).hexdigest())' "$lock")
for tool in python3 git mktemp rm mkdir printenv; do
if ! command -v "$tool" >/dev/null; then
echo "::error::Ziran setup requires $tool on PATH"
exit 1
fi
done
python3 - <<'PY'
import hashlib, json, os, re, shutil, sys, tempfile
from pathlib import Path
def number(label, value, maximum):
if not re.fullmatch(r'[1-9][0-9]*', value) or len(value) > len(str(maximum)) or int(value) > maximum:
raise ValueError(f'{label} must be an integer from 1 to {maximum}')
return int(value)
def probe(path, needed):
directory = path
while not directory.exists():
directory = directory.parent
if not directory.is_dir():
raise ValueError(f'expected a directory for {path}, found {directory}')
try:
with tempfile.TemporaryFile(dir=directory) as scratch:
scratch.write(b'ziran setup preflight')
scratch.flush()
except OSError as error:
raise ValueError(f'cannot write scratch for {path} in {directory}: {error}') from error
available = shutil.disk_usage(directory).free // (1024 * 1024)
if available < needed:
raise ValueError(f'{directory} has {available} MiB available for {path}, needs {needed} MiB')
env = os.environ
try:
allocation = number('JOBS allocation', env['JOBS'], 64) if env.get('JOBS') else None
requested = number('jobs input', env['REQUESTED_JOBS'], 64) if env['REQUESTED_JOBS'] else allocation or 1
jobs = min(requested, allocation) if allocation else requested
minimum = number('min-free-mib', env['MIN_FREE_MIB'], 1048576)
workspace = Path(env['GITHUB_WORKSPACE']).resolve()
checkout = Path(env['CHECKOUT'])
root = (workspace / checkout).resolve()
if not env['CHECKOUT'] or checkout.is_absolute() or workspace not in (root, *root.parents):
raise ValueError(f'checkout path must be relative to the workspace: {checkout}')
lock = Path(env['PROJECT'], 'ziran.lock')
lock_data = lock.read_bytes() if lock.is_file() else None
digest = hashlib.sha256(lock_data).hexdigest() if lock_data is not None else 'none'
commit = env['COMMIT']
fetch = env['FETCH'].lower() == 'true'
if not commit or fetch:
if lock_data is None:
raise ValueError(f'missing lock file: {lock}')
toolchain = json.loads(lock_data)['toolchain']
if not commit:
commit = toolchain['commit']
if not isinstance(commit, str) or not re.fullmatch('[0-9a-f]{40}', commit):
raise ValueError(f'expected a full Ziran commit hash, got {commit!r}')
sources = Path(env.get('XDG_CACHE_HOME') or Path.home() / '.cache', 'ziran', 'sources')
probe(root, minimum)
probe(Path(env['RUNNER_TEMP']).resolve(), minimum)
if fetch:
probe(sources.resolve(), minimum)
except (OSError, ValueError, KeyError, TypeError) as error:
sys.exit(f'::error::Ziran setup preflight: {error}')
with open(env['GITHUB_OUTPUT'], 'a') as output:
for name, value in {'commit': commit, 'lock': digest, 'root': root,
'sources': sources, 'jobs': jobs}.items():
print(f'{name}={value}', file=output)
print(f'Ziran setup preflight: {commit}, {jobs} make jobs, minimum {minimum} MiB per destination')
PY
if [ -n "$PACKAGES" ]; then
sh "$GITHUB_ACTION_PATH/../../../scripts/ci_packages.sh" --check
fi
if [ -z "$COMMIT" ]; then
COMMIT=$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["toolchain"]["commit"])' "$lock")
fi
if ! printf '%s' "$COMMIT" | grep -Eq '^[0-9a-f]{40}$'; then
echo "::error::The Ziran commit is not a full commit hash: $COMMIT"
exit 1
fi
case "$RUNNER_OS-$RUNNER_ARCH" in
Linux-X64)
platform=linux-x64
;;
Linux-ARM64)
platform=linux-arm64
;;
*)
platform=
;;
esac
# A compiler built on a newer image needs its newer C library, so
# cached build trees are kept per image.
libc=$(getconf GNU_LIBC_VERSION 2>/dev/null | tr ' ' '-' || true)
{
echo "commit=$COMMIT"
echo "lock=$digest"
echo "platform=$platform"
echo "system=${ImageOS:-local}-${libc:-nolibc}"
echo "root=$GITHUB_WORKSPACE/$CHECKOUT"
echo "sources=${XDG_CACHE_HOME:-$HOME/.cache}/ziran/sources"
} >> "$GITHUB_OUTPUT"
# The script of this action's version, so every project gets its fix
# whichever Ziran it locks.
@@ -116,6 +163,77 @@ runs:
read -r -d '' -a names <<< "$PACKAGES" || true
timeout 1200 sh "$GITHUB_ACTION_PATH/../../../scripts/ci_packages.sh" "${options[@]}" "${names[@]}"
- name: Check native tools and resolve the build cache key
id: native
shell: bash
env:
COMMIT: ${{ steps.resolve.outputs.commit }}
run: |
set -euo pipefail
require_tool() {
if ! command -v "$1" >/dev/null; then
echo "::error::Ziran setup requires $1 on PATH"
exit 1
fi
}
read -r -a compiler <<< "${CC:-cc}"
read -r -a host_compiler <<< "${HOST_CC:-cc}"
for tool in make tar find touch tee grep "${compiler[0]}" "${host_compiler[0]}" "${AR:-ar}"; do
require_tool "$tool"
done
platform=
libs=()
source='int main(void) { return 0; }'
if [ "$RUNNER_OS" = Linux ]; then
require_tool "${OBJCOPY:-objcopy}"
require_tool "${HOST_OBJCOPY:-objcopy}"
case "$RUNNER_ARCH" in
X64) platform=linux-x64 ;;
ARM64) platform=linux-arm64 ;;
esac
if [ -z "${PACKAGE_LIBS:-}" ]; then
source='extern int RAND_bytes(unsigned char *, int); int main(void) { unsigned char x; return RAND_bytes(&x, 1) != 1; }'
libs=(-lcrypto)
fi
fi
probe=$(mktemp -d "$RUNNER_TEMP/ziran-native.XXXXXX")
trap 'rm -rf "$probe"' EXIT
if ! printf '%s\n' "$source" | "${compiler[@]}" -x c - -o "$probe/probe" "${libs[@]}"; then
echo "::error::Ziran setup could not compile and link with ${compiler[*]}; check the diagnostics and native development dependencies above"
exit 1
fi
libc=$(getconf GNU_LIBC_VERSION 2>/dev/null || true)
libc=${libc// /-}
# Jobs do not change the generated objects. Build overrides and compiler
# identities do, and must not share the default prebuilt or cached tree.
config=(CC HOST_CC CFLAGS CPPFLAGS LDFLAGS BOOTSTRAP BOOTSTRAP_CFLAGS
AR OBJCOPY HOST_OBJCOPY PACKAGE_LIBS RUNTIME_LIBS SANITIZE_FLAGS
CMAKE GEN_ZI2C MAKEFLAGS ZIRAN_DEFINES)
overrides=false
for name in "${config[@]}"; do
if printenv "$name" >/dev/null; then
overrides=true
fi
done
fingerprint=$({
for name in "${config[@]}"; do
if printenv "$name" >/dev/null; then
printf '%s=%s\0' "$name" "${!name}"
fi
done
"${compiler[@]}" --version
"${compiler[@]}" -dumpmachine
"${host_compiler[@]}" --version
"${host_compiler[@]}" -dumpmachine
} | python3 -c 'import hashlib, sys; print(hashlib.sha256(sys.stdin.buffer.read()).hexdigest())')
system="${ImageOS:-local}-${libc:-nolibc}"
{
echo "system=$system"
echo "key=ziran-build-v2-$RUNNER_OS-$RUNNER_ARCH-$system-$COMMIT-$fingerprint"
echo "platform=$platform"
echo "overrides=$overrides"
} >> "$GITHUB_OUTPUT"
- name: Check out Ziran
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
@@ -124,40 +242,78 @@ runs:
path: ${{ inputs.path }}
persist-credentials: false
- name: Download the prebuilt build tree
id: prebuilt
if: steps.resolve.outputs.platform != ''
- name: Restore the exact build cache
id: cache
continue-on-error: true
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ inputs.path }}/build
key: ${{ steps.native.outputs.key }}
- name: Verify the restored build tree
id: verify
shell: bash
env:
ROOT: ${{ steps.resolve.outputs.root }}
ASSET: ziran-${{ steps.resolve.outputs.commit }}-${{ steps.resolve.outputs.platform }}.tar.gz
COMMIT: ${{ steps.resolve.outputs.commit }}
KEY: ${{ steps.native.outputs.key }}
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
run: |
set -uo pipefail
set -euo pipefail
if [ "$(git -C "$ROOT" rev-parse HEAD)" != "$COMMIT" ]; then
echo "::error::Ziran checkout does not match requested commit $COMMIT"
exit 1
fi
if ! git -C "$ROOT" diff --quiet HEAD --; then
echo '::error::Ziran checkout has changes to tracked build inputs'
exit 1
fi
started=$SECONDS
if [ "$CACHE_HIT" = true ]; then
if python3 "$GITHUB_ACTION_PATH/../../../scripts/toolchain_package.py" cache-verify "$KEY" "$ROOT/build"; then
echo 'valid=true' >> "$GITHUB_OUTPUT"
echo "Ziran cache: verified exact hit in $((SECONDS - started))s, skipping prebuilt download"
exit 0
fi
echo '::warning::Rejected exact Ziran cache entry; using the normal fallback'
else
echo 'Ziran cache: exact miss'
fi
# A failed or prefix restore can leave a partial tree behind.
rm -rf "$ROOT/build"
- name: Download the prebuilt build tree
id: prebuilt
if: steps.verify.outputs.valid != 'true' && steps.native.outputs.platform != '' && steps.native.outputs.overrides != 'true'
shell: bash
env:
ROOT: ${{ steps.resolve.outputs.root }}
ASSET: ziran-${{ steps.resolve.outputs.commit }}-${{ steps.native.outputs.platform }}.tar.gz
run: |
set -euo pipefail
base=https://github.com/ziranlang/ziran/releases/download/toolchains
work="$RUNNER_TEMP/ziran-prebuilt"
rm -rf "$work"
mkdir -p "$work"
# A just-published asset can answer 504 for a while, longer than
# curl's default 1+2+4 s of retries, so keep retrying for 2 minutes.
for tool in curl sha256sum; do
if ! command -v "$tool" >/dev/null; then
echo "::warning::Ziran prebuilt download requires $tool; building locally"
exit 0
fi
done
work=$(mktemp -d "$RUNNER_TEMP/ziran-prebuilt.XXXXXX")
trap 'rm -rf "$work"' EXIT
started=$SECONDS
echo "Ziran prebuilt: trying $ASSET"
# Newly published assets can return 504 for longer than curl's usual retries.
retry=(--retry 12 --retry-delay 10 --retry-max-time 120 --connect-timeout 10)
if curl -fsSL "${retry[@]}" --max-time 180 -o "$work/$ASSET" "$base/$ASSET" &&
curl -fsSL "${retry[@]}" --max-time 30 -o "$work/$ASSET.sha256" "$base/$ASSET.sha256" &&
(cd "$work" && sha256sum --check --quiet "$ASSET.sha256") &&
tar -xzf "$work/$ASSET" -C "$ROOT"; then
echo "found=true" >> "$GITHUB_OUTPUT"
echo 'found=true' >> "$GITHUB_OUTPUT"
echo "Ziran prebuilt: verified download in $((SECONDS - started))s"
else
rm -rf "$ROOT/build"
echo "No prebuilt build tree for $ASSET"
echo "Ziran prebuilt: unavailable after $((SECONDS - started))s"
fi
rm -rf "$work"
- name: Restore the cached build tree
id: cache
if: steps.prebuilt.outputs.found != 'true'
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ inputs.path }}/build
key: ziran-build-${{ runner.os }}-${{ runner.arch }}-${{ steps.resolve.outputs.system }}-${{ steps.resolve.outputs.commit }}
- name: Build Ziran
id: build
@@ -166,9 +322,11 @@ runs:
ROOT: ${{ steps.resolve.outputs.root }}
COMMIT: ${{ steps.resolve.outputs.commit }}
PREBUILT: ${{ steps.prebuilt.outputs.found }}
CACHED: ${{ steps.cache.outputs.cache-hit }}
CACHED: ${{ steps.verify.outputs.valid }}
JOBS: ${{ steps.resolve.outputs.jobs }}
run: |
set -euo pipefail
started=$SECONDS
toolchain=built
if [ "$PREBUILT" = true ]; then
toolchain=prebuilt
@@ -185,48 +343,94 @@ runs:
rm -f "$ROOT/build/$name"
fi
done
stamp="$RUNNER_TEMP/ziran-build-stamp"
touch "$stamp"
stamp=$(mktemp "$RUNNER_TEMP/ziran-build-stamp.XXXXXX")
find "$ROOT/build" -exec touch -r "$stamp" {} +
rm -f "$stamp" "$ROOT/build/obj/cmd/zir/zir_load.o"
rm -f "$stamp" "$ROOT/build/obj/bootstrap/runtime/zir_load.o"
fi
jobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 2)
log="$RUNNER_TEMP/ziran-make.log"
make -C "$ROOT" -j"$jobs" all 2>&1 | tee "$log"
log=$(mktemp "$RUNNER_TEMP/ziran-make.XXXXXX")
trap 'rm -f "$log"' EXIT
make -C "$ROOT" -j"$JOBS" BUILD_DIR=build all 2>&1 | tee "$log"
"$ROOT/build/bin/ziran" version
compiled=$(grep -c -- ' -c -o ' "$log" || true)
rm -f "$log"
echo "Ziran $COMMIT: $toolchain build tree, $compiled C files compiled"
echo "Ziran $COMMIT: $toolchain build tree, $compiled C files compiled in $((SECONDS - started))s with $JOBS jobs"
{
echo "toolchain=$toolchain"
echo "compiled=$compiled"
} >> "$GITHUB_OUTPUT"
echo "$ROOT/build/bin" >> "$GITHUB_PATH"
- name: Record the built tree's cache inventory
id: inventory
if: steps.build.outputs.toolchain == 'built' && steps.cache.outputs.cache-hit != 'true'
shell: bash
env:
ROOT: ${{ steps.resolve.outputs.root }}
KEY: ${{ steps.native.outputs.key }}
run: |
if python3 "$GITHUB_ACTION_PATH/../../../scripts/toolchain_package.py" cache-write "$KEY" "$ROOT/build"; then
echo 'ready=true' >> "$GITHUB_OUTPUT"
else
echo '::warning::Ziran build succeeded but its build tree could not be cached'
fi
- name: Save the build tree
if: steps.prebuilt.outputs.found != 'true' && steps.cache.outputs.cache-hit != 'true'
if: steps.inventory.outputs.ready == 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ inputs.path }}/build
key: ziran-build-${{ runner.os }}-${{ runner.arch }}-${{ steps.resolve.outputs.system }}-${{ steps.resolve.outputs.commit }}
key: ${{ steps.native.outputs.key }}
# Package checkouts can hold programs built inside them, so they are kept
# per image as well.
- name: Restore the package checkouts
id: sources
if: inputs.fetch == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.resolve.outputs.sources }}
key: ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ steps.resolve.outputs.system }}-${{ steps.resolve.outputs.lock }}
key: ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ steps.native.outputs.system }}-${{ steps.resolve.outputs.lock }}
restore-keys: |
ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ steps.resolve.outputs.system }}-
ziran-sources-${{ runner.os }}-${{ runner.arch }}-${{ steps.native.outputs.system }}-
- name: Fetch the locked packages
id: fetch
if: inputs.fetch == 'true'
shell: bash
working-directory: ${{ inputs.project }}
env:
ZIRAN: ${{ steps.resolve.outputs.root }}/build/bin/ziran
run: '"$ZIRAN" fetch --locked'
ROOT: ${{ steps.resolve.outputs.root }}
JOBS: ${{ steps.resolve.outputs.jobs }}
run: |
set -euo pipefail
started=$SECONDS
# Fetch still checks the locked graph. When this launcher already is
# the lock's toolchain, skip forwarding to a second build of it.
python3 - <<'PY'
import json, os, subprocess, sys
from pathlib import Path
env = os.environ.copy()
root = env['ROOT']
lock = json.loads(Path('ziran.lock').read_text())
toolchain = lock['toolchain']
origin = subprocess.check_output(['git', '-C', root, 'config', '--get', 'remote.origin.url'], text=True).strip()
origins = ('https://git.waozi.xyz/ziranlang/ziran', 'https://github.com/ziranlang/ziran')
commit = subprocess.check_output(['git', '-C', root, 'rev-parse', 'HEAD'], text=True).strip()
same_origin = any(origin in (url, url + '.git') and toolchain.get('url') in (url, url + '.git')
for url in origins)
prepared = same_origin and commit == toolchain.get('commit') and not Path('ziran.local.toml').exists()
if prepared:
env['ZIRAN_PINNED_LAUNCHER'] = '1'
print('Ziran locked package fetch: using the prepared compiler', flush=True)
status = subprocess.run([env['ZIRAN'], 'fetch', '--locked'], env=env).returncode
if status:
sys.exit(status)
if prepared:
with open(env['GITHUB_OUTPUT'], 'a') as output:
print('prepared=true', file=output)
PY
echo "Ziran locked package fetch: $((SECONDS - started))s"
# A new lock starts from the previous lock's checkouts, so without this
# the saved cache keeps every commit ever locked and grows until runners
@@ -240,11 +444,15 @@ runs:
ZIRAN: ${{ steps.resolve.outputs.root }}/build/bin/ziran
SOURCES: ${{ steps.resolve.outputs.sources }}
KEEP: ${{ runner.temp }}/ziran-locked-checkouts
JOBS: ${{ steps.resolve.outputs.jobs }}
PREPARED: ${{ steps.fetch.outputs.prepared }}
run: |
python3 - <<'PY'
import json, os, re, shutil, subprocess
from pathlib import Path
sources, keep = Path(os.environ['SOURCES']).resolve(), Path(os.environ['KEEP'])
if os.environ['PREPARED'] == 'true':
os.environ['ZIRAN_PINNED_LAUNCHER'] = '1'
lock = json.loads(Path('ziran.lock').read_text())
names = [package['name'] for package in lock['packages']] + (['ziran'] if 'toolchain' in lock else [])
used = set(keep.read_text().split()) if keep.exists() else set()
@@ -260,3 +468,10 @@ runs:
removed += 1
print(f'Kept {len(used)} locked package checkouts; removed {removed} unused')
PY
- name: Save the locked package checkouts
if: inputs.fetch == 'true' && steps.sources.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.resolve.outputs.sources }}
key: ${{ steps.sources.outputs.cache-primary-key }}
+52 -3
View File
@@ -29,9 +29,16 @@ jobs:
# and the module itself requires Go 1.25.
- name: Fetch the Go Zstandard module for the offline Go checks
run: cd "$RUNNER_TEMP" && go mod download github.com/klauspost/[email protected]
- name: Install ripgrep, MinGW, Wine, Vorbis, ARMv7 and Wasm tools, and the private display for the test scripts
- name: Install ripgrep, MinGW, Wine, Vorbis, ARMv7 tools and the private display for the test scripts
timeout-minutes: 5
run: sh scripts/ci_packages.sh ccache ripgrep zip unzip gcc-mingw-w64-x86-64 wine wine64 xvfb xauth ffmpeg libvorbis-dev python3-markdown gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user clang-18 lld-18
run: sh scripts/ci_packages.sh ccache ripgrep zip unzip gcc-mingw-w64-x86-64 wine wine64 xvfb xauth libsdl2-dev ffmpeg libvorbis-dev python3-markdown gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user clang-18 lld-18
# The emcc checks use the Emscripten the playground and the site use;
# Ubuntu's emscripten package is 3.1.6, and its emcc is a symlink to a
# wrapper that cannot run under its resolved name.
- name: Set up Emscripten
uses: emscripten-core/setup-emsdk@v15
with:
version: '6.0.6'
- name: Keep compile results between runs
uses: ./.github/actions/compile-cache
with:
@@ -40,6 +47,41 @@ jobs:
run: make
- name: Run the language, backend, and portable runtime checks
run: env -u DISPLAY -u WAYLAND_DISPLAY WINDOWS_REQUIRED=1 ARM_REQUIRED=1 WASM_REQUIRED=1 ZIRAN_WASM_CC=clang-18 make check CHECK_JOBS=4
- name: Pack the tested Ziran toolchain
id: toolchain
if: github.server_url == 'https://git.waozi.xyz' && github.event_name == 'push' && github.ref == 'refs/heads/master' && (env.BUILD_NATIVE != 'true' || steps.native.outputs.current == 'true')
env:
SOURCE: ${{ steps.native.outputs.source || github.workspace }}
run: |
output="build/toolchains/$GITHUB_SHA"
if [ "$BUILD_NATIVE" = true ]; then
gitea-native-build run python3 scripts/toolchain_package.py pack "$GITHUB_SHA" "$output"
else
python3 scripts/toolchain_package.py pack "$GITHUB_SHA" "$output"
fi
printf 'directory=%s/%s\n' "$SOURCE" "$output" >> "$GITHUB_OUTPUT"
- name: Keep the verified toolchain archive
if: steps.toolchain.outputs.directory != ''
uses: actions/upload-artifact@v4
with:
name: toolchain-${{ github.sha }}
path: ${{ steps.toolchain.outputs.directory }}
if-no-files-found: error
- name: Publish the toolchain to Gitea Packages
if: steps.toolchain.outputs.directory != ''
env:
SOURCE: ${{ steps.native.outputs.source || github.workspace }}
OUTPUT: ${{ steps.toolchain.outputs.directory }}
ZIRAN_TOOLCHAIN_PACKAGE_USER: ${{ secrets.ZIRAN_TOOLCHAIN_PACKAGE_USER }}
ZIRAN_TOOLCHAIN_PACKAGE_TOKEN: ${{ secrets.ZIRAN_TOOLCHAIN_PACKAGE_TOKEN }}
run: |
if [ -z "$ZIRAN_TOOLCHAIN_PACKAGE_USER$ZIRAN_TOOLCHAIN_PACKAGE_TOKEN" ]; then
echo "Gitea package writer is unavailable. The toolchain is in this run's artifacts."
exit 0
fi
for descriptor in "$OUTPUT"/*.json; do
python3 "$SOURCE/scripts/toolchain_package.py" publish "$GITHUB_SHA" "$descriptor"
done
- name: Show how much the compile cache saved
if: always()
run: ccache --show-stats || true
@@ -87,7 +129,14 @@ jobs:
run: cd "$RUNNER_TEMP" && go mod download github.com/klauspost/[email protected]
- name: Install ripgrep and Vorbis for the test scripts
timeout-minutes: 5
run: sh scripts/ci_packages.sh ccache ripgrep zip unzip ffmpeg libvorbis-dev python3-markdown
run: sh scripts/ci_packages.sh ccache ripgrep zip unzip xvfb xauth libsdl2-dev ffmpeg libvorbis-dev python3-markdown
# The emcc checks use the Emscripten the playground and the site use;
# Ubuntu's emscripten package is 3.1.6, and its emcc is a symlink to a
# wrapper that cannot run under its resolved name.
- name: Set up Emscripten
uses: emscripten-core/setup-emsdk@v15
with:
version: '6.0.6'
- name: Keep compile results between runs
uses: ./.github/actions/compile-cache
with:
+2 -2
View File
@@ -2,9 +2,9 @@ name: Scalar proof model
on:
push:
branches: [master]
paths: ['proofs/**', 'cmd/zir/**', 'cmd/compiler_*.zi', 'bootstrap/**', 'tests/proof*', 'tests/proof/**', 'tests/law*', 'Makefile', '.github/workflows/proofs.yml']
paths: ['proofs/**', 'bootstrap/runtime/**', 'cmd/compiler_*.zi', 'bootstrap/**', 'tests/proof*', 'tests/proof/**', 'tests/law*', 'Makefile', '.github/workflows/proofs.yml']
pull_request:
paths: ['proofs/**', 'cmd/zir/**', 'cmd/compiler_*.zi', 'bootstrap/**', 'tests/proof*', 'tests/proof/**', 'tests/law*', 'Makefile', '.github/workflows/proofs.yml']
paths: ['proofs/**', 'bootstrap/runtime/**', 'cmd/compiler_*.zi', 'bootstrap/**', 'tests/proof*', 'tests/proof/**', 'tests/law*', 'Makefile', '.github/workflows/proofs.yml']
workflow_dispatch:
permissions:
contents: read
-41
View File
@@ -1,41 +0,0 @@
name: Release
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
tag:
name: Tag new version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create the release for a new VERSION
env:
GH_TOKEN: ${{ github.token }}
run: |
set -eu
VERSION=$(cat VERSION)
TAG="v$VERSION"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "$TAG already exists, nothing to release"
exit 0
fi
NOTES=$(awk -v v="$VERSION" '$0 ~ "^## \\[" v "\\]" {found=1; next} found && /^## \[/ {exit} found' CHANGELOG.md)
test -n "$NOTES"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "$TAG" -m "Ziran $VERSION"
git push origin "$TAG"
gh release create "$TAG" --title "Ziran $VERSION" --notes "$NOTES"
+4 -1
View File
@@ -9,7 +9,7 @@ name: Publish website
on:
push:
branches: [master]
paths: ['examples/**', 'site/**', 'web/playground.c', 'web/bundle.c', 'scripts/build_playground.zi', 'scripts/site_target*', 'scripts/site_library_targets.py', 'scripts/site_kernel_targets.py', 'scripts/benchmark_samples.py', 'bench/results/wasm-tier-*.json', 'tests/site_targets.sh', 'cmd/zir/**', 'cmd/package*.zi', 'cmd/compiler_*.zi', 'bootstrap/**', 'std/**', 'Makefile', '.github/workflows/site.yml']
paths: ['examples/**', 'site/**', 'web/playground.c', 'web/bundle.c', 'scripts/build_playground.zi', 'scripts/site_target*', 'scripts/site_library_targets.py', 'scripts/site_kernel_targets.py', 'scripts/site_standard_benchmarks.zi', 'scripts/site_benchmark_*.zi', 'bench/standard_cases.zi', 'bench/json_text.py', 'scripts/site_numbers.zi', 'bench/results/standard/**', 'scripts/benchmark_samples.py', 'bench/results/wasm-tier-*.json', 'tests/site_targets.sh', 'bootstrap/runtime/**', 'cmd/package*.zi', 'cmd/compiler_*.zi', 'bootstrap/**', 'std/**', 'Makefile', '.github/workflows/site.yml']
workflow_dispatch:
concurrency:
@@ -35,6 +35,9 @@ jobs:
fi
- uses: actions/checkout@v4
if: steps.credentials.outputs.present == 'true'
with:
# Receipt checks read inputs at the commits that measured and published them.
fetch-depth: 0
- name: Set up Emscripten
if: steps.credentials.outputs.present == 'true'
uses: emscripten-core/setup-emsdk@v15
+2
View File
@@ -3,6 +3,8 @@
/tests/build/
/.fuse_hidden*
/work/
# zi2c locks the directory it writes, including a seed directory
.build.lock
__pycache__/
/.wrangler/
/site/assets/playground-runtime.js
+75 -51
View File
@@ -4,57 +4,81 @@ Ziran owns the language, compiler tools, `.zir`, portable `.zx` output,
standard modules, and runtime. Keep this repository usable for programs that
do not import a UI library.
- Do not put Inbe application code, screens, assets, workflows, or platform
policy in Ziran. Those belong in `../inbe`.
- Do not put Kryon widgets or UI-specific compiler cases in Ziran. Kryon is an
ordinary library in `../kryon`, imported by applications that need it.
- Add a capability here only when it is useful to non-graphical programs as a
language or standard-library feature. Keep the source, checked `.zir`,
native targets, and instruction-engine behavior aligned.
- Use the current Ziran syntax directly. Do not add legacy Kryon/KIR/KRB
compatibility paths.
- Do not preserve old source spellings, command flags, binary formats, or
runtime entry points for backward compatibility. Remove executable legacy
paths when replacing them; keep rejection tests that enforce the current
language rules.
- Run relevant checks with `DISPLAY` and `WAYLAND_DISPLAY` removed. Any test
that needs a display must use a private Xvfb/Xephyr display.
- Test with `make check` and `make check-bootstrap`. The owner requested a
physically pruned suite of the most useful checks, about half the former
entry points. Run all retained checks locally and in CI; do not substitute
sharding or skipped tests for pruning. `make check CHECK_FILTER=text` runs every
check whose name contains `text`. Full logs are in `build/check-logs/`.
- Write retained test logic and test helpers in Ziran. Remove redundant tests
and their unused helpers instead of growing another parallel test suite.
## Layout
- Generated output carries only the code a program actually reaches:
procedures, types, header declarations, runtime helpers and tables. Make
output smaller by removing what isn't needed, never by merging it into fewer
files. Owner, 2026-11-15: "i want to noly have teh code we acutelly need";
one C file per program was rejected.
- `cmd/` compiler and tools (`ziran`, `zi2c`, `zi2go`, `zi2zx`, `zx2native`,
`zx2wasm`, `zi-edit`, `zi-fmt`, `zi-api`, `zi-inspect`, `zi2zir`).
- `bootstrap/` generated C seeds; refresh with `make update-bootstrap`.
- `std/` standard modules; `tests/` retained checks; `proofs/` Lean model.
- `bench/` benchmark drivers; retained receipts in `bench/results/`.
- `docs/` user and contributor documents; `plans/` open work;
`ASSEMBLY/` machine-IR and ZX format specs; `site/` generated website.
- `scripts/` site and release helpers; `templates/` project templates.
## Commands
- Build: `make`; install: `make install-user` (into `~/.local/bin`).
- Checks: `make check` and `make check-bootstrap`. `make check
CHECK_FILTER=text` runs every check whose name contains `text`. Full logs
land in `build/check-logs/`.
- Run checks with `DISPLAY` and `WAYLAND_DISPLAY` removed; any test that needs
a display uses a private Xvfb/Xephyr.
- Proof model: `make proof-model LEAN=/path/to/lean` (see docs/LAWS.md).
## Question -> document
| Question | Document |
| --- | --- |
| How do I compile, run, or package a program? | docs/USAGE.md |
| Which targets and features are supported today? | docs/IMPLEMENTATION_STATUS.md, docs/FEATURES.md |
| How do packages, projects, and locks work? | docs/PACKAGES.md |
| What does the compiler pipeline do? | docs/ARCHITECTURE.md |
| How do I write Ziran (syntax by example, habits from other languages, std signatures)? | docs/REFERENCE.md (site/llms.txt is generated from it) |
| What is the language syntax (directives, enums, imports)? | docs/LANGUAGE_DIRECTION.md |
| How do owned values and recoverable failures behave? | docs/OWNED_VALUES.md |
| What do diagnostic codes and JSON diagnostics look like? | docs/DIAGNOSTICS.md |
| How do tools edit and query source programmatically? | docs/AUTHORING.md, docs/API_DISCOVERY.md, docs/SEMANTIC_EDIT.md |
| How do laws and proof certificates work? | docs/LAWS.md |
| What is `.zir`? | docs/ZIR.md |
| What is `.zx` and how is it linked? | docs/ZX.md, ASSEMBLY/zx-executable-format.md, ASSEMBLY/zx-library-format.md |
| How does direct native code generation work? | ASSEMBLY/README.md, ASSEMBLY/machine-ir.md, ASSEMBLY/lowered-format.md |
| How is Unicode handled? | docs/UNICODE.md |
| How do benchmarks run? | bench/README.md, bench/standard/README.md |
| What work is still open? | plans/open-work.md |
## Rules
- Scope: no Inbe application code (`../inbe`); no Kryon widgets or
UI-specific compiler cases (`../kryon` is an ordinary library). Add a
capability here only when non-graphical programs benefit. The exception
is ZX Runner and the platform layer it hosts (window, drawing, input,
media) on Linux and Android, which belong here even though they are
visual (owner, 2026-11-23); widgets stay in UI libraries.
- No backward compatibility: use current Ziran syntax only. Remove legacy
spellings, flags, binary formats, and entry points; keep the rejection
tests that enforce current rules.
- Keep source, checked `.zir`, native targets, and instruction-engine
behavior aligned. Generated output carries only the code a program reaches;
shrink output by removing what is not needed.
- Module roots are ordinary repeatable search folders. Keep package manifests,
CLI forwarding, editor paths and loader storage dynamically sized; do not add
a folder-count cap or library-specific compiler handling. Preserve resolution
ordering and use normal input-size, allocation and operating-system bounds.
- Deploy the website only through `.github/workflows/site.yml` on GitHub
Actions, which builds and validates the site before publishing to Cloudflare
Pages. Never invoke Wrangler directly from a local agent or terminal,
including authentication commands. The workflow's Cloudflare action owns
uploads.
- Keep private transfer and recovery state under the ignored `backup/`
directory. Keep reusable benchmark scripts in Ziran under `bench/`, and
retained benchmark reports and logs under tracked `bench/results/` paths.
Temporary compiler and test outputs belong in the existing `build/` layout.
- Owner instruction, 2026-11-11: run all benchmarks directly on Alpha's
physical host and reject virtualized execution.
Keep benchmark compilation and measurement off the current desktop; if
Alpha is unavailable, report that instead of falling back locally. Record
the actual execution host and keep before/after comparisons on that host.
- Exclude statistical anomalies from benchmark results using the same symmetric
1.5×IQR rule for all targets and platforms (inclusive interpolated quartiles).
Keep raw samples and excluded indices; never silently discard measurements.
CLI forwarding, editor paths, and loader storage dynamically sized; no
folder-count caps or library-specific compiler handling.
- Write retained test logic and helpers in Ziran. Remove redundant tests and
unused helpers instead of growing a parallel suite. Run every retained
check; never substitute sharding or skipped tests.
- Keep private transfer and recovery state under the ignored `backup/`.
Keep benchmark reports under tracked `bench/results/`; temporary compiler
and test outputs under `build/`.
- Benchmarks run directly on Alpha's physical host, never virtualized. If
Alpha is unavailable, wait instead of measuring elsewhere. Record the host
in every report; collect both sides of a comparison on the same host.
Exclude anomalies with the symmetric 1.5xIQR rule (inclusive interpolated
quartiles) for every target and platform; keep raw samples and excluded
indices.
- Shared checkout: commit on master through the shared index. `git add` only
your own paths, then `git commit -- <those paths>`, so other lanes' staged
paths stay out. Never `git add -A`, a private `GIT_INDEX_FILE`, plumbing
that writes commits or moves HEAD, a rebase, reset or stash; never touch
files another lane is editing.
- Deploy the website only through `.github/workflows/site.yml` on CI. Never
invoke Wrangler directly from a local terminal.
@@ -48,14 +48,14 @@ Assembly listings are views of the instruction stream used for encoding, not a r
## Current repository boundaries
- [The shared IR schema](../cmd/compiler_ir.zi) represents typed statements, expression graphs, declarations, source spans, laws, and proofs.
- [The ZX container](../cmd/compiler_bundle.zi) packages verified instructions, assets and the host interface; [the embedding API](../cmd/zir/zir_host.c) runs them on [the portable instruction engine](../cmd/compiler_exec.zi).
- [The ZX container](../cmd/compiler_bundle.zi) packages verified instructions, assets and the host interface; [the embedding API](../include/ziran_host.h) runs them on [the portable instruction engine](../cmd/compiler_exec.zi).
- [The architecture contract](../docs/ARCHITECTURE.md) changes only after replacement paths are verified.
- Current working-tree changes belong to their existing tasks. Record a baseline and coordinate overlapping files before implementation; never absorb unrelated changes into this feature.
## Required decisions and deliverables
- [x] Create a [feature-by-target matrix](feature-matrix.md) from current compiler capability reporting, tests, and documented limitations. Name each feature, reference fixture, source/saved-IR behavior, portable behavior, native behavior, and required execution platform.
- [ ] Separate portable language behavior, native language extensions, CPU requirements, OS services, and foreign-runtime requirements. A Go-only foreign type does not become a portable native type by renaming its representation.
- [x] Separate portable language behavior, native language extensions, CPU requirements, OS services, and foreign-runtime requirements. A Go-only foreign type does not become a portable native type by renaming its representation. (Implemented: the [feature matrix](feature-matrix.md) separates portable behavior from native extensions and foreign runtimes, the [execution contract](execution-contract.md) layers portable/target/host concerns, the [gap policy](gap-policy.md) keeps host capabilities distinct from CPU features, and [`cmd/compiler_target.zi`](../cmd/compiler_target.zi) rows carry per-OS executable/loader notes; [target_diagnostics.sh](../tests/target_diagnostics.sh) and [compiler_inventory_cases.zi](../tests/compiler_inventory_cases.zi) retain the Go-foreign-type rejection.)
- [ ] Set the native language coverage target to all currently supported C-native language semantics, plus all currently supported portable ZX semantics. Keep C and Go output available. List legitimate target-specific exclusions explicitly.
- [x] Cover the maintained Linux, Android, Windows, macOS, and browser/WebAssembly combinations. Derive exact CPU/OS/ABI rows from the live toolchain and repository; include existing 32-bit ARM support. New architectures such as RISC-V are explicit extensions, not an unbounded definition of completion. The [target registry](07-architecture-and-platform-coverage.md#target-registry-and-preflight) lists every row.
- [x] Specify numeric behavior, memory and pointer rules, ownership, cleanup, initialization, traps, call order, concurrency, fuel checkpoints, and capability contracts before assigning opcodes: the [execution contract](execution-contract.md).
@@ -66,7 +66,11 @@ Assembly listings are views of the instruction stream used for encoding, not a r
- [x] Record that cross-compilation, successful encoding, a child-agent receipt, or a saved benchmark report does not establish target execution correctness.
- [ ] Assign every non-Implemented matrix cell a stable Gap diagnostic or a
deliberate Excluded contract. Verify rejection before output replacement,
initialization, host calls or entry execution.
initialization, host calls or entry execution. Doubt recorded: the direct
target rejects GPU statements with the generic `assembly.lower` diagnostic
(`Fail` in [`compiler_zir_lower.zi`](../cmd/compiler_zir_lower.zi)), not a
dedicated `assembly.gap.*` code, so not every unimplemented cell yet has a
stable assembly gap identifier.
- [x] Make engine and target selection explicit. Portable, native, Wasm, C and
Go are separate contracts; none may rescue another after preflight fails.
+24 -19
View File
@@ -1,6 +1,6 @@
# Step 02 — Implement lowered portable IR and its verifier
Status: in progress; [typed scalar/aggregate schema and verifier](README.md), including checked global-derived pointers and procedure values. Complete memory, capability and language coverage remain pending. Depends on [step 01](01-contract-and-completion-matrix.md). Next: [complete language lowering](03-language-lowering.md).
Status: in progress. The typed schema ([`compiler_lowered_ir.zi`](../cmd/compiler_lowered_ir.zi)), its bounded canonical codec, the structural verifier ([`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi)), deterministic LIR text/serial dumps, and the optimization-fact layer under `--checks` are implemented and retained-test covered for the current M1 language subset, including checked global-derived pointers and procedure values ([README.md](README.md)). Heap-derived pointers, slices, unions, vectors, general ownership and the remaining language coverage keep the step open. Depends on [step 01](01-contract-and-completion-matrix.md). Next: [complete language lowering](03-language-lowering.md).
The schema carries the [gap policy](gap-policy.md) through target preflight:
unsupported required operations and target extensions have stable identifiers
@@ -13,8 +13,8 @@ Create a structured, serializable representation of executable operations below
## Existing integration points
- [Checked compiler records](../cmd/compiler_ir.zi).
- [ZIR reader and writer](../cmd/zir/zir_serial.c).
- [Scalar semantic helpers](../cmd/zir/zir_scalar.h).
- [ZIR reader and writer](../cmd/compiler_zir_serial.zi).
- [Scalar semantic helpers](../bootstrap/runtime/zir_scalar.h).
- [Compiler embedding contract](../docs/COMPILER_API.md).
Proposed new modules: `cmd/compiler_lowered_ir.zi`, `cmd/compiler_lowered_verify.zi`, and `cmd/compiler_lowered_text.zi`. Keep binary ZX framing in step 05 rather than coupling instruction records to file offsets.
@@ -49,10 +49,10 @@ cross-target support; see [the runtime contract](09-native-runtime-and-integrati
## Implementation work
- [ ] Define program, module, type, function, basic-block, value, instruction, constant, global, import, and debug-location records with stable IDs.
- [ ] Use SSA values and block parameters for register-like values. Represent mutable/address-taken storage through explicit memory operations. Specify block-parameter semantics so interpreter and native phi elimination agree.
- [ ] Define integer widths and signed operations explicitly. Specify narrowing, sign/zero extension, overflow, shift counts, division edge cases, comparison, and conversion behavior from current Ziran semantics.
- [ ] Define float32/float64 operations, bitcasts, NaN-sensitive comparisons, signed zero, conversions, and rounding assumptions. Do not introduce implicit fast-math permissions.
- [x] Define program, module, type, function, basic-block, value, instruction, constant, global, import, and debug-location records with stable IDs. ([`compiler_lowered_ir.zi`](../cmd/compiler_lowered_ir.zi) defines modules, sources, types, constants, globals, functions, blocks, instructions, external functions and `LirOrigin` records at `LirVersion` 4; [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) and the round-trip codec in [zx_executable.sh](../tests/zx_executable.sh) retain them.)
- [x] Use SSA values and block parameters for register-like values. Represent mutable/address-taken storage through explicit memory operations. Specify block-parameter semantics so interpreter and native phi elimination agree. (SSA values, block parameters and load/store address operations are in [`compiler_lowered_ir.zi`](../cmd/compiler_lowered_ir.zi); [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) executes block-parameter transfers and [machine_ir_cases.zi](../tests/machine_ir_cases.zi) lowers them for native.)
- [x] Define integer widths and signed operations explicitly. Specify narrowing, sign/zero extension, overflow, shift counts, division edge cases, comparison, and conversion behavior from current Ziran semantics. ([`compiler_lowered_ir.zi`](../cmd/compiler_lowered_ir.zi) fixed-width operations; [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) covers narrowing, wrap, signed-minimum division, invalid shifts and mixed-width shifts.)
- [x] Define float32/float64 operations, bitcasts, NaN-sensitive comparisons, signed zero, conversions, and rounding assumptions. Do not introduce implicit fast-math permissions. ([lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) covers checked float casts, float32 rounding, signed zero and payload-preserving NaN negation; [compiler_opt_float_cases.zi](../tests/compiler_opt_float_cases.zi) retains float folding behavior.)
- [ ] Extend the existing checked global/frame pointers, procedure values and
immutable string byte/count representation to heap-derived pointers, slices,
unions, vectors and the remaining string operations without assuming a fixed
@@ -62,23 +62,28 @@ cross-target support; see [the runtime contract](09-native-runtime-and-integrati
byte-view/pointer-free aggregate capabilities. Unions, resizable vectors,
general ownership and raw host pointers remain open or deliberately rejected.
- [ ] Separate portable logical type identity from target physical layout. Keep field/element access and layout queries symbolic until target layout is known; explicitly mark native-layout-dependent declarations and required host ABI descriptors.
- [ ] Define loads, stores, copies, zeroing, address calculations, calls, branches, returns, traps, and unreachable terminators. Specify alignment, access width, alias assumptions, and permitted overlap for each memory operation.
- [ ] Preserve effect order with an explicit effect dependency or another equally checkable ordering contract. Calls, stores, cleanup, volatile/atomic operations, and fuel checkpoints must not move unsafely.
- [ ] Specify atomics and memory ordering only where supported by the language contract. Declare unsupported operations instead of interpreting ordinary loads as atomic.
- [ ] Define source-origin IDs and transformation-origin chains, including generated cleanup, inlined calls, generic instances, host adapters, and native variants.
- [ ] Attach conservative optimization facts such as known ranges, alignment, readonly arguments, and ownership. Distinguish verifier-derived facts from producer assertions; unsafe producer claims cannot authorize code motion or unchecked access.
- [ ] Implement deterministic traversal and textual dumps. Stable IDs must not depend on pointer values, allocator order, timestamps, or nondeterministic hash iteration.
- [ ] Implement a structural verifier for IDs, types, terminators, predecessor lists, argument arity, use-before-definition, dominance, block parameters, entry points, and reachable symbol signatures.
- [ ] Implement memory/effect and layout validation. Reject invalid offsets, contradictory alignments, malformed constant data, impossible call conventions, and illegal native-only operations in portable code.
- [ ] Bound decoder allocation and graph work by checked input sizes and explicit resource budgets. Use iterative algorithms where attacker-controlled depth could exhaust the compiler stack.
- [ ] Provide recoverable structured diagnostics with function, block, instruction, and source context. Library errors must not abort the host process or leak partially built programs.
- [ ] Represent required target features and Gap identifiers explicitly. The
- [x] Define loads, stores, copies, zeroing, address calculations, calls, branches, returns, traps, and unreachable terminators. Specify alignment, access width, alias assumptions, and permitted overlap for each memory operation. (Opcode set and alignment encoding in [`compiler_lowered_ir.zi`](../cmd/compiler_lowered_ir.zi), documented in [lowered-format.md](lowered-format.md). The portable contract deliberately still rejects `copy`/`zero` with `.Unsupported` ([`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi)); executable coverage in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi).)
- [x] Preserve effect order with an explicit effect dependency or another equally checkable ordering contract. Calls, stores, cleanup, volatile/atomic operations, and fuel checkpoints must not move unsafely. (Effect numbers are verified in [`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi) and preserved by every optimizer pass ([`compiler_opt.zi`](../cmd/compiler_opt.zi)); [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) retains exact Fuel consumption through optimization.)
- [x] Specify atomics and memory ordering only where supported by the language contract. Declare unsupported operations instead of interpreting ordinary loads as atomic. (The schema defines no atomic opcodes, and the verifier rejects forms outside the declared set with `.Unsupported` ([`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi)); retained rejection fixtures in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi).)
- [x] Define source-origin IDs and transformation-origin chains, including generated cleanup, inlined calls, generic instances, host adapters, and native variants. (`LirOrigin` parent chains in [`compiler_lowered_ir.zi`](../cmd/compiler_lowered_ir.zi) survive optimization ([compiler_opt_cases.zi](../tests/compiler_opt_cases.zi)) and are restored by the debug attachment ([executable_bundle_cases.zi](../tests/executable_bundle_cases.zi)); origin producers for native variants arrive with the open variant work in step 05.)
- [ ] Attach conservative optimization facts such as known ranges, alignment, readonly arguments, and ownership. Distinguish verifier-derived facts from producer assertions; unsafe producer claims cannot authorize code motion or unchecked access. Landed slice: verifier-derived pointer/range facts drive check elision under `--checks` ([`compiler_lowered_proven.zi`](../cmd/compiler_lowered_proven.zi); [proven_pointer_cases.zi](../tests/proven_pointer_cases.zi), [guarded_index_ranges.sh](../tests/guarded_index_ranges.sh), [trust_boundary_cases.zi](../tests/trust_boundary_cases.zi)). Producer-supplied ownership facts and facts that authorize motion without re-verification remain open.
- [x] Implement deterministic traversal and textual dumps. Stable IDs must not depend on pointer values, allocator order, timestamps, or nondeterministic hash iteration. (`zi2zx --emit lir` prints LIR through `AssemblyPrintLir`, the canonical owning codec serializes deterministically, and optimizer counters follow stored order ([`compiler_opt.zi`](../cmd/compiler_opt.zi)); [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) and the deterministic-output fixtures in [machine_ir_cases.zi](../tests/machine_ir_cases.zi) retain this.)
- [x] Implement a structural verifier for IDs, types, terminators, predecessor lists, argument arity, use-before-definition, dominance, block parameters, entry points, and reachable symbol signatures. ([`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi), including dominator-tree computation; rejection fixtures in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi), verified-read enforcement in [zx_executable.sh](../tests/zx_executable.sh) and [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi).)
- [x] Implement memory/effect and layout validation. Reject invalid offsets, contradictory alignments, malformed constant data, impossible call conventions, and illegal native-only operations in portable code. (Alignment and memory checks in [`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi) (`.Alignment`, `.Unsupported`); calling-convention rejection retained in [machine_ir_cases.zi](../tests/machine_ir_cases.zi) and portable rejection in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi).)
- [x] Bound decoder allocation and graph work by checked input sizes and explicit resource budgets. Use iterative algorithms where attacker-controlled depth could exhaust the compiler stack. (`LirLimits` charging in the codec, verifier and optimizer ([portable-execution.md](portable-execution.md)); budget rejection retained in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) and the container reader accounting in [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi).)
- [x] Provide recoverable structured diagnostics with function, block, instruction, and source context. Library errors must not abort the host process or leak partially built programs. (`LirDiagnostic` carries function/block/instruction/value/origin context in [`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi); failure-preserving owner semantics retained in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) and [machine_ir_cases.zi](../tests/machine_ir_cases.zi).)
- [x] Represent required target features and Gap identifiers explicitly. The
verifier rejects an operation outside the selected target contract; it never
erases it, serializes it as a no-op, or substitutes a portable/native helper.
(`TargetDescribe`/`TargetPreflight` rows with one gap-policy state and stable
`assembly.gap.*` diagnostics in [`compiler_target.zi`](../cmd/compiler_target.zi);
verifier `.Unsupported` rejection in [`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi);
registry coverage and every state in [machine_ir_cases.zi](../tests/machine_ir_cases.zi),
row/code checks in [target_diagnostics.sh](../tests/target_diagnostics.sh).)
## Tests
Add `tests/lowered_ir_cases.zi` and `tests/lowered_verifier_cases.zi`, with shell launchers following the repository's existing check discovery.
The retained fixture is [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) (run through the repository's check discovery), with container-level verification retained in [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi) and [zx_executable.sh](../tests/zx_executable.sh).
- Positive fixtures: straight-line arithmetic, diamonds, loops, nested loops, block parameters, memory-backed locals, indirect calls, and multiple return fields.
- Negative fixtures: cycles in value definitions, invalid dominance, duplicate IDs, wrong block arity, missing terminators, bad types, impossible layouts, effect-order violations, and malformed debug references.
+14 -14
View File
@@ -12,19 +12,19 @@ Translate checked `.zir` into the new portable executable model without recoveri
## Existing integration points
- [Checked program schema](../cmd/compiler_ir.zi) and [semantic body utilities](../cmd/zir/zir_body.c).
- [Current statement emission](../cmd/zir/zir_emit_statement.c), [expression emission](../cmd/zir/zir_emit_expr.c), and [call emission](../cmd/zir/zir_emit_call.c) as behavior references, not source-generation dependencies.
- [Current semantic cleanup implementation](../cmd/zir/zir_cleanup.c).
- [Current native symbol/layout planning](../cmd/zir/zir_native.c).
- [Current assembly metadata](../cmd/zir/zir_asm.c) and [SIMD classification](../cmd/zir/zir_simd.c).
- [Checked program schema](../cmd/compiler_ir.zi) and [semantic body utilities](../cmd/compiler_zir_lower.zi).
- [Current statement, expression, and call emission](../cmd/compiler_zir_lower.zi) as behavior references, not source-generation dependencies.
- [Current semantic cleanup implementation](../cmd/compiler_ir_cleanup.zi).
- [Current native symbol/layout planning](../cmd/compiler_machine_elf.zi).
- [Current assembly metadata and LIR printing](../cmd/compiler_zir_lower.zi) and [SIMD classification](../cmd/compiler_simd_metadata.zi).
Proposed modules: `cmd/compiler_lower.zi`, `cmd/compiler_lower_expr.zi`, `cmd/compiler_lower_control.zi`, `cmd/compiler_lower_storage.zi`, and `cmd/compiler_lower_calls.zi`. Split further only when responsibilities require it.
## Implementation work
- [ ] Lower concrete checked functions after generic specialization and compile-time selection. Preserve declaration ownership, imported names, public/private linkage, and stable function identity.
- [ ] Lower expressions in the language's evaluation order. Named arguments evaluate in source order, then map to parameter positions; do not accidentally inherit machine ABI order.
- [ ] Lower short-circuit logic, conditional expressions, branches, every supported loop form, and named break/continue into explicit blocks and edges.
- [x] Lower concrete checked functions after generic specialization and compile-time selection. Preserve declaration ownership, imported names, public/private linkage, and stable function identity. ([`compiler_zir_lower.zi`](../cmd/compiler_zir_lower.zi) lowers checked programs, [machine_ir_cases.zi](../tests/machine_ir_cases.zi) lowers the real LIR, and [generic_assembly_cases.zi](../tests/generic_assembly_cases.zi) retains generic-identity coverage.)
- [x] Lower expressions in the language's evaluation order. Named arguments evaluate in source order, then map to parameter positions; do not accidentally inherit machine ABI order. (Lowering evaluates arguments in source order before the call ([`compiler_zir_lower.zi`](../cmd/compiler_zir_lower.zi)); [call_order.sh](../tests/call_order.sh), [compound_order_cases.zi](../tests/compound_order_cases.zi) and [native_operand_order_test.zi](../tests/spec/native_operand_order_test.zi) retain it.)
- [ ] Lower short-circuit logic, conditional expressions, branches, every supported loop form, and named break/continue into explicit blocks and edges. Landed slice: short-circuit logic, conditionals and the supported loop forms lower and execute with retained fixtures ([native_loops.sh](../tests/native_loops.sh), [assembly_cases.zi](../tests/assembly_cases.zi)). Doubt recorded: no retained direct-target fixture proves named/labeled break and continue lowering, so that part stays open.
- [ ] Lower returns through a shared, checkable cleanup mechanism. Preserve `defer`, owned-vector/text destruction, moves, temporary lifetime, early exits, and unwind behavior wherever the target contract supports it.
- [ ] Extend the implemented mutable scalar locals, checked global/frame
pointers, nested record/fixed-array paths, immutable string literals/copies,
@@ -36,21 +36,21 @@ Proposed modules: `cmd/compiler_lower.zi`, `cmd/compiler_lower_expr.zi`, `cmd/co
and byte-view slices, checked string indexing/comparison and ordered runtime
initializers. Resizable owned aggregates, generated cleanup/moves, unions and
remaining enum-storage coverage keep this broader item open.
- [ ] Make alias-sensitive assignments and in-place aggregate results correct when a later argument mutates the destination or a global aliases an argument. Optimizations must not change old-value reads.
- [ ] Emit explicit bounds/trap operations before optimization. Carry enough range and effect information for later verified check elimination; do not copy C-only proof shortcuts without their preconditions.
- [ ] Lower direct/indirect calls, procedure values, callbacks, foreign C calls, varargs, startup functions, and function-address equality. Record ABI intent without assigning physical argument registers yet.
- [x] Make alias-sensitive assignments and in-place aggregate results correct when a later argument mutates the destination or a global aliases an argument. Optimizations must not change old-value reads. (Lowering reads destinations before later calls ([`compiler_zir_lower.zi`](../cmd/compiler_zir_lower.zi)); [assembly_cases.zi](../tests/assembly_cases.zi) retains the `global_pointer_alias` and `element_alias` fixtures.)
- [x] Emit explicit bounds/trap operations before optimization. Carry enough range and effect information for later verified check elimination; do not copy C-only proof shortcuts without their preconditions. (Bounds/trap emission in [`compiler_zir_lower.zi`](../cmd/compiler_zir_lower.zi); verified check elimination from proven facts in [`compiler_lowered_proven.zi`](../cmd/compiler_lowered_proven.zi), retained by [proven_pointer_cases.zi](../tests/proven_pointer_cases.zi) and [guarded_index_ranges.sh](../tests/guarded_index_ranges.sh).)
- [ ] Lower direct/indirect calls, procedure values, callbacks, foreign C calls, varargs, startup functions, and function-address equality. Record ABI intent without assigning physical argument registers yet. Landed slice: direct/indirect calls, procedure values and startup entry lower and execute ([lowered_exec_cases.zi](../tests/lowered_exec_cases.zi), [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi)). Callbacks, foreign C calls and varargs keep this item open.
- [ ] Represent language/runtime helpers through typed symbols with defined semantics. Implement helpers in Ziran where possible; inventory every remaining dependence on generated C macros, headers, or compiler intrinsics.
- [ ] Lower portable SIMD to explicit lane types and operations. Preserve saturation, wrapping, masks, lane order, shuffles, and signedness; keep native vector width selection for target lowering.
- [ ] Lower parallel regions into ordinary outlined procedures plus typed runtime operations. Preserve captures, reductions/results, deterministic failure behavior, and synchronization boundaries.
- [ ] Treat GPU offload and OS services as explicit declared backend/runtime capabilities. Implement existing behavior where supported and reject genuine missing facilities before execution without introducing application-specific compiler rules or CPU fallbacks.
- [ ] Preserve `#asm` portable implementations and typed native variant bindings as separate target implementations. A portable build lowers the portable implementation; a direct native build requires a matching architecture/feature variant and rejects its absence. Native templates have explicit operands, effects, clobbers, architecture, and CPU requirements; they cannot become portable opcode semantics.
- [ ] Reject reachable foreign Go objects, Go maps/interfaces, reflection-only tags, or runtime operations in targets that cannot implement them. Retain the Go backend and its existing valid programs.
- [ ] Carry global initialization order, reachability roots, callback roots, exported ABI layouts, diagnostic spans, and law/proof provenance into the lowered program.
- [x] Reject reachable foreign Go objects, Go maps/interfaces, reflection-only tags, or runtime operations in targets that cannot implement them. Retain the Go backend and its existing valid programs. (Opaque-identity and scalar-union checks reject unsupported portable lowering ([feature matrix](feature-matrix.md), [`compiler_ir.zi`](../cmd/compiler_ir.zi)); [compiler_inventory_cases.zi](../tests/compiler_inventory_cases.zi) retains the rejection and the Go target stays selectable.)
- [ ] Carry global initialization order, reachability roots, callback roots, exported ABI layouts, diagnostic spans, and law/proof provenance into the lowered program. Landed slice: ordered global initializers, entry/reachability roots, origin spans and law material link and execute ([`compiler_zx_link_reach.zi`](../cmd/compiler_zx_link_reach.zi), [bundle_provider_cases.zi](../tests/bundle_provider_cases.zi), [bundle_global_reachability.sh](../tests/bundle_global_reachability.sh)). Callback roots and exported ABI layout records keep the rest open.
- [x] Feed the result through the step-02 verifier unconditionally and make lowering failures recoverable through the compiler API.
## Tests
Create lowering fixtures in Ziran and reuse current behavior tests, including [numeric semantics](../tests/numeric_semantics.sh), [operand order](../tests/spec/native_operand_order_test.zi), [parallel captures](../tests/parallel_captures.sh), [generic assembly](../tests/generic_assembly.sh), and [saved-IR mutations](../tests/saved_ir_mutations.zi).
Create lowering fixtures in Ziran and reuse current behavior tests, including [numeric semantics](../tests/numeric_semantics.sh), [operand order](../tests/spec/native_operand_order_test.zi), [parallel captures](../tests/parallel_captures.sh), [generic assembly](../tests/generic_assembly_cases.zi), and [saved-IR mutations](../tests/saved_ir_mutations.zi).
For each matrix feature, compile from `.zi` and saved `.zir`; compare verified lowered structure, outputs, traps, observable host calls, and cleanup effects against the existing supported execution paths. Add independent expected-result oracles for numeric boundaries and aliasing cases rather than relying only on agreement between backends sharing helper code.
+17 -11
View File
@@ -1,6 +1,6 @@
# Step 04 — Execute the portable instruction set directly
Status: in progress; the [isolated verified-LIR engine](portable-execution.md) executes the current verifier-supported subset through `zi2zx run`. Full memory, host-capability, lifecycle/state and target integration remain required. Depends on [steps 02](02-lowered-ir-and-verifier.md) and [03](03-language-lowering.md). Next: [ZX container integration](05-zx-format-and-linking.md).
Status: in progress; the [isolated verified-LIR engine](portable-execution.md) executes the current verifier-supported subset through `zi2zx run`, with per-instance state, host bindings, fuel, replacement and retirement implemented. Nested host-to-bundle calls, reentrancy, SIMD/parallel dispatch, snapshots/migration and the remaining memory coverage stay open. Depends on [steps 02](02-lowered-ir-and-verifier.md) and [03](03-language-lowering.md). Next: [ZX container integration](05-zx-format-and-linking.md).
## Objective
@@ -12,15 +12,16 @@ reconstruct source statements during execution.
## Existing integration points
- [Host-value translation](../cmd/zir/zir_host_exec.c) and [the embedding API](../cmd/zir/zir_host.c).
- [Host-value translation](../bootstrap/runtime/zir_host_exec.h) and [the embedding API](../include/ziran_host.h).
- [Portable execution contract](../docs/ZX.md).
Implemented module: `cmd/compiler_exec.zi`. Its immutable storage plan now keeps
scalars in word slots and aliases a dead aggregate source to its `Insert` result
only when a complete use count proves the source has no other consumer.
Proposed additional modules: `cmd/compiler_exec_memory.zi` and
`cmd/compiler_exec_host.zi`. Keep required embedding exports at the existing C
API boundary. Current source/saved-IR and serialized-instruction tests cover
Instance lifecycle lives in `cmd/compiler_zx_exec_instance.zi`; proposed
additional modules `cmd/compiler_exec_memory.zi` and `cmd/compiler_exec_host.zi`
remain targets for the open memory and host-adapter work. Keep required
embedding exports at the existing C API boundary. Current source/saved-IR and serialized-instruction tests cover
scalar/aggregate operations, direct/indirect calls, instance globals, explicit
frames, budgets and structured traps; they do not establish completion of every
item below.
@@ -52,19 +53,24 @@ item below.
Scalar, structural byte-view and pointer-free record/fixed-array calls now use
validated adapters. Nested host-to-bundle calls, reentrancy and native host
trampolines remain open.
- [ ] Specify and implement fuel at stable semantic checkpoints. Optimizations must preserve when exhaustion becomes observable, especially relative to host side effects and traps. Any batched charging requires a proof that timing is equivalent.
- [x] Specify and implement fuel at stable semantic checkpoints. Optimizations must preserve when exhaustion becomes observable, especially relative to host side effects and traps. Any batched charging requires a proof that timing is equivalent. (`Fuel` instructions charge function entries and loop iterations with batched region charging proven order-equivalent ([execution-contract.md](execution-contract.md), [`compiler_exec.zi`](../cmd/compiler_exec.zi)); no optimizer pass changes Fuel order or count ([`compiler_opt.zi`](../cmd/compiler_opt.zi)); [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi), [bundle_step_limit.sh](../tests/bundle_step_limit.sh) and [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) retain it.)
- [ ] Implement portable SIMD lane behavior and legal parallel runtime operations without assuming native vector instructions or a host thread count.
- [ ] Keep execution state, host bindings, error state, and mutable globals per instance. Exercise simultaneous instances, nested calls, replacement, and retirement.
- [x] Keep execution state, host bindings, error state, and mutable globals per instance. Exercise simultaneous instances, nested calls, replacement, and retirement. (Per-instance storage, host bindings and error state in [`compiler_zx_exec_instance.zi`](../cmd/compiler_zx_exec_instance.zi) and [`compiler_exec.zi`](../cmd/compiler_exec.zi); instance isolation, provenance and nested-call limits retained in [lowered_exec_cases.zi](../tests/lowered_exec_cases.zi), replacement/retirement in [zx_web_lifecycle.sh](../tests/zx_web_lifecycle.sh).)
- [ ] Preserve snapshot/state migration semantics and library composition. Stable persistent identities must survive harmless instruction ordering changes without equating unrelated layouts.
- [ ] Make debug stepping instruction-based with source mappings and inspectable value slots. Avoid debug-only execution semantics that hide release-mode defects.
- [ ] Retain any existing `.zir` evaluator needed for compile-time execution, laws, or tooling until those consumers are deliberately migrated. Removing ZX dependence does not authorize deleting unrelated evaluator services.
- [ ] Reject every unsupported portable opcode/capability with its stable Gap
- [ ] Make debug stepping instruction-based with source mappings and inspectable value slots. Avoid debug-only execution semantics that hide release-mode defects. Landed slice: the optional debug attachment restores source/line origins and native traps name the function, block and source line ([`compiler_exec_debug.zi`](../cmd/compiler_exec_debug.zi), [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi)); instruction-level stepping itself remains open.
- [x] Retain any existing `.zir` evaluator needed for compile-time execution, laws, or tooling until those consumers are deliberately migrated. Removing ZX dependence does not authorize deleting unrelated evaluator services. (The evaluator is retained in [`compiler_parse_eval.zi`](../cmd/compiler_parse_eval.zi); [compile_run.sh](../tests/compile_run.sh) and [laws.sh](../tests/laws.sh) keep exercising it.)
- [x] Reject every unsupported portable opcode/capability with its stable Gap
diagnostic before side effects. Do not invoke the old VM, native engine,
generated C, or a target-specific helper to make the run appear successful.
(The verifier rejects unsupported forms with `.Unsupported` before plan
construction ([`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi));
selection never falls back after a native gap ([zi2zx.zi](../cmd/zi2zx.zi) run
policy, [native_load.sh](../tests/native_load.sh),
[native_backend_policy_cases.zi](../tests/native_backend_policy_cases.zi)).)
## Tests
Add `tests/lowered_exec_cases.zi` and mutation/fault fixtures. Reuse [portable pointers](../tests/portable_pointers.sh), [host strings](../tests/host_strings.sh), [portable records](../tests/portable_host_records.sh), [VM stack bounds](../tests/vm_stack_bounds.sh), [VM retirement](../tests/vm_retirement.sh), and [concurrent instances](../tests/vm_concurrent_instances.sh).
Add `tests/lowered_exec_cases.zi` and mutation/fault fixtures. Reuse [portable pointers](../tests/portable_pointers.sh), [portable records](../tests/portable_host_records.sh), [string cases](../tests/simd_string_cases.zi), and the retained portable cases under `tests/`.
Require the same results from source lowering, saved-IR lowering, encoded/decoded executable instructions, and the reference engine. Compare traps and host-call traces as well as final return values. Test allocation failures, malformed host responses, recursive callbacks, repeated failures, and cancellation/resource exhaustion without leaking instance state.
+18 -15
View File
@@ -1,6 +1,6 @@
# Step 05 — Make ZX a versioned portable executable container
Status: in progress; the [revision-28 executable container](zx-executable-format.md) is the one `.zx` format. It stores verified LIR, runs stripped through the portable engine, and names its host capabilities, module globals and declarations in the host interface section; `ziran bundle`, `ziran run` and the embedding API use it. Library containers, partial composition and native variants remain open. Delivery order: [milestones](milestones.md) M1 and M3. Depends on [steps 02](02-lowered-ir-and-verifier.md)–[04](04-portable-instruction-engine.md). Next: [native code generation](06-optimization-and-native-backend.md).
Status: in progress; the [revision-28 executable container](zx-executable-format.md) is the one `.zx` format. It stores verified LIR, runs stripped through the portable engine, and names its host capabilities, module globals and declarations in the host interface section; `ziran bundle`, `ziran run` and the embedding API use it. Library containers ([`ziran pkg zx pack-ir`](zx-library-format.md)) and module-linked bundles (`--require-module`/`--import`) exist; native variants and cross-container partial composition remain open. Delivery order: [milestones](milestones.md) M1 and M3. Depends on [steps 02](02-lowered-ir-and-verifier.md)–[04](04-portable-instruction-engine.md). Next: [native code generation](06-optimization-and-native-backend.md).
## Objective
@@ -9,39 +9,42 @@ Replace embedded executable `.zir` with the lowered portable instruction program
## Existing integration points
- [Container records and codec](../cmd/compiler_bundle.zi).
- [Bundle linker](../cmd/compiler_link.zi), [bundle implementation](../cmd/zir/zir_bundle.c), and [asset handling](../cmd/zir/zir_bundle_assets.c).
- [Bundle command](../cmd/zi2zx/main.c), [package bundle execution](../cmd/package_bundle_run.zi), and [format documentation](../docs/ZX.md).
- [Bundle linker](../cmd/compiler_link.zi), [bundle implementation](../cmd/compiler_bundle.zi), and [asset handling](../tests/bundle_assets.sh).
- [Bundle command](../cmd/zi2zx.zi), [package bundle execution](../cmd/package_bundle_run.zi), and [format documentation](../docs/ZX.md).
- [Law checking](../cmd/compiler_law.zi) and [proof checking](../cmd/compiler_proof.zi).
Proposed modules: `cmd/compiler_exec_serial.zi`, `cmd/compiler_exec_link.zi`, and `cmd/compiler_exec_variants.zi`. Evolve the existing container owner instead of adding a competing bundle wrapper.
## Implementation work
- [ ] Define a new incompatible ZX revision with explicit section kinds, lengths, alignment, feature requirements, entry IDs, and deterministic ordering. Choose the revision from the live format history at implementation time.
- [x] Define a new incompatible ZX revision with explicit section kinds, lengths, alignment, feature requirements, entry IDs, and deterministic ordering. Choose the revision from the live format history at implementation time. (Revision 28 defined in [zx-executable-format.md](zx-executable-format.md) and implemented in [`compiler_zx_exec.zi`](../cmd/compiler_zx_exec.zi)/[`compiler_exec_serial.zi`](../cmd/compiler_exec_serial.zi); legacy rejection retained in [zx_executable.sh](../tests/zx_executable.sh) and [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi).)
- [ ] Encode functions, blocks, values, instructions, types, relocatable symbolic constants, imports, exports, global initializers, and data without host pointer values or compiler struct layouts.
Revision 28 already serializes ordered initializer IDs and readonly byte data;
imports/exports, relocatable symbols and the public linked representation keep
this container-wide item open.
- [ ] Separate required execution sections from optional source maps, origins, optimization remarks, and original source attachments. Optional executable `.zir` must never be a hidden execution dependency.
- [ ] Preserve asset streaming and binary bytes, deterministic output, write-to-pipe behavior, and existing error semantics. Validate offset/length arithmetic, overlaps, truncation, unsupported required features, and trailing data rules.
- [ ] Lower then link executable symbols and portable type identities. Handle direct/indirect call roots, callbacks, exported layouts, global initialization, function/data address identity, and dead stripping conservatively.
- [ ] Preserve external libraries, thin/add-on bundles, partial-module composition, and their resolution order. Detect duplicate/conflicting definitions and ABI/layout mismatches before instantiation.
- [ ] Recompute capability requirements from verified reachable instructions. Cross-check declared tables, library bindings, and host signatures rather than trusting producer-supplied manifests.
- [x] Separate required execution sections from optional source maps, origins, optimization remarks, and original source attachments. Optional executable `.zir` must never be a hidden execution dependency. (The optional debug attachment (section `0x80000001`) is identity-bound, refuses foreign or damaged bytes and restores stripped origins ([`compiler_exec_debug.zi`](../cmd/compiler_exec_debug.zi), [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi)); [zx_executable.sh](../tests/zx_executable.sh) executes stripped bundles with no source paths. Optimization remarks have no producer yet, so nothing hidden remains executable.)
- [x] Preserve asset streaming and binary bytes, deterministic output, write-to-pipe behavior, and existing error semantics. Validate offset/length arithmetic, overlaps, truncation, unsupported required features, and trailing data rules. (Asset codec in [`compiler_zx_assets.zi`](../cmd/compiler_zx_assets.zi) with [bundle_assets.sh](../tests/bundle_assets.sh); deterministic source/saved bytes, pipe output, and rejection/preservation semantics retained in [zx_executable.sh](../tests/zx_executable.sh) and the overlap/truncation/trailing-bytes fixtures in [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi).)
- [ ] Lower then link executable symbols and portable type identities. Handle direct/indirect call roots, callbacks, exported layouts, global initialization, function/data address identity, and dead stripping conservatively. Landed slice: reachability from direct/indirect roots, global initializers, address identity and conservative dead stripping link in [`compiler_zx_link.zi`](../cmd/compiler_zx_link.zi)/[`compiler_zx_link_reach.zi`](../cmd/compiler_zx_link_reach.zi)/[`compiler_zx_link_prune.zi`](../cmd/compiler_zx_link_prune.zi), retained by [bundle_global_reachability.sh](../tests/bundle_global_reachability.sh). Callback roots and exported ABI layouts keep the rest open.
- [ ] Preserve external libraries, thin/add-on bundles, partial-module composition, and their resolution order. Detect duplicate/conflicting definitions and ABI/layout mismatches before instantiation. Landed slice: module-linked bundles (`--require-module`, `--import`) bind checked module payloads with a combined verified identity ([zi2zx.zi](../cmd/zi2zx.zi), [zx_module_build.sh](../tests/zx_module_build.sh), [zx_module_compiler_cases.zi](../tests/zx_module_compiler_cases.zi), [zx_module_runtime_cases.zi](../tests/zx_module_runtime_cases.zi)). Generic thin/add-on bundle composition beyond required modules stays open.
- [x] Recompute capability requirements from verified reachable instructions. Cross-check declared tables, library bindings, and host signatures rather than trusting producer-supplied manifests. (The writer stores the recomputed capability count and the reader rejects a mismatched manifest (`capability-count`) ([zx-executable-format.md](zx-executable-format.md), [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi)); host result shapes are checked before use in the same fixture.)
- [ ] Keep law evidence honest. Either revalidate attached proof material against an adequate non-executable witness or report producer evidence as unverified metadata. A checksum, previous checker flag, or matching law table is not a proof of lowering correctness.
- [ ] Verify the executable itself independently of any optional proof/source section. Certificates for removed bounds checks or other privileged assumptions must be checkable by the consumer; otherwise retain the checks.
- [x] Verify the executable itself independently of any optional proof/source section. Certificates for removed bounds checks or other privileged assumptions must be checkable by the consumer; otherwise retain the checks. (The owned reader verifies the stripped program regardless of optional bytes ([`compiler_zx_exec_bundle.zi`](../cmd/compiler_zx_exec_bundle.zi), [zx_executable.sh](../tests/zx_executable.sh) stripped execution); no privileged certificate codec exists, so removed checks are never authorized by uncheckable data.)
- [ ] Define native variant records with target CPU, OS/ABI where relevant, required feature masks, common signature, and deterministic selection precedence. If no declared implementation matches the selected target/CPU contract, reject before execution; do not run portable code as a native fallback.
- [ ] Keep generic executable code mandatory for portable bundles. Store native variants as verifiable target-operation/template metadata, not automatically trusted arbitrary machine-code blobs.
- [ ] Validate variant operands, effects, register clobbers, and boundaries before code generation. Keep feature detection baseline-safe and check OS-enabled register state where required.
- [ ] Define explicit target-only artifacts separately when a producer intentionally requires an architecture. The CLI must report that reduced portability and reject unsupported hosts before executing code.
- [ ] Encode the stable Gap identifiers needed for target preflight and inspection.
- [ ] Define explicit target-only artifacts separately when a producer intentionally requires an architecture. The CLI must report that reduced portability and reject unsupported hosts before executing code. Landed slice: `zx2native --target ARCH --platform OS` produces target-only executables and the registry preflight rejects unsupported host rows before any input ([compiler_target.zi](../cmd/compiler_target.zi), [target_diagnostics.sh](../tests/target_diagnostics.sh)). A producer-side reduced-portability declaration surface remains open.
- [x] Encode the stable Gap identifiers needed for target preflight and inspection.
Unknown required target features reject; they do not select another executable
section, format revision, or engine.
- [ ] Reject old incompatible bundles with an actionable rebuild diagnostic. Keep legacy-format rejection tests; do not maintain two executable formats indefinitely.
- [ ] Include every executable and variant section in cache/content identity while keeping optional debug-only changes from unnecessarily invalidating machine code where a correct split is possible.
(`assembly.gap.*` codes in [`compiler_target.zi`](../cmd/compiler_target.zi),
reported by `ziran capabilities`/`ziran explain` ([package_explain.zi](../cmd/package_explain.zi));
every row and code checked in [target_diagnostics.sh](../tests/target_diagnostics.sh).)
- [x] Reject old incompatible bundles with an actionable rebuild diagnostic. Keep legacy-format rejection tests; do not maintain two executable formats indefinitely. (Legacy-revision rejection retained in [zx_executable.sh](../tests/zx_executable.sh); the old VM and TinyCC ZX route are removed per [step 09](09-native-runtime-and-integration.md).)
- [ ] Include every executable and variant section in cache/content identity while keeping optional debug-only changes from unnecessarily invalidating machine code where a correct split is possible. Landed slice: the in-process native compile cache is keyed by the executable's content digest on the same CPU and shares code across open bundles ([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c), [native_cache.sh](../tests/native_cache.sh)); variant sections do not exist yet, so their identity rule is unproven.
## Tests
Extend [bundle verification](../tests/bundle_verification.sh), [compiler bundle tests](../tests/compiler_bundle.sh), [library composition](../tests/bundle_libraries.sh), [partial modules](../tests/bundle_partial_modules.sh), [global reachability](../tests/bundle_global_reachability.sh), and [portable streaming](../tests/zx_portable_write.sh).
Extend the retained bundle checks: [provider cases](../tests/bundle_provider_cases.zi), [executable bundles](../tests/executable_bundle_cases.zi), [global reachability](../tests/bundle_global_reachability.sh), and [step limits](../tests/bundle_step_limit.sh).
Add malformed new-section fixtures, required/optional feature mutations, variant incompatibility tests, stripped-bundle execution, deterministic source/saved-IR bytes, and proof-table tampering. Verify functionally identical portable behavior with supported variants selected, masked out, and unavailable.
+18 -16
View File
@@ -1,6 +1,6 @@
# Step 06 — Optimize executable IR and implement the first native backend
Status: in progress; [verified scalar optimization](optimization-pipeline.md) and the machine-only native encoder ([README.md](README.md)). The [target-neutral machine IR](machine-ir.md) boundary, its verifier, deterministic liveness, linear-scan [register allocation](machine-ir.md#register-allocation) with splitting and spilling, a separate allocated-program verifier, and a [direct x86-64 machine-code encoder](machine-ir.md#machine-code-encoder) for verified allocated programs exist for Linux x86-64 SysV. `zx2native` uses that machine path exclusively; native ZX loading remains open. The implemented native call ABI passes and returns general-register values only: float, vector, aggregate and stack-passed call forms are [unsupported forms](machine-ir.md#supported-call-forms) rejected before encoding, not partially implemented. The full optimizer, the full SysV call ABI and external System V aggregate interoperability remain pending.
Status: in progress; [verified LIR optimization](optimization-pipeline.md) and the machine-native encoder ([README.md](README.md)). The [target-neutral machine IR](machine-ir.md) boundary, its verifier, deterministic liveness, linear-scan [register allocation](machine-ir.md#register-allocation) with splitting and spilling, a separate allocated-program verifier, and a [direct x86-64 machine-code encoder](machine-ir.md#machine-code-encoder) for verified allocated programs exist for Linux x86-64 SysV. `zx2native` uses that machine path exclusively, and the in-process native loader runs verified ZX through it on linux-x86_64, linux-aarch64 and linux-armv7 ([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c), [native_load.sh](../tests/native_load.sh)). The implemented native call ABI passes and returns general-register values only: float, vector, aggregate and stack-passed call forms are [unsupported forms](machine-ir.md#supported-call-forms) rejected before encoding, not partially implemented. Float arithmetic folding, conservative load/store optimization, `#inline`/`#cold`-directed inlining, the full SysV call ABI and external System V aggregate interoperability remain pending.
Direct native code here means Ziran's machine encoder writes machine code and the ELF executable from verified IR, without generated C, an assembler, a C compiler or a system linker. The C and Go targets also produce runnable binaries, but they are separate generated-code exporters with their own toolchains; they are never a fallback for an unsupported native form ([gap policy](gap-policy.md), [distinction](machine-ir.md#direct-native-code-versus-generated-code-exporters)). Depends on stable contracts from [steps 02](02-lowered-ir-and-verifier.md)–[05](05-zx-format-and-linking.md). Next: [target coverage](07-architecture-and-platform-coverage.md).
@@ -11,32 +11,34 @@ Both native entry routes read and verify those bytes before selecting direct
LIR or machine-IR target lowering. `--opt` selects optimized source inspection,
not a second optimization pass on ZX input. `--emit wasm` lowers the same
verified ZX to a wasm32 module, which `ziran build --target=wasm` and the
bundle Wasm tier use. Source/debug origin attachments remain a gap.
bundle Wasm tier use. Source/debug origin attachments ride the optional
debug attachment ([step 09](09-native-runtime-and-integration.md)); inline/generic
origin chains on machine instructions remain partial.
Implement a native backend shared by standalone compilation and native ZX execution. Start with Linux x86-64 System V as the first execution milestone, then complete the required target matrix in step 07. A first working return-value executable is not completion of this step.
## Existing integration points
- [Scalar contracts](../cmd/zir/zir_scalar.h), [range-analysis behavior](../cmd/zir/zir_emit_range.c), and [SIMD behavior](../cmd/zir/zir_simd.c).
- [Native planning](../cmd/zir/zir_native.c).
- [Existing Go assembly translator](../cmd/zi2go/zir_go_amd64.c) for operand/ABI lessons only; Go ABI0 and its runtime assumptions are not Ziran's native ABI.
- [Scalar contracts](../bootstrap/runtime/zir_scalar.h), [range-analysis behavior](../cmd/compiler_c_range.zi), and [SIMD behavior](../cmd/compiler_vector_x86.zi).
- [Native planning](../cmd/compiler_machine_elf.zi).
- [Existing Go assembly translator](../cmd/compiler_go_asm_x64.zi) for operand/ABI lessons only; Go ABI0 and its runtime assumptions are not Ziran's native ABI.
- [Native and SIMD tests](../tests/simd_native.sh).
Implemented machine-IR modules: `cmd/compiler_machine_ir.zi`, `cmd/compiler_machine_lower.zi`, `cmd/compiler_machine_verify.zi`, `cmd/compiler_abi.zi` (the only module that names target registers), `cmd/compiler_regalloc.zi`, `cmd/compiler_machine_verify_allocated.zi`, and `cmd/compiler_x86_64.zi` with the shared byte encoders in `cmd/compiler_x86_bytes.zi`. Proposed: `cmd/compiler_opt.zi`.
Implemented modules: `cmd/compiler_machine_ir.zi`, `cmd/compiler_machine_lower.zi`, `cmd/compiler_machine_verify.zi`, `cmd/compiler_abi.zi` (the only module that names target registers), `cmd/compiler_regalloc.zi`, `cmd/compiler_machine_verify_allocated.zi`, `cmd/compiler_x86_64.zi` with the shared byte encoders in `cmd/compiler_x86_bytes.zi`, and `cmd/compiler_opt.zi`.
## Implementation work
- [ ] Add a pass manager with explicit preconditions, preserved analyses, verification hooks, timing/counter collection, and deterministic before/after dumps.
- [ ] Implement constant folding, copy propagation, unreachable-block removal, dead instruction elimination, and CFG simplification with exact numeric/effect semantics.
- [ ] Add range propagation, redundant-check elimination, common subexpression elimination, and conservative load/store optimization. Invalidate facts on aliasing writes and effectful calls.
- [ ] Implement inlining with recursion/growth limits, source-origin chains, and the existing `#inline`/`#cold` meaning. Include cross-module decisions in dependency/cache identities.
- [ ] Add loop optimizations only when arithmetic, aliasing, exit, fuel, and trap conditions permit them. Do not treat signed overflow, float reassociation, or host side effects as compiler conveniences.
- [x] Add a pass manager with explicit preconditions, preserved analyses, verification hooks, timing/counter collection, and deterministic before/after dumps. ([`compiler_opt.zi`](../cmd/compiler_opt.zi) runs a fixed pass order, re-verifies after every enabled pass, and exposes deterministic run/change counters plus before/after views ([optimization-pipeline.md](optimization-pipeline.md)); [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) retains it.)
- [x] Implement constant folding, copy propagation, unreachable-block removal, dead instruction elimination, and CFG simplification with exact numeric/effect semantics. (Fold/copy/CFG/dead passes in [`compiler_opt.zi`](../cmd/compiler_opt.zi) with exact two's-complement semantics and float bitcast-only conversion folding ([optimization-pipeline.md](optimization-pipeline.md)); [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) and [compiler_opt_float_cases.zi](../tests/compiler_opt_float_cases.zi) retain them.)
- [ ] Add range propagation, redundant-check elimination, common subexpression elimination, and conservative load/store optimization. Invalidate facts on aliasing writes and effectful calls. Landed slice: common subexpression elimination is a verified pass ([`compiler_opt.zi`](../cmd/compiler_opt.zi) `CsePass`, [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi)) and verifier-derived check elimination runs under `--checks` ([`compiler_lowered_proven.zi`](../cmd/compiler_lowered_proven.zi), [guarded_index_ranges.sh](../tests/guarded_index_ranges.sh)). General range propagation and conservative load/store optimization remain open.
- [ ] Implement inlining with recursion/growth limits, source-origin chains, and the existing `#inline`/`#cold` meaning. Include cross-module decisions in dependency/cache identities. Landed slice: leaf and call-site inlining with growth limits and origin preservation exist ([`compiler_opt.zi`](../cmd/compiler_opt.zi) `LirInlineLeaves`/`LirInlineCalls`, default `inline_calls = 48`; [compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) inline cases). `#inline`/`#cold`-directed decisions and cross-module cache identity remain open.
- [x] Add loop optimizations only when arithmetic, aliasing, exit, fuel, and trap conditions permit them. Do not treat signed overflow, float reassociation, or host side effects as compiler conveniences. (LICM, induction-variable strengthening and loop rotation are verified passes in [`compiler_opt.zi`](../cmd/compiler_opt.zi) with Fuel order preserved ([compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) licm/induction/rotate/fuel cases); no float reassociation or effect motion exists ([optimization-pipeline.md](optimization-pipeline.md)).)
- [ ] Lower to target instructions while retaining virtual registers. Model fixed registers, tied operands, condition flags, call clobbers, vector register classes, addressing modes, and literal pools explicitly.
- [x] Implement liveness and a register allocator with splitting/spilling, call-aware live ranges, parallel-copy resolution, and deterministic output. Emit reasons and locations for every spill/reload. ([allocation](machine-ir.md#register-allocation), `tests/regalloc.sh`)
- [x] Implement liveness and a register allocator with splitting/spilling, call-aware live ranges, parallel-copy resolution, and deterministic output. Emit reasons and locations for every spill/reload. ([allocation](machine-ir.md#register-allocation), `tests/regalloc_cases.zi`)
- [x] Verify the allocated program: no overlapping live assignments, missing definitions, broken ties, clobbered live values, invalid register classes, or unresolved parallel copies. It also rejects unimplemented call forms and relocation addends the target cannot hold, so they never reach an encoder; allocation publishes only a verified program and leaves the owner's input intact on any failure.
- [ ] Implement SysV argument/result classification, stack alignment, caller/callee-saved registers, aggregate passing, varargs, callbacks, indirect calls, and externally named symbols.
- [ ] Generate prologues/epilogues, frame layout, unwind information, stack/resource checks, and target-correct returns. Keep source/inline locations through all inserted instructions.
- [ ] Implement baseline scalar integer/float instruction selection first, then every required SIMD lane operation and supported CPU variant. Preserve a runnable baseline when optional features are unavailable.
- [ ] Implement SysV argument/result classification, stack alignment, caller/callee-saved registers, aggregate passing, varargs, callbacks, indirect calls, and externally named symbols. Landed slice: general-register classification, stack alignment, caller/callee-saved registers, indirect calls and externally named symbols lower, allocate and encode ([machine-ir.md](machine-ir.md), [machine_ir_cases.zi](../tests/machine_ir_cases.zi), [regalloc.sh](../tests/regalloc_cases.zi), [x86_encoder_cases.zi](../tests/x86_encoder_cases.zi)). Aggregate passing, varargs and callbacks stay open as [unsupported forms](machine-ir.md#supported-call-forms) rejected before encoding.
- [ ] Generate prologues/epilogues, frame layout, unwind information, stack/resource checks, and target-correct returns. Keep source/inline locations through all inserted instructions. Landed slice: prologues/epilogues, frame layout and returns generate for Linux x86-64; every prologued PE function carries x64 unwind data ([`compiler_machine_pe.zi`](../cmd/compiler_machine_pe.zi)) and Linux x86-64 ELFs carry `.eh_frame`/PT_GNU_EH_FRAME ([`compiler_machine_elf.zi`](../cmd/compiler_machine_elf.zi), [machine_elf.sh](../tests/machine_elf.sh)). Stack probes, inline-location records on inserted instructions, and the remaining targets stay open.
- [ ] Implement baseline scalar integer/float instruction selection first, then every required SIMD lane operation and supported CPU variant. Preserve a runnable baseline when optional features are unavailable. Landed slice: baseline scalar integer and float selection with float/vector register banks lower, allocate and encode ([machine_ir_cases.zi](../tests/machine_ir_cases.zi), [regalloc.sh](../tests/regalloc_cases.zi) float/vector banks). SIMD lane operations and CPU variants remain open.
- [ ] Integrate typed native assembly operands and clobbers with allocation. Implement the supported GNU template/constraint surface or issue explicit unsupported-form diagnostics; never drop a selected assembly block silently.
- [ ] Give separately selected portable and native implementations identical external semantics. Validate result/operand layouts; do not assume that an annotated template is proved equivalent merely because another body is checked. A missing native variant is a Gap error, not permission to execute the portable implementation.
- [ ] Implement runtime calls and parallel-region helpers through the same typed ABI machinery, with stable entry points for the native engine.
@@ -45,7 +47,7 @@ Implemented machine-IR modules: `cmd/compiler_machine_ir.zi`, `cmd/compiler_mach
Add independent native-backend fixtures for register pressure, spills across calls, fixed-register division/shifts, flags, cyclic copies, float edge cases, stack alignment, aggregate ABI classes, varargs, and C callbacks.
Current machine-IR local tests: `tests/machine_ir.sh` covers lowering, ABI constraints, malformed-MIR rejection, exact x86-64 encoded bytes, relocations, fuel and traps, and encoder negatives including float and stack call forms and out-of-range global-address addends rejected before encoding. `tests/regalloc.sh` covers allocation, the allocated verifier, incoming-argument order, and late failures that leave the owner's program intact. They use `--target=c` only to run the test programs.
Current machine-IR local tests: `tests/machine_ir_cases.zi` covers lowering, ABI constraints and malformed-MIR rejection. `tests/x86_encoder_cases.zi` covers exact encoded bytes, relocations, fuel and traps, and rejection of unsupported float and stack call forms and out-of-range global-address addends. `tests/regalloc_cases.zi` covers allocation, the allocated verifier, incoming-argument order, and late failures that leave the owner's program intact. They use `--target=c` only to run the test programs.
Compare optimized/unoptimized new-native output with the portable instruction engine and existing C execution. Use external handwritten C/assembly ABI fixtures as independent callers/callees where practical. Inspect actual encoded instructions after step 08; text snapshots alone cannot validate encoding or execution.
@@ -1,6 +1,6 @@
# Step 07 — Complete architecture, ABI, and platform coverage
Status: planned. Depends on [step 06](06-optimization-and-native-backend.md). Coordinates with [encoding/linking](08-assembler-objects-and-linker.md) and [runtime integration](09-native-runtime-and-integration.md).
Status: in progress. The x86-64 and ARM (ARMv7/AArch64) rows have direct ELF writers and native in-process loading on the Linux rows, while every row is still a Gap until its gate passes with fresh execution evidence. Depends on [step 06](06-optimization-and-native-backend.md). Coordinates with [encoding/linking](08-assembler-objects-and-linker.md) and [runtime integration](09-native-runtime-and-integration.md).
## Objective
@@ -8,8 +8,8 @@ Run one portable executable program across the maintained platform matrix while
## Existing integration points
- [Wasm lowering of verified ZX](../cmd/zx2wasm/zx_wasm_lower.c) and [wasm bundle integration](../cmd/zir/zir_zx_wasm.c).
- [Browser execution integration](../cmd/zir/zir_zx_wasm_web.c).
- [Wasm lowering of verified ZX](../cmd/compiler_zx_wasm.zi) and [wasm bundle integration](../bootstrap/runtime/zir_zx_wasm_install.c).
- [Browser execution integration](../bootstrap/runtime/zir_zx_wasm_web.c).
- [Target diagnostics](../tests/target_diagnostics.sh), [ARM/CPU feature tests](../tests/assembly_features.sh), and [wasm tests](../tests/zx_wasm.sh).
- [Platform and runtime coverage documentation](../docs/IMPLEMENTATION_STATUS.md).
@@ -55,13 +55,27 @@ Implemented row passes. `ziran capabilities --json` prints the registry as
| `wasm32-browser`, `wasm32-wasi` | Wasm | Gap | `assembly.gap.target-unimplemented` | M4 |
No general registry row is Implemented yet. Linux x86-64 machine IR,
allocation, encoding and opt-in ELF output exist, but the native ZX loader and
runtime cutover are open, so that row stays a Gap until its M2–M3 gate passes; a partial stage
such as `TargetMachineLoweringSupported` never implements a row. The
`zx2native` is a separate opt-in tool. Its `--target ARCH --platform OS`
allocation and encoding exist, `zx2native` writes static ELFs for
`x86_64-linux`, `armv7-linux`, `armv7-android`, `aarch64-linux` and
`aarch64-android` ([`compiler_machine_elf.zi`](../cmd/compiler_machine_elf.zi),
[`compiler_aarch64_elf.zi`](../cmd/compiler_aarch64_elf.zi),
[`compiler_armv7_elf.zi`](../cmd/compiler_armv7_elf.zi)) and a PE32+ `.exe` for
`x86_64-windows` ([`compiler_machine_pe.zi`](../cmd/compiler_machine_pe.zi)), and
`zi2zx run`/`ziran run` load and execute bundles natively in process by default
on linux-x86_64, linux-aarch64 and linux-armv7
([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c),
[native_load.sh](../tests/native_load.sh)), with nothing falling back to the
engine. Rows stay Gap until each one's milestone gate passes with fresh
execution evidence; a partial stage such as
`TargetMachineLoweringSupported` never implements a row. The
`zx2native --target ARCH --platform OS`
selector implements the rows whose registry entry names an `executable`
container: `x86_64-linux` writes an ELF and `x86_64-windows` a PE32+ `.exe`
([`compiler_machine_pe.zi`](../cmd/compiler_machine_pe.zi)). Both carry the
container. A Linux
registration may also name an `ar(1)` archive of ELF64 x86-64 objects; the
executable links the members its capabilities reach and stays static
([`compiler_x86_archive.zi`](../cmd/compiler_x86_archive.zi)), and anything
outside that subset is `assembly.gap.machine-archive` naming the capability,
member and symbol. Both carry the
same text, constants and data
([`compiler_x86_image.zi`](../cmd/compiler_x86_image.zi)) and runtime
([`compiler_x86_runtime.zi`](../cmd/compiler_x86_runtime.zi)), whose only
@@ -71,8 +85,29 @@ registers ([`compiler_x86_win64.zi`](../cmd/compiler_x86_win64.zi)). Code
inside the program keeps the Ziran-internal convention on both. The PE imports
only what its runtime calls, is DYNAMIC_BASE/HIGH_ENTROPY_VA with base
relocations for the pointer runtime's addresses and NX_COMPAT, and commits an
8 MiB stack, so frames need no probes; it has no unwind data yet. Every other
described row fails before input/output with
8 MiB stack, so frames need no probes; every function with a prologue carries
x64 unwind data (.pdata and .xdata), and a console gets each line once it ends
where a redirected descriptor gets whole buffers. Both images also supply the
ZX Runner's file and clock services themselves
([`compiler_x86_host.zi`](../cmd/compiler_x86_host.zi)): a program that imports
`FileStatusHost`, `FileReadHost`, `FileWriteHost`, `FileRemoveHost`,
`FileRenameHost`, `DirectoryMakeHost`, `DirectoryListHost`,
`MonotonicNanosecondsHost` or `WallMillisecondsHost` with the signatures
`std/guest_files.zi` and `std/guest_clock.zi` declare gets a veneer after the
library ones instead of a host-capability gap. The linker keeps these apart
from library imports, so the ELF stays static and the PE imports only what its
veneers call. Linux veneers make the system calls directly with the path in a
4 KiB stack slot; Windows veneers widen UTF-8 paths to UTF-16 with
`MultiByteToWideChar`, convert listed names back with `WideCharToMultiByte`,
and import `GetFileAttributesExW`, `CreateFileW`, `ReadFile`, `WriteFile`,
`DeleteFileW`, `MoveFileExW`, `CreateDirectoryW`, `FindFirstFileW`,
`FindNextFileW`, `FindClose`, `QueryPerformanceCounter`,
`QueryPerformanceFrequency` and `GetSystemTimeAsFileTime` as needed. A read
or a listing grows a heap block through the runtime's resize entry, at least
doubling it, and shrinks it to the final length; the block stays allocated.
The built-in veneers carry no unwind records, since the unwind writer covers
the program's own functions only. Every other described row
fails before input/output with
`assembly.gap.machine-platform-service-unavailable` because it has no
executable writer or process-entry/`write_all`/exit runtime. Once a registry row
is Implemented, a CPU feature it does not implement (including another
+14 -14
View File
@@ -1,6 +1,6 @@
# Step 08 — Encode instructions, write objects, and link executables directly
Status: in progress; [direct Linux x86-64 ELF with scalar/aggregate code and static data](README.md). Relocatable objects and a general native linker remain pending. Depends on machine/target contracts from [steps 06](06-optimization-and-native-backend.md) and [07](07-architecture-and-platform-coverage.md).
Status: in progress; direct static Linux x86-64 ELFs, PE32+ executables with unwind data, ARMv7/AArch64 static ELFs, a bounded `ar`-archive slice, and in-memory loading of the same encoded image ([README.md](README.md)). Relocatable objects, COFF/Mach-O output and a general native linker remain pending; Apple64 rows are hardware-blocked on a real host and signing facilities. Depends on machine/target contracts from [steps 06](06-optimization-and-native-backend.md) and [07](07-architecture-and-platform-coverage.md).
## Objective
@@ -8,30 +8,30 @@ Complete the path from allocated machine instructions to native binaries without
## Existing integration points
- [Current C executable driver](../cmd/zi2c/main.c) and [build orchestration](../cmd/zi2c/zir_c_build.c) provide entry, diagnostics, cache, and failure-preservation behavior to retain.
- [Native entry tests](../tests/native_entry.sh) and [link-flag tests](../tests/native_link_flags_cases.zi) provide existing executable/FFI expectations.
- [Current C executable driver](../cmd/zi2c/main.c) and [build orchestration](../cmd/compiler_c_backend.zi) provide entry, diagnostics, cache, and failure-preservation behavior to retain.
- [Native entry tests](../tests/native_entry_cases.zi) and [link-flag tests](../tests/native_link_flags_cases.zi) provide existing executable/FFI expectations.
- [Build rules](../Makefile) and [native runtime build selection](../assembly.mk).
Proposed modules: `cmd/compiler_encode_x86.zi`, `cmd/compiler_encode_arm.zi`, `cmd/compiler_encode_aarch64.zi`, `cmd/compiler_object.zi`, `cmd/compiler_elf.zi`, `cmd/compiler_coff.zi`, `cmd/compiler_macho.zi`, `cmd/compiler_link_native.zi`, and `cmd/compiler_disassemble.zi`.
## Implementation work
- [ ] Implement instruction encoding for every emitted opcode and addressing form, including immediate widths, extension prefixes, branch displacement, vector encodings, and target feature validation.
- [ ] Define symbolic fixups independently of object format. Resolve local labels, literal pools, branch relaxation, long-branch veneers, alignment, and padding to a stable final layout.
- [ ] Print assembly directly from the same allocated/finalized instruction records used by the encoder. Annotate function, source origin, bytes, CPU requirements, stack offsets, and generated instructions.
- [ ] Provide a reader for the emitted textual listing that reconstructs its supported instruction/directive subset. This enables round-trip inspection without requiring text parsing during ordinary compilation. Do not silently imply support for every external assembler dialect.
- [ ] Implement instruction encoding for every emitted opcode and addressing form, including immediate widths, extension prefixes, branch displacement, vector encodings, and target feature validation. Landed slice: the x86-64 encoder covers the emitted opcode/addressing forms with exact-byte fixtures including relocations, fuel and traps ([machine-ir.md](machine-ir.md), [x86_encoder_cases.zi](../tests/x86_encoder_cases.zi)); ARMv7/AArch64 encoders emit their maintained subsets ([machine_elf.sh](../tests/machine_elf.sh)). Vector encodings and full form coverage stay open.
- [ ] Define symbolic fixups independently of object format. Resolve local labels, literal pools, branch relaxation, long-branch veneers, alignment, and padding to a stable final layout. Landed slice: image-relative fixups resolve deterministically for the x86-64 ELF/PE writers, the archive linker, and the in-memory loader ([`compiler_x86_image.zi`](../cmd/compiler_x86_image.zi), [x86_encoder_cases.zi](../tests/x86_encoder_cases.zi)). Literal pools and branch relaxation/veneers for other targets stay open.
- [ ] Print assembly directly from the same allocated/finalized instruction records used by the encoder. Annotate function, source origin, bytes, CPU requirements, stack offsets, and generated instructions. Landed slice: final disassembly reads the actual bytes through the inspection flow with byte maps and identity checks ([vscode-inspection.md](vscode-inspection.md), `zx2native --emit map` in [machine_elf.sh](../tests/machine_elf.sh)); an internal printer annotated from encoder records remains open.
- [ ] Provide a reader for the emitted textual listing that reconstructs its supported instruction/directive subset. Deliberate post-cutover extension per the [milestones](milestones.md) review (“unbounded extras”): listings are inspection views of encoder records, not a required assembler dialect, and no round-trip reader is planned before cutover.
- [ ] Keep existing user `#asm` syntax support a separate compatibility task: parse and bind the supported templates and constraints, including labels/directives where allowed. On the direct assembly target, require a matching declared target/feature implementation and issue a stable diagnostic when absent; do not execute the portable body or invoke another backend.
- [ ] Write relocatable ELF, COFF, and Mach-O objects for required rows. Include text/data/readonly/BSS/TLS sections, symbols, visibility, alignment, relocations, unwind records, and debug references.
- [ ] Implement archive reading and symbol extraction, COMDAT/coalescing rules where required, weak symbols, unresolved references, duplicate definitions, section garbage collection, and retained exports/callback roots.
- [ ] Link supported executable/shared-object forms: ELF program headers and dynamic records, PE imports/exports and relocation tables, and Mach-O load commands/fixups as required by the maintained targets.
- [ ] Write relocatable ELF, COFF, and Mach-O objects for required rows. Include text/data/readonly/BSS/TLS sections, symbols, visibility, alignment, relocations, unwind records, and debug references. Landed slice: static ELF executables with text/rodata/data/BSS, symbols and `.eh_frame` ([`compiler_machine_elf.zi`](../cmd/compiler_machine_elf.zi), [machine_elf.sh](../tests/machine_elf.sh)) and PE32+ with base relocations and x64 unwind data ([`compiler_machine_pe.zi`](../cmd/compiler_machine_pe.zi)) exist, plus ARMv7/AArch64 static ELFs. Relocatable objects, COFF, Mach-O and TLS sections remain open; Mach-O is hardware-blocked on a real Apple host and signing facilities.
- [ ] Implement archive reading and symbol extraction, COMDAT/coalescing rules where required, weak symbols, unresolved references, duplicate definitions, section garbage collection, and retained exports/callback roots. Landed slice: a `NAME.library` registration may name an `ar(1)` archive of ELF64 x86-64 objects ([`compiler_x86_archive.zi`](../cmd/compiler_x86_archive.zi)); the reached members' text, read-only data, writable data, zero fill, GOT entries and relocations go into the static Linux ELF and each capability's veneer calls its member directly. Anything outside that subset (TLS, `init_array`, an undefined or duplicate symbol, an unsupported relocation) is the stable `assembly.gap.machine-archive` diagnostic naming the capability, the member and the symbol.
- [ ] Link supported executable/shared-object forms: ELF program headers and dynamic records, PE imports/exports and relocation tables, and Mach-O load commands/fixups as required by the maintained targets. Landed slice: static ELF executables with RX/R program pages, PT_INTERP/PT_DYNAMIC host-library linking and GOT/data relocations, and PE32+ IAT imports, DYNAMIC_BASE/HIGH_ENTROPY_VA/NX and base relocations ([step 07](07-architecture-and-platform-coverage.md) registry notes, [native_entry.sh](../tests/native_entry_cases.zi)). Shared-object ELF output and Mach-O load commands stay open.
- [ ] Implement startup/entry handling and runtime helper linkage for console programs and libraries. Preserve command arguments, exit status, global initialization, thread/runtime setup, and foreign callbacks.
- [ ] Resolve ordinary OS and third-party libraries through explicit target search paths and format-aware symbol handling. Existing compiled foreign libraries are valid inputs; compiling their C sources is outside Ziran code generation.
- [ ] Inventory C-compiler-driver conveniences previously supplied by `CC`: CRT selection, sysroot, libc, dynamic loader, TLS, compiler support routines, and default libraries. Replace each with explicit native driver configuration and diagnostics.
- [ ] Define the supported native link-option surface. Preserve C-target pass-through options on the C backend; reject options that have no new-native equivalent instead of ignoring them.
- [ ] Implement platform-required executable authentication/signing integration where needed for a runnable artifact. Use installed OS signing facilities and explicit credentials; do not claim that a written Mach-O/PE file alone proves launchability.
- [ ] Write outputs atomically, preserving the last valid executable on failure. Cache object contributions using target, ABI, backend, flags, dependencies, and runtime identities.
- [ ] Produce relocation/link maps, section sizes, resolved symbol addresses, inserted stubs, padding, and a source-linked disassembly from actual final bytes.
- [ ] Expose the same encoder and relocation primitives to the in-memory loader in step 09; do not create an unrelated JIT instruction encoder.
- [ ] Implement platform-required executable authentication/signing integration where needed for a runnable artifact. Use installed OS signing facilities and explicit credentials; do not claim that a written Mach-O/PE file alone proves launchability. Hardware-blocked today: no Apple host or signing facilities are available, so Mach-O/Apple64 rows stay Unknown (Windows PE launch on real hardware is likewise unproven; Wine is emulation, never row evidence).
- [ ] Write outputs atomically, preserving the last valid executable on failure. Cache object contributions using target, ABI, backend, flags, dependencies, and runtime identities. Landed slice: format tools write a sibling temporary and replace the target only after a complete write ([zx-executable-format.md](zx-executable-format.md), [machine_ir_cases.zi](../tests/machine_ir_cases.zi) failure-preservation fixtures), and the bundle native cache is keyed by bundle/libraries/CPU/compiler identities ([native_cache.sh](../tests/native_cache.sh)). Per-object contribution caching beyond the bundle cache stays open.
- [ ] Produce relocation/link maps, section sizes, resolved symbol addresses, inserted stubs, padding, and a source-linked disassembly from actual final bytes. Landed slice: `zx2native --emit map` publishes a bounded byte map with sections, symbols and resolved extents ([`zx2native.zi`](../cmd/zx2native.zi), [machine_elf.sh](../tests/machine_elf.sh)), and the inspection flow disassembles the final ELF against that map ([vscode-inspection.md](vscode-inspection.md)). Stub/padding attribution and inline-frame mapping remain open.
- [x] Expose the same encoder and relocation primitives to the in-memory loader in step 09; do not create an unrelated JIT instruction encoder. ([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c) compiles verified ZX with the same machine pipeline, resolves the image's relocations against instance data/veneers/trap stub, and only then flips pages to RX; [native_load.sh](../tests/native_load.sh) retains it.)
## Tests
+17 -12
View File
@@ -41,7 +41,7 @@ blocks through power-of-two size classes instead of mapping and unmapping each
growth; a block over 1 MiB is its own mapping and grows by `mremap`.
Native ZX loading on linux-x86_64, linux-aarch64 and linux-armv7
([`zir_host_native.c`](../cmd/zir/zir_host_native.c), with each architecture's
([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c), with each architecture's
veneers and relocation fields in `zir_host_native_<arch>.c`; ARMv7's also
hold the 64-bit divide and int64/float conversion helpers A32 lacks)
compiles the bundle's verified program with the same machine pipeline, copies
@@ -56,7 +56,7 @@ attachment) source line, and ends that instance; nothing restarts on the
engine.
With checks on, native data pointers are checked as the engine checks them
([plan](../plans/2026-11-15-manual-safety.md)). A pointer is a
(checks are opt-in with `#checks`). A pointer is a
token naming a slot of the instance's pointer table, version and offset; every
load, store, byte comparison and platform-service argument resolves it
against a live slot of the same version, within its size and, for writes,
@@ -80,23 +80,24 @@ bundle Wasm tier use this shared instruction route.
For literal-only hello, direct instruction selection emits no stack frame or
spill slots, uses short constants, and writes the literal from read-only data.
The ELF file places `.rodata` immediately after `.text`, with congruent file
offsets and virtual addresses on distinct RX/R pages, and omits an empty
`.data` section. Function symbols retain positive bounded text extents;
inlined platform service declarations are omitted from the ELF symbol table,
offsets and virtual addresses on distinct RX/R pages, and carries `.data` only
as a zero-length section header when no writable storage exists. `_start` and
each function's symbol retain positive bounded text extents;
inlined platform service declarations are omitted from the symbol table,
so the static executable has no undefined symbols or misleading trap aliases.
## Existing integration points
- [Embedding API](../include/ziran_host.h), [bundle lifecycle](../cmd/zir/zir_host.c) and the [engine bridge](../cmd/zir/zir_host_exec.c), which translates host values for the [portable instruction engine](../cmd/compiler_exec.zi) and for the [native ZX loader](../cmd/zir/zir_host_native.c).
- [Wasm lowering](../cmd/zx2wasm/zx_wasm_lower.h) and [browser integration](../cmd/zir/zir_zx_wasm_web.c).
- [Embedding API](../include/ziran_host.h), [bundle lifecycle](../cmd/compiler_host_api.zi) and the [engine bridge](../bootstrap/runtime/zir_host_exec.h), which translates host values for the [portable instruction engine](../cmd/compiler_exec.zi) and for the [native ZX loader](../bootstrap/runtime/zir_host_native.c).
- [Wasm lowering](../cmd/compiler_zx_wasm.zi) and [browser integration](../bootstrap/runtime/zir_zx_wasm_web.c).
- [Package entry](../cmd/package_entry.zi), [options](../cmd/package_options.zi), [bundle run](../cmd/package_bundle_run.zi), and [capability reporting](../cmd/package_capabilities.zi).
Proposed modules: `cmd/compiler_native_load.zi`, `cmd/compiler_native_cache.zi`, `cmd/compiler_exec_instance.zi`, and a native backend command entry integrated into the existing package driver.
## Implementation work
- [ ] Expose one compile API taking verified executable IR, target description, optimization policy, and runtime ABI. AOT objects and in-memory images differ in output handling, not instruction semantics.
- [ ] Implement in-memory layout, symbol resolution, relocations, executable-memory allocation, write/execute transitions, instruction-cache synchronization, unwind registration, and teardown for supported platforms.
- [x] Expose one compile API taking verified executable IR, target description, optimization policy, and runtime ABI. AOT objects and in-memory images differ in output handling, not instruction semantics. ([`compiler_machine_pipeline.zi`](../cmd/compiler_machine_pipeline.zi) is shared by `zx2native` and the in-process loader ([zir_host_native.c](../bootstrap/runtime/zir_host_native.c)); [native_load.sh](../tests/native_load.sh) and [machine_elf.sh](../tests/machine_elf.sh) retain both routes.)
- [ ] Implement in-memory layout, symbol resolution, relocations, executable-memory allocation, write/execute transitions, instruction-cache synchronization, unwind registration, and teardown for supported platforms. Landed slice: linux-x86_64, linux-aarch64 and linux-armv7 load in process with RW-then-RX pages, relocations resolved against instance data/veneers/trap stub, content-digest code sharing, teardown after the last close, and optional JITDUMP publication ([zir_host_native.c](../bootstrap/runtime/zir_host_native.c), [native_load.sh](../tests/native_load.sh)). Windows/macOS loaders, explicit icache synchronization and unwind registration beyond `.eh_frame`/PE unwind stay open.
- [ ] Do not trust persisted executable bytes solely because a neighboring metadata file claims they were verified. Define cache integrity, ownership, atomic installation, invalidation, and refusal behavior explicitly.
- [ ] Key cache entries by executable content, linked libraries, target/ABI, actual selected CPU features, backend/runtime identities, optimization settings, and instrumentation semantics. Keep mutable instance state outside cached code.
- [ ] Preserve concurrent compilation, concurrent instantiation, nested calls, independent globals, reentrant host capabilities, cancellation, failures, and lifecycle retirement. Cache cleanup must not unload code still referenced by a live instance.
@@ -108,11 +109,15 @@ Proposed modules: `cmd/compiler_native_load.zi`, `cmd/compiler_native_cache.zi`,
Floating-point formatting and every unavailable target service remain stable
named gaps. Other target rows remain unchecked.
- [ ] Preserve execution budgets, stack checks, source-aware traps, parallel workers, persistent state, migration, snapshots, and module/library initialization across native and interpreted modes.
- [ ] Make the engine-selection contract explicit. A native request fails
- [x] Make the engine-selection contract explicit. A native request fails
clearly if unsupported and never starts the interpreter. A portable request
never executes native code. A command may have one documented default, but
preflight failure never changes that selection.
- [ ] Add direct-native build/run targets to the package driver and target capability reports. Keep existing C/Go/wasm commands and legitimate target-specific bindings usable.
(`zi2zx run --backend native|engine` with platform defaults and no fallback
([zi2zx.zi](../cmd/zi2zx.zi) run policy); [native_load.sh](../tests/native_load.sh)
and [native_backend_policy_cases.zi](../tests/native_backend_policy_cases.zi)
retain the selection and failure behavior.)
- [x] Add direct-native build/run targets to the package driver and target capability reports. Keep existing C/Go/wasm commands and legitimate target-specific bindings usable. (`ziran build` composes `zi2zx` and `zx2native` and `ziran run` executes bundles natively on the Linux rows ([package.zi](../cmd/package.zi)); `ziran capabilities --assembly-target[+FEATURE]` runs the registry preflight ([package_capabilities.zi](../cmd/package_capabilities.zi), [target_diagnostics.sh](../tests/target_diagnostics.sh)); C/Go/wasm commands remain separate routes.)
- [ ] Integrate package dependency recipes, native artifact caching, sysroots, host providers, assets, executable entries, libraries, install paths, and incremental rebuild dependencies.
- [x] Replace the browser's generated-C bundle compilation path with direct wasm output from the same portable IR. Interpreter execution remains an explicit separate mode where browser/runtime policy permits it, never a direct-Wasm fallback.
- [ ] Build runtime helpers through the new backend and verify self-hosting of the new compiler modules. Retain the established bootstrap mechanism; regeneration must be deterministic and locally checked.
@@ -122,7 +127,7 @@ Proposed modules: `cmd/compiler_native_load.zi`, `cmd/compiler_native_cache.zi`,
## Tests
Extend [native run](../tests/native_run.sh), [portable entry](../tests/portable_entry.sh), [bundle providers](../tests/bundle_runtime_provider.sh), [cache tests](../tests/native_cache.sh), [object reuse](../tests/native_object_reuse_cases.zi), [build concurrency](../tests/native_cache_parallel.sh), [browser lifecycle](../tests/zx_web_lifecycle.sh), and [install tests](../tests/install_user.sh).
Extend [native run](../tests/native_run.sh), [portable entry](../tests/portable_entry.sh), [bundle providers](../tests/bundle_provider_cases.zi), [cache tests](../tests/native_cache.sh), [object reuse](../tests/native_object_reuse_cases.zi), [build concurrency](../tests/native_cache_parallel.sh), [browser lifecycle](../tests/zx_web_lifecycle.sh), and [install tests](../tests/install_user_cases.zi).
Add cold/warm cache correctness, interrupted writes, incompatible CPU cache reuse, stale runtime ABI, corrupted entries, load/unload races, nested host callbacks, parallel failure, and mutable-state separation. Test from stripped bundles with no C compiler available. Run independent native AOT and native ZX instances against the same fixture expectations.
@@ -1,6 +1,6 @@
# Step 10 — Complete inspectability, validate performance, and cut over
Status: in progress; [lowered instruction dumps, optimization counters and bounded native byte-range maps](README.md). Complete pipeline inspection, profiling, performance validation and cutover remain pending. Depends on all preceding steps. This is the only step that may declare the complete upgrade finished.
Status: in progress; [lowered instruction dumps, optimization counters and bounded native byte-range maps](README.md), Linux `.eh_frame` with PT_GNU_EH_FRAME and x64 PE unwind data ([machine_elf.sh](../tests/machine_elf.sh), [`compiler_machine_elf.zi`](../cmd/compiler_machine_elf.zi)), and `zx2native --emit perf-map`. JITDUMP publication under `ZIRAN_JIT_DUMP` is an uncommitted in-flight slice in the loader and `native_load.sh`; it is not landed. Complete pipeline inspection, profiling, performance validation and cutover remain pending. Depends on all preceding steps. This is the only step that may declare the complete upgrade finished.
## Objective
@@ -8,7 +8,7 @@ Make bottlenecks traceable from source to executed instructions, validate the co
## Existing integration points
- [Inspection command](../cmd/zir-inspect/main.c), [compiler profiling](../cmd/zir/zir_profile.h), and [package explain](../cmd/package_explain.zi).
- [Inspection command](../cmd/inspect.zi), [compiler profiling](../bootstrap/runtime/zir_profile.h), and [package explain](../cmd/package_explain.zi).
- [Compiler command](../cmd/package_entry.zi), [compile-command reporting](../cmd/package_compile_commands.zi), and [feature reporting](../cmd/package_features.zi).
- [Check discovery](../tests/check_plan.zi), [build/test rules](../Makefile), and [benchmark instructions](../bench/README.md).
- [Architecture](../docs/ARCHITECTURE.md), [ZIR](../docs/ZIR.md), [ZX](../docs/ZX.md), [usage](../docs/USAGE.md), and [implementation status](../docs/IMPLEMENTATION_STATUS.md).
@@ -17,15 +17,15 @@ Proposed modules: `cmd/compiler_inspect_exec.zi`, `cmd/compiler_debug_map.zi`, a
## Inspectability deliverables
- [ ] Provide deterministic dumps for ZIR, initial portable IR, optimized portable IR, selected machine IR, allocated machine IR, assembly, object metadata, link map, and final executable disassembly.
- [ ] Provide deterministic dumps for ZIR, initial portable IR, optimized portable IR, selected machine IR, allocated machine IR, assembly, object metadata, link map, and final executable disassembly. Landed slice: `ziran ir` writes canonical saved ZIR ([zx_executable.sh](../tests/zx_executable.sh) byte-identical source/saved output), `zi2zx --emit lir` with/without `--opt` prints initial and optimized LIR with deterministic counters ([vscode-inspection.md](vscode-inspection.md) artifact set), machine-IR text views are deterministic ([machine_ir_cases.zi](../tests/machine_ir_cases.zi)), and `zx2native --emit map` plus the objdump inspection flow publish object/section/symbol maps and final-ELF disassembly ([machine_elf.sh](../tests/machine_elf.sh)). Selected/allocated machine-IR dumps in the CLI pipeline and an internal encoder-record listing remain open.
- [ ] Map source spans and inline/generic origin chains to instructions, addresses, symbols, and stack locations. Preserve many-to-many mappings when optimization combines or duplicates operations.
- [ ] Explain eliminated checks, folded expressions, inlining decisions, missed vectorization, dispatch selection, spills/reloads, frame sizes, call sites, and linker-generated stubs/padding.
- [ ] Produce human-readable output and structured JSON for each stage. Large programs support bounded function/block/address selection; tools must not require dumping an entire binary to inspect one function.
- [ ] Keep assembly/listing output tied to the actual encoder and final disassembly tied to actual bytes, including relocated addresses. Label estimated costs separately from measured costs.
- [ ] Generate source/line and unwind metadata suitable for platform debuggers and profilers. Register JIT functions and address ranges where supported, unregister on retirement, and keep sampled addresses attributable after code moves/unloads.
- [ ] On Linux, integrate available `perf`/JIT symbol-map facilities; supply the corresponding supported mechanisms on other maintained platforms. Record missing hardware counters explicitly rather than fabricating cycle data.
- [ ] On Linux, integrate available `perf`/JIT symbol-map facilities; supply the corresponding supported mechanisms on other maintained platforms. Record missing hardware counters explicitly rather than fabricating cycle data. Landed slice: AOT executables keep their function symbols; native block/instruction attribution remains through `zx2native --emit map`. The in-process native loader's JITDUMP publication under `ZIRAN_JIT_DUMP` (one JIT_CODE_LOAD record per function extent, written before the code runs) is an uncommitted in-flight slice in `bootstrap/runtime/zir_host_native.c` and `tests/native_load.sh`; it does not close this item until it lands.
- [ ] Attribute samples to functions, instructions, inline frames, CPU variants, and host bridges. Report hot-path execution, spills, cache/branch evidence, and host-call overhead only when measured data supports the claim.
- [ ] Make stripped and debug artifacts share an explicit build identity and compatible sidecar maps. Inspection output must state the code identity, target, variant, optimization policy, and whether addresses describe AOT or loaded code.
- [ ] Make stripped and debug artifacts share an explicit build identity and compatible sidecar maps. Inspection output must state the code identity, target, variant, optimization policy, and whether addresses describe AOT or loaded code. Landed slice: the optional debug attachment binds to the program section's identity and is refused on mismatch ([`compiler_exec_debug.zi`](../cmd/compiler_exec_debug.zi), [executable_bundle_cases.zi](../tests/executable_bundle_cases.zi)), and the inspection flow verifies the map names the exact ELF it disassembles ([vscode-inspection.md](vscode-inspection.md)). A unified identity statement across stripped/debug artifacts remains open.
## Correctness and integration closure
+67 -37
View File
@@ -1,8 +1,9 @@
# Direct assembly implementation
## Status: experimental backend, not the completed upgrade
## State
The ten-step plan is **not finished**. `zi2zx` lowers checked source or
The upgrade is not finished: the M4-M6 rows are open work in
[plans/open-work.md](../plans/open-work.md). `zi2zx` lowers checked source or
saved `.zir` to verified, typed SSA, and `zx2native` directly encodes a Linux x86-64 ELF
executable. Every `.zx` is the [revision-28 executable
container](zx-executable-format.md) of those verified instructions: `zi2zx`
@@ -71,9 +72,12 @@ assembler, C compiler, or system linker to produce this executable.
- Block-parameter SSA with simultaneous edge copies, explicit ordered effects,
copied source origins, and a bounded verifier that rejects invalid definitions,
dominance, CFG edges, types, and effect order.
- Deterministic raw x86-64 encoding and ELF output with `.text`, `.strtab` and
`.symtab` sections. Startup, trap and `module:function` symbols refer to the
actual linked function bytes, so final disassembly has meaningful labels.
- Deterministic raw x86-64 encoding and ELF output with `.text`, `.rodata`,
`.data`, `.bss`, `.symtab`, `.strtab`, `.dynamic` and `.shstrtab` section
headers. `_start` and each program function's symbol carry their linked
address and byte extent, so final disassembly, debuggers and profilers have
meaningful labels; the section table describes the same bytes the program
headers map.
- Static globals and checked global/record-field pointer slots in direct ELF,
with zero/scalar initialization, packed aggregate loads/stores, pointer
parameters/results and separate RX text, read-only data and RW data segments.
@@ -109,6 +113,16 @@ assembler, C compiler, or system linker to produce this executable.
direct portable call. Native output accepts only the exact typed
target-owned console services described below; arbitrary host capabilities
still fail until native host trampolines exist.
- A registered host library may instead be an `ar(1)` archive of ELF64 x86-64
relocatable objects (`cc -c`, `ar rcs`). The Linux executable links the
members its capabilities reach, once each, carrying their text, read-only
constants, writable data, zero fill and relocations, and each capability's
veneer calls its member directly, so the executable stays static and has no
dynamic record. Absolute, PC32/PC64, PLT32, 32/32S, SIZE and GOT-relative
relocations are applied; TLS, constructor arrays, an undefined or duplicate
symbol and an unsupported relocation are the stable
`assembly.gap.machine-archive` diagnostic naming the capability, member and
symbol. A Windows image links no archive yet.
- `string` lowers to the record `{data: *u8, count: s64}`. Literals become
deduplicated read-only byte-array globals (empty literals use a null data
pointer); copies, reassignment, returns, `.count`, `.data`, checked indexing,
@@ -162,10 +176,16 @@ assembler, C compiler, or system linker to produce this executable.
Trapping operations, ordered effects and executed fuel checkpoints remain
observable. This is not the complete optimization pipeline or register allocator.
This is a stack-slot backend, **not** an optimizing register allocator. It has
no demonstrated performance advantage. Native `Fuel` records emit no bytes and
appear as zero-length map ranges: execution is unmetered AOT, not the proposed
budgeted ZX instruction engine. Explicit native traps terminate with status 125.
The machine-IR path is register-allocated: liveness and linear-scan allocation
with splitting and spilling feed the allocated-program verifier and the x86-64
encoder (`tests/regalloc_cases.zi`, `tests/machine_ir_cases.zi`). Native code
consumes the same fuel checkpoints as the engine (loop headers and function
entries); an AOT executable starts with an unbounded budget, as a bundle run
does, and `zx2native --fuel N` sets one. Explicit native traps terminate with
status 125. No absolute speedup is claimed: Alpha's physical-host interim
comparison has native ZX faster than the portable engine but slower than the
removed TinyCC tier and C on several kernels
([milestones](milestones.md), [bench results](../bench/zx_compare.md)).
## Build, inspect, execute
@@ -197,10 +217,11 @@ write inspection data to standard output; ELF output requires a file path.
`--diagnostics=json` includes structured diagnostic codes.
Maps report actual ELF file/text/data sizes, file offsets and virtual addresses
in `image`. An image with no writable state has one program header and a
128-byte text offset; one with globals, fuel, traps or buffered output has
two and a 176-byte text offset, and its data follows the text in the file,
mapped one page higher. Use the reported
in `image`. An image with no writable state has two program headers (the RX
load and `PT_GNU_EH_FRAME`) and a 176-byte text offset; one with globals, fuel,
traps or buffered output has three and a 240-byte text offset, and its data
follows the text in the file, mapped one page higher. A dynamically linked
image has six program headers and a 400-byte text offset. Use the reported
`text_virtual_address` rather than the scalar example's fixed adjustment when
disassembling another image. Reported addresses describe the linked AOT ELF,
not an observed running process or a future relocatable/JIT code allocation.
@@ -212,6 +233,15 @@ boundary. `--opt` on ZX input does not rerun passes. Maps
encode the image to obtain this identity; they are inspection work, not a
cheap source-only preview or a runtime performance measurement.
Every Linux x86-64 ELF carries `.eh_frame`, mapped read-only inside the first
`PT_LOAD` and named by `PT_GNU_EH_FRAME`: one CIE and one FDE per generated
function extent, including `_start` and the built-in service veneers. The
records describe the actual prologue and epilogue bytes, so debuggers and perf
can unwind without libc; frameless functions get an empty FDE. The section is
deterministic and needs no assembler, linker or libc. Runtime routines that are
not generated function extents (the trap stub) have no FDE, and PE unwind is
unchanged.
Native maps support bounded output without renumbering identities:
```sh
@@ -219,6 +249,8 @@ build/bin/zx2native --emit map --function-id 0 --block-id 0 \
-o build/assembly_scalar.block.map.json build/assembly_scalar.zx
build/bin/zx2native --emit map --address-begin 35 --address-end 80 \
-o build/assembly_scalar.address.map.json build/assembly_scalar.zx
build/bin/zx2native --emit perf-map --function-id 0 \
-o build/assembly_scalar.function.perf build/assembly_scalar.zx
```
Function/block IDs refer to the selected lowered program (after `--opt`, if
@@ -230,6 +262,11 @@ Filtered maps retain full extents for selected functions and only referenced
origins plus their parent chains. An empty intersection is explicit, not an
error or an excuse to dump the whole program. `selection`, `selected_ranges`
and `total_ranges` distinguish filtered output from a complete byte map.
`--emit perf-map` writes the same bounded selection as perf's text map, one
`address size symbol[@source:line]` line per range. A source line appears only
when `zi2zx --debug` attached origins; the JSON map is unchanged. A perf map is
a Linux inspection surface: another target fails with `assembly.gap.perf-map`
and no fallback.
These options bound inspection output, not compilation work: the current
encoder still verifies and lays out the complete program.
@@ -265,16 +302,14 @@ encoding and inspection data, without claiming target execution.
## Still required
No M2–M6 completion gate is closed by this M0/M1 work. Outstanding language and
runtime work includes resizable owned vectors and other dynamic collections,
their generated cleanup/move paths, nested or reentrant host-to-bundle calls,
foreign C/system services, concurrency and the remaining matrix operations.
The new ZX container still needs complete library composition and capability
metadata cross-checking; slice shapes outside the checked-token subset, native
aggregate call forms and arbitrary host trampolines remain gaps.
The remaining M2 integration,
relocatable objects and a general linker, other architectures and OS ABIs,
source/unwind information, profiler/JIT mapping and final cutover remain M2–M6.
The upgrade is not complete. Outstanding language and runtime work includes
resizable owned vectors and other dynamic collections, their generated
cleanup/move paths, nested or reentrant host-to-bundle calls, foreign
C/system services, concurrency and the remaining matrix operations. The ZX
container still needs complete library composition and capability metadata
cross-checking; slice shapes outside the checked-token subset, native
aggregate call forms and arbitrary host trampolines remain gaps. The open
M4-M6 rows are tracked in [plans/open-work.md](../plans/open-work.md).
Unsupported constructs fail explicitly; there is no silent fallback to C, Go
or another engine inside the portable/native assembly route. The C and
@@ -282,10 +317,8 @@ Go backends remain separate source-output routes that can compile platform
binaries when explicitly selected. Mixed signedness comparisons require explicit
casts. The bounded revision-28 ZX reader validates container identities, the
instruction schema, entry and declared capabilities before native lowering.
The labeled physical-Alpha portable-engine follow-up is documented in
[the benchmark report](../bench/zx_compare.md#final-pointer-dispatch-cohort-2026-11-13).
It is not the strict full benchmark campaign, cross-platform execution
validation or installed-tool verification. An interim portable result does not
Benchmark receipts live under `bench/results/` and
[bench/zx_compare.md](../bench/zx_compare.md). An interim result does not
close the full upgrade's feature or validation gates.
## Implementation and local tests
@@ -297,7 +330,7 @@ close the full upgrade's feature or validation gates.
- [Executable container binding](../cmd/compiler_exec_link.zi) and
[format](zx-executable-format.md); [machine IR](../cmd/compiler_machine_ir.zi),
[lowering](../cmd/compiler_machine_lower.zi) and [verifier](../cmd/compiler_machine_verify.zi).
- [Checked-language adapter](../cmd/zi2zx/zir_asm_lower.c),
- [Checked-language adapter](../cmd/compiler_zir_lower.zi),
[CLI](../cmd/zi2zx/main.c), [build integration](../assembly.mk).
- [Source/saved-IR integration tests](../tests/assembly_cases.zi),
[verifier fixtures](../tests/spec/compiler_lowered_verify_test.zi),
@@ -308,17 +341,14 @@ close the full upgrade's feature or validation gates.
reporting, not a measured compiler/runtime speedup.
```sh
env -u DISPLAY -u WAYLAND_DISPLAY build-queue -- sh -eu <<'SH'
make assembly JOBS=2
sh tests/direct_assembly.sh build/bin/ziran
sh tests/compiler_lowered_verify.sh build/bin/ziran
env -u DISPLAY -u WAYLAND_DISPLAY make
make CHECK_FILTER=direct_assembly check
make CHECK_FILTER=compiler_lowered_verify check
sh tests/lowered_serial.sh build/bin/ziran
sh tests/lowered_exec.sh build/bin/ziran
sh tests/compiler_opt.sh build/bin/ziran
make CHECK_FILTER=lowered_exec check
sh tests/machine_elf.sh build/bin/ziran
sh tests/assembly_compare.sh build/bin/ziran
make check check-bootstrap JOBS=2 CHECK_JOBS=2
SH
make CHECK_FILTER=assembly_compare check
make check-bootstrap
```
These are local tests, not GitHub CI results. Benchmarks must run directly on
+5 -5
View File
@@ -1,6 +1,6 @@
# Ziran execution contract
Status: decisions required by [step 01](01-contract-and-completion-matrix.md). This document is normative for the lowered portable instructions of [step 02](02-lowered-ir-and-verifier.md). The implementation is the checked tree represented by [compiler IR](../cmd/compiler_ir.zi), its [lowering](../cmd/zi2zx/zir_asm_lower.c), the [portable instruction engine](../cmd/compiler_exec.zi) that runs every `.zx`, and their retained fixtures.
Status: decisions required by [step 01](01-contract-and-completion-matrix.md). This document is normative for the lowered portable instructions of [step 02](02-lowered-ir-and-verifier.md). The implementation is the checked tree represented by [compiler IR](../cmd/compiler_ir.zi), its [lowering](../cmd/compiler_zir_lower.zi), the [portable instruction engine](../cmd/compiler_exec.zi) that runs every `.zx`, and their retained fixtures.
The direct target follows the [gap policy](gap-policy.md): target selection is a
contract, and an unsupported operation fails rather than selecting another
@@ -19,7 +19,7 @@ The backend APIs remain distinct: verify portable program, describe target, buil
## Numeric and scalar semantics
Current fixed integer types are `s8`, `u8`, `s16`, `u16`, `s32`, `u32`, `s64`, and `u64`. Abstract `int`/`integer` arithmetic uses the 64-bit operation policy, while pointer-sized `isize` and `usize` are outside the portable executable subset. Bit representations, rather than host signed arithmetic, define operations; [scalar helpers](../cmd/zir/zir_scalar.h) mask to the declared width and reinterpret signed payloads.
Current fixed integer types are `s8`, `u8`, `s16`, `u16`, `s32`, `u32`, `s64`, and `u64`. Abstract `int`/`integer` and pointer-sized `isize`/`usize` arithmetic use the 64-bit signed/unsigned operation policy on the portable target (matching `size_of(isize) == size_of(usize) == 8`). Bit representations, rather than host signed arithmetic, define operations; [scalar helpers](../bootstrap/runtime/zir_scalar.h) mask to the declared width and reinterpret signed payloads.
- Addition, subtraction, multiplication, signed negation/overflow, and unsigned wraparound wrap at the operand width. Unsigned intermediates are used on all targets so C behavior is defined.
- Signed minimum divided by `-1` wraps to itself; its remainder is zero. Integer division or remainder by zero is a failed execution/trap, not undefined behavior.
@@ -54,11 +54,11 @@ The checked graph records move and borrow facts. Lowering must make each effect
- Indexed and pointer-backed member paths and paths rooted at a global remain rejected as move sources. Assignment over an owned direct or aggregate-held vector is rejected. A fresh vector expression statement drops immediately; a member/index access must first bind the fresh result.
- `BuilderFinish` consumes the builder. Native C transfers nonempty bytes and retains them for process lifetime; Go copies an immutable snapshot. Empty native storage may be released. `Text` is an owned record wrapping a vector and follows aggregate move/drop rules.
- Live vector slices and text views restrict mutation, resizing, moving, replacement, and calls whose checked effect summary writes their backing. Checks are field-sensitive where represented: sibling fields remain mutable. Raw foreign declarations have no checked read/write summary and remain the caller's responsibility.
- Scoped cleanup is a region in the instruction graph, not a source-text transformation in the backend. Returns, breaks, continues, traps, and parallel-region exits follow the same explicit cleanup edge set. The current source pass and tests are in [cleanup lowering](../cmd/zir/zir_cleanup.c) and [owned values](../docs/OWNED_VALUES.md).
- Scoped cleanup is a region in the instruction graph, not a source-text transformation in the backend. Returns, breaks, continues, traps, and parallel-region exits follow the same explicit cleanup edge set. The current source pass and tests are in [cleanup lowering](../cmd/compiler_ir_cleanup.zi) and [owned values](../docs/OWNED_VALUES.md).
## Calls, effects, concurrency, and fuel
Call arguments evaluate left to right on every target. Named/default binding occurs after argument evaluation. Call results feed directly into the consuming call or operation, but earlier values are read before later calls can mutate them. Compound assignment reads its destination before evaluating the right operand. These rules are fixed by [call order](../tests/call_order.sh) and [compound order](../tests/compound_order.sh).
Call arguments evaluate left to right on every target. Named/default binding occurs after argument evaluation. Call results feed directly into the consuming call or operation, but earlier values are read before later calls can mutate them. Compound assignment reads its destination before evaluating the right operand. These rules are fixed by [call order](../tests/call_order.sh) and [compound order](../tests/compound_order_cases.zi).
Every callable and foreign capability carries an explicit effect class: pure, observing, mutating, external/host, allocation, trap, parallel, or combinations accepted by the verifier. Effects drive reordering restrictions, borrow checks, fuel placement, host preflight, and optimization barriers. A pure operation can be controlled only if its result and trap behavior remain indistinguishable.
@@ -75,7 +75,7 @@ Runtime failures stop the current run and leave the instance marked failed: out-
Required host services are capability identities, not dynamic imports: module/function pairs with checked ABI and argument-read/effect metadata. A provider check must reject an unsupported program without running initializers, opening a window, or executing the entry. Missing bindings fail before entry. Validated native code is **not an operating-system sandbox**: malformed-input rejection and capability restrictions do not confine memory, syscalls, signals, or bugs in linked OS libraries. Untrusted execution still requires a process or comparable OS boundary.
There is no native ZX engine yet. Every `.zx` runs on the portable instruction engine, or on the WebAssembly tier where a provider is installed; a tier that cannot run a program fails instantiation and never starts another. The planned direct native backend must preserve the same failure and capability model.
A native ZX backend now exists: `ziran run`/`zi2zx run` execute verified ZX through the in-process native loader on linux-x86_64, linux-aarch64 and linux-armv7, and select the portable instruction engine explicitly elsewhere ([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c), [native_load.sh](../tests/native_load.sh)); the WebAssembly tier runs where a provider is installed. A tier that cannot run a program fails instantiation and never starts another; nothing falls back after a native gap. The loader preserves the same failure and capability model.
## Debug and release policy
+11 -11
View File
@@ -22,7 +22,7 @@ replace ZX or establish portability/performance completion.
|---|---|---|---|---|---|---|---|---|
| Generated C output | Working, source and saved IR | [implementation status](../docs/IMPLEMENTATION_STATUS.md), [C target](../tests/c99_target.sh) | emits C | n/a | n/a | lowers to same C backend | can compile selected C to wasm32 | Linux current host; Windows/macOS/Android toolchains have separate fixtures |
| Generated Go output | Working, secondary tier | [capabilities](../docs/CAPABILITIES.md), [call order](../tests/call_order.sh) | n/a | emits Go | n/a | n/a | n/a | Verifiable only where a compatible Go runtime/toolchain executes it |
| Portable instruction engine | Working; runs every `.zx` through `zi2zx run` | [ZX contract](../docs/ZX.md), [engine](../cmd/compiler_exec.zi) | n/a | n/a | runs every bundle | n/a | separate target | Host capabilities and platform console services only |
| Portable instruction engine | Working; runs every `.zx` through `zi2zx run`, natively by default on linux-x86_64, linux-aarch64 and linux-armv7 with `--backend engine` as the explicit portable selection | [ZX contract](../docs/ZX.md), [engine](../cmd/compiler_exec.zi), [loader](../bootstrap/runtime/zir_host_native.c), [native_load.sh](../tests/native_load.sh) | n/a | n/a | runs every bundle | in-process native loading on the three Linux rows | separate target | Host capabilities and platform console services only |
| Wasm execution tier | Working restricted subset; provider rejection is a hard `zx.wasm` error and never starts another engine | [Wasm tier](../docs/ZX.md) | emitter | n/a | explicit separate engine only | budget model shared | wasm32 | Scalars, owned strings, fixed arrays, records, typed `s64 -> s64` hosts; other constructs must fail direct-Wasm preflight |
## Portable language behavior
@@ -31,14 +31,14 @@ replace ZX or establish portability/performance completion.
|---|---|---|
| Fixed-width integers | Working on C, Go, ZX source/saved IR: declared-width wrap, signed-min division/remainder, shifts, casts, bitwise and mixed-width behavior. Wasm uses the same scalar tier inside its subset; unknown outside available Wasm fixtures. | [numeric semantics](../tests/numeric_semantics.sh), [width matrix](../tests/numeric_width_matrix.sh), [manifest](../tests/numeric_conformance.json) |
| Float32/float64 | Working arithmetic, compare, infinity/NaN and range-checked conversion on native C/Go/ZX. lowered IR must not preserve that gap. | [numeric manifest](../tests/numeric_conformance.json), [status](../docs/IMPLEMENTATION_STATUS.md) |
| Implicit widening | Working for the checked feature contract on C, Go, ZX. | [feature registry](../docs/FEATURES.json), [features test](../tests/features.sh) |
| Implicit widening | Working for the checked feature contract on C, Go, ZX. | [feature registry](../docs/FEATURES.json), [features test](../tests/compiler_inventory_cases.zi) |
| SIMD vectors | Working with identical lanes across native C tiers, Go lane loops, bundles and source/saved IR. C wasm32 may use SIMD128; bundles run vectors lane by lane. CPU feature selection is target-specific. | [status](../docs/IMPLEMENTATION_STATUS.md), [SIMD target](../tests/simd_target.sh) |
| Scalars, strings, enums, plain records | Working in portable subset, including literals, copies, fields, scalar compound assignment, parameters and returns. Pointer-sized `isize`/`usize` and functions/statements outside the verifier subset are rejected. | [ZX subset](../docs/ZX.md), [verifier](../cmd/compiler_lowered_verify.zi) |
| Scalars, strings, enums, plain records | Working in portable subset, including literals, copies, fields, scalar compound assignment, parameters and returns. Pointer-sized `isize`/`usize` lower as portable 64-bit signed/unsigned integers (matching `size_of` = 8); functions/statements outside the verifier subset are rejected. | [ZX subset](../docs/ZX.md), [verifier](../cmd/compiler_lowered_verify.zi), [size scalars](../tests/spec/zx_lowered_size_scalars.zi) |
| Fixed arrays, slices, vector indexing | Working with checked bounds. Generated C may omit only proven bounds checks; portable host slices copy successful mutations back and reject overlapping mutable arguments. | [proven ranges](../tests/proven_index_ranges.sh), [host slices](../tests/host_slices.sh) |
| Compile-time assertions, `#run`, laws | Working as checked language features on all advertised targets; unsupported proof/effect forms or exhausted budgets are rejected/unknown rather than guessed. | [feature registry](../docs/FEATURES.json), [compile run](../tests/compile_run.sh), [laws](../tests/laws.sh) |
| Procedure defaults and procedure values | Working for advertised examples on C, Go, ZX; portable verifier checks slot signatures and rejects C callback procedure types. | [feature registry](../docs/FEATURES.json), [defaults](../tests/default_arguments.sh) |
| Procedure defaults and procedure values | Working for advertised examples on C, Go, ZX; portable verifier checks slot signatures and rejects C callback procedure types. | [feature registry](../docs/FEATURES.json), [defaults](../tests/call_argument_cases.zi) |
| Print and I/O | Working literal-format print on C, Go, ZX. Rich OS I/O is a library/capability contract, not a portable opcode. | [feature registry](../docs/FEATURES.json), [print](../tests/print.sh) |
| Named imports and linking | Working; bundles follow direct calls, retain required startup/types/laws, and reject unresolved imports or unreachable unsupported code. | [ZX linker](../docs/ZX.md), [bundle verification](../tests/bundle_verification.sh) |
| Named imports and linking | Working; bundles follow direct calls, retain required startup/types/laws, and reject unresolved imports or unreachable unsupported code. | [ZX linker](../docs/ZX.md), [bundle provider cases](../tests/bundle_provider_cases.zi) |
## Memory, ownership, and cleanup
@@ -56,9 +56,9 @@ replace ZX or establish portability/performance completion.
| Feature | Current behavior | Evidence |
|---|---|---|
| Argument and compound order | Working: left-to-right call arguments; destination read before compound right side on C, Go, ZX. | [call order](../tests/call_order.sh), [compound order](../tests/compound_order.sh) |
| Argument and compound order | Working: left-to-right call arguments; destination read before compound right side on C, Go, ZX. | [call order](../tests/call_order.sh), [compound order](../tests/compound_order_cases.zi) |
| Bounded execution | Working by explicit host selection. The engine and Wasm count calls and loop iterations; cumulative limited open includes initialization and every run. | [ZX limits](../docs/ZX.md), [step limit](../tests/bundle_step_limit.sh) |
| CPU parallel regions | Current baseline: C threads on supported hosts; Go/ZX serial downgrade and reverse-region serialization are assembly-target Gaps. The direct target rejects them until their promised parallel implementation exists. | [parallel test](../tests/parallel.sh), [native parallel](../tests/zx_native_parallel.sh) |
| CPU parallel regions | Current baseline: C threads on supported hosts; Go/ZX serial downgrade and reverse-region serialization are assembly-target Gaps. The direct target rejects them until their promised parallel implementation exists. | [parallel test](../tests/parallel.sh), [native worker pool](../tests/spec/native_parallel_windows_test.zi) |
| GPU regions | Every target reports an explicit Gap and rejects GPU selection; there is no CPU fallback. | [capabilities](../docs/CAPABILITIES.md), [assembly blocks](../tests/assembly_blocks.sh) |
| Runtime traps | Working failure boundary: bounds, unreachable, host/fuel/stack and numeric contract failures stop the run. | [ZX contract](../docs/ZX.md), [engine](../cmd/compiler_exec.zi) |
| Host capabilities | Working checked module/function ABI with provider preflight, bindings, mutable slice copyback and no overlap. | [host capabilities](../tests/host_capability.sh), [ZX host ABI](../docs/ZX.md) |
@@ -68,10 +68,10 @@ replace ZX or establish portability/performance completion.
| Feature | Working behavior and restriction | Evidence |
|---|---|---|
| GNU assembly variants | Current C/Go behavior may use a checked portable body. For the direct assembly target, a missing matching target/feature implementation is a Gap and rejects at preflight; no portable body or cgo bridge satisfies the cell. | [assembly](../tests/assembly.sh), [ZX assembly](../tests/zx_native_asm.sh), [Go assembly](../tests/go_assembly.sh) |
| GNU assembly variants | Current C/Go behavior may use a checked portable body. For the direct assembly target, a missing matching target/feature implementation is a Gap and rejects at preflight; no portable body or cgo bridge satisfies the cell. | [assembly](../tests/assembly.sh), [ZX assembly](../tests/zx_native_asm.sh), [Go assembly](../tests/go_assembly_cases.zi) |
| C callbacks / `#c_call` | Native C ABI only; Go and ZX target preflight reject it before output. | [capabilities](../docs/CAPABILITIES.md), [compiler inventory](../tests/compiler_inventory_cases.zi) |
| Go foreign types/maps | Go target extension only; opaque identity and scalar-union checks reject unsupported portable lowering. Renaming does not create a portable layout. | [compiler IR](../cmd/compiler_ir.zi), [capabilities](../docs/CAPABILITIES.md) |
| OS libraries | Explicit foreign/library dependencies remain allowed; native platform service portability is defined per OS row, not by opcode presence. | [bundle libraries](../tests/bundle_libraries.sh), [architecture](../docs/ARCHITECTURE.md) |
| OS libraries | Explicit foreign/library dependencies remain allowed; native platform service portability is defined per OS row, not by opcode presence. | [executable bundles](../tests/executable_bundle_cases.zi), [architecture](../docs/ARCHITECTURE.md) |
| Runtime assembly/C cache | Current native bundle cache is keyed by bundle/libraries/CPU/compiler sources; cached code can bypass program recheck only under documented boundary. | [native execution](../docs/ZX.md) |
## Maintained platform rows
@@ -79,8 +79,8 @@ replace ZX or establish portability/performance completion.
| Platform / target row | Current verified surface | Target-specific restriction | Unknown verification |
|---|---|---|---|
| Linux x86-64, C, ZX and direct ELF | Current development host; source/saved-IR C, Go, ZX, direct `zx2native` ELF, threads, SIMD tiers, OS libraries and retained tests. | Native C parallel threads; SIMD ISA dispatch; Linux process/thread services. | A complete matrix needs fresh named toolchain/hardware evidence per future gate. |
| Linux/Android ARMv7 | Portable ZX and generated C/Go; C SIMD fixtures cover NEON, VFP-only and scalar lanes; Android API 21 streams and optional four-ABI link paths. | 32-bit ARM ABI/CPU feature restrictions; optional NDK/QEMU/phone tooling. | Specific Android OS version/device combinations and non-SIMD execution are not established by this documentation pass. |
| Linux/Android AArch64 | Portable ZX and generated C/Go; NEON codegen and QEMU execution documented. | AArch64 hardware-capability assembly selection; Android toolchain. | Fresh physical-platform coverage beyond documented fixtures is unknown. |
| Linux/Android ARMv7 | Portable ZX and generated C/Go; native in-process ZX loading and `zx2native` static ELFs on both rows; C SIMD fixtures cover NEON, VFP-only and scalar lanes; Android API 21 streams and optional four-ABI link paths. | 32-bit ARM ABI/CPU feature restrictions; optional NDK/QEMU/phone tooling. | Specific Android OS version/device combinations and non-SIMD execution are not established by this documentation pass. |
| Linux/Android AArch64 | Portable ZX and generated C/Go; native in-process ZX loading and `zx2native` static ELFs on Linux/Android rows; NEON codegen and QEMU execution documented. | AArch64 hardware-capability assembly selection; Android toolchain. | Fresh physical-platform coverage beyond documented fixtures is unknown. |
| Linux/Android other CPU | Portable ZX and generated C/Go are the supported route. | No direct native row. | New architecture execution, including RISC-V, is proposed/unknown. |
| Windows generated C/Go | Compiler/runtime platform code and Windows fixtures exist. | No direct native row. | No fresh Windows host execution in this documentation task. |
| Windows portable ZX | The engine has no Linux-only service assumptions. | No native tier. | Fresh Windows host evidence unknown. |
+238 -271
View File
@@ -1,330 +1,297 @@
# Target-neutral machine IR contract
Status: implemented for Linux x86-64 SysV as the verified pre-allocation
boundary for the current lowered-IR subset, deterministic
[register allocation](#register-allocation), a separate allocated-program
verifier, and a [direct x86-64 encoder](#machine-code-encoder) that turns a
verified allocated program into an in-memory code image with relocations.
`zx2native` selects this encoder for its only native executable path; a native
ZX loader remains unsupported, and broader milestone M2 goals remain open. The
implemented native call ABI is general-register only;
float and vector call arguments and results and stack-passed arguments are
[unsupported forms](#supported-call-forms) that fail with a stable diagnostic.
Status: implemented for Linux x86-64 SysV as the verified pre-allocation boundary for the
current lowered-IR subset, deterministic [register allocation](#register-allocation), a
separate allocated-program verifier, and a [direct x86-64 encoder](#machine-code-encoder)
that turns a verified allocated program into an in-memory code image with relocations.
`zx2native` selects this encoder for its native executable path, and the same pipeline compiles verified ZX for the in-process loader on linux-x86_64, linux-aarch64 and linux-armv7 ([`zir_host_native.c`](../bootstrap/runtime/zir_host_native.c), [native_load.sh](../tests/native_load.sh)). The implemented native call ABI is general-register only; float and
vector call arguments and results and stack-passed arguments are [unsupported
forms](#supported-call-forms) that fail with a stable diagnostic.
## Public boundary and ownership
The target surface is defined by `compiler_target.zi`:
- `TargetDescribe` describes supported architecture/OS combinations.
- `TargetValid` checks that a description is canonical rather than accepting a
caller-modified register or ABI model.
- `TargetMachineLoweringSupported` separately states whether the current machine
lowerer can execute that description. At present this is Linux x86-64 SysV only.
- `TargetValid` checks that a description is canonical rather than accepting a caller-modified
register or ABI model.
- `TargetMachineLoweringSupported` separately states whether the current machine lowerer can
execute that description. At present this is Linux x86-64 SysV only.
The owned machine-IR surface is defined by `compiler_machine_ir.zi`,
`compiler_machine_lower.zi`, `compiler_machine_verify.zi`, `compiler_abi.zi`,
`compiler_regalloc.zi`, `compiler_machine_verify_allocated.zi`, and
`compiler_x86_64.zi` (which reuses the byte encoders in `compiler_x86_bytes.zi`):
`compiler_regalloc.zi`, `compiler_machine_verify_allocated.zi`, and `compiler_x86_64.zi`
(which reuses the byte encoders in `compiler_x86_bytes.zi`):
- `MachineDefaultLimits` and `MachineDefaultOptions` provide bounded defaults.
- `MachineLower(owner, lir, target, options, limits)` verifies the input LIR,
copies its required metadata, lowers it, verifies the resulting machine IR,
and publishes the owner only after success.
- `MachineProgramView(owner)` returns a borrowed flat view while the owner is
valid. `MachineFree(owner)` is repeatable and invalidates all prior views.
- `MachineVerify(program, limits)` validates the target, table bounds, metadata,
register classes, operand constraints, flags lifetimes, calls, stack objects,
parallel copies, and relocations without repairing malformed input.
- `compiler_abi.zi` is the only module that names target registers. The
lowerer, allocator and verifiers ask it for argument and result registers,
call clobbers, the fixed registers of division and shifts
(`MachineAbiFixedRegister`), which call classes the native ABI implements
(`MachineAbiCallRegisterClass`) and which relocation addends a target can
hold (`MachineAbiRelocationAddend`). Its register enum is file-private.
- `RegAllocAllocate(owner, target, limits)` replaces a verified `Virtual`
program with a verified `Allocated` one ([register allocation](#register-allocation)).
- `MachineVerifyAllocated(program, limits)` checks an allocated program
independently of the allocator.
- `MachineX64Validate`, `MachineX64Measure` and `MachineX64Encode` verify and
encode an allocated program ([machine-code encoder](#machine-code-encoder)).
- `MachineLower(owner, lir, target, options, limits)` verifies the input LIR, copies its
required metadata, lowers it, verifies the resulting machine IR, and publishes the owner
only after success.
- `MachineProgramView(owner)` returns a borrowed flat view while the owner is valid.
`MachineFree(owner)` is repeatable and invalidates all prior views.
- `MachineVerify(program, limits)` validates the target, table bounds, metadata, register
classes, operand constraints, flags lifetimes, calls, stack objects, parallel copies, and
relocations without repairing malformed input.
- `compiler_abi.zi` is the only module that names target registers. The lowerer, allocator and
verifiers ask it for argument and result registers, call clobbers, the fixed registers of
division and shifts (`MachineAbiFixedRegister`), which call classes the native ABI
implements (`MachineAbiCallRegisterClass`) and which relocation addends a target can hold
(`MachineAbiRelocationAddend`). Its register enum is file-private.
- `RegAllocAllocate(owner, target, limits)` replaces a verified `Virtual` program with a
verified `Allocated` one ([register allocation](#register-allocation)).
- `MachineVerifyAllocated(program, limits)` checks an allocated program independently of the
allocator.
- `MachineX64Validate`, `MachineX64Measure` and `MachineX64Encode` verify and encode an
allocated program ([machine-code encoder](#machine-code-encoder)).
Schema version 2 adds the allocation stage. `MachineProgram.stage` is
`Virtual` after lowering and `Allocated` after `RegAllocAllocate`; every operand
carries the SSA `value` it reads or writes (or none), stack objects carry a
frame `offset` and the `value` they hold, and allocated programs add one
`MachineFrame` per function, explicit `Spill`/`Reload` opcodes with a
`MachineSpill` record each, and the per-bank scratch registers.
Schema version 2 adds the allocation stage. `MachineProgram.stage` is `Virtual` after
lowering and `Allocated` after `RegAllocAllocate`; every operand carries the SSA `value` it
reads or writes (or none), stack objects carry a frame `offset` and the `value` they hold,
and allocated programs add one `MachineFrame` per function, explicit `Spill`/`Reload`
opcodes with a `MachineSpill` record each, and the per-bank scratch registers.
`MachineOwner` owns every published table. Source names and function names are
copied into its byte table and referenced by offsets; source origins, type shape,
aggregate members, function signatures, globals, CFG records, operands, calls,
copies, stack objects, and relocations do not borrow LIR storage. Lowering the
same valid input and target produces the same table order and contents.
`MachineOwner` owns every published table. Source names and function names are copied into
its byte table and referenced by offsets; source origins, type shape, aggregate members,
function signatures, globals, CFG records, operands, calls, copies, stack objects, and
relocations do not borrow LIR storage. Lowering the same valid input and target produces the
same table order and contents.
## Representation
`MachineProgram` is a deterministic collection of flat, index-addressed tables.
Functions own contiguous block, virtual-register, and stack-object ranges.
Blocks own contiguous instruction ranges. Instructions own contiguous operand
and edge ranges. Edges reference contiguous simultaneous-copy ranges. Aggregate
member and function-parameter type IDs share the owned `type_ids` table.
`MachineProgram` is a deterministic collection of flat, index-addressed tables. Functions
own contiguous block, virtual-register, and stack-object ranges. Blocks own contiguous
instruction ranges. Instructions own contiguous operand and edge ranges. Edges reference
contiguous simultaneous-copy ranges. Aggregate member and function-parameter type IDs share
the owned `type_ids` table.
Operands distinguish virtual and physical registers, immediates, blocks,
functions, stack objects, and globals. Each operand records its use/define role,
register class, optional fixed register, and optional tie to another operand.
Condition results use an explicit flags virtual: `Compare` defines it and the
adjacent `SetCondition` consumes it. Calls carry fixed argument/result
constraints plus general, float, and vector clobber masks. A `Fuel` check is
explicit before liveness: its first operand is the amount, its second names the
instance fuel counter through a `FuelCounter` relocation, and it defines (so
clobbers) a fresh flags virtual. Relocations identify
the exact instruction operand and symbol rather than hiding symbol references in
an encoder-specific payload.
Operands distinguish virtual and physical registers, immediates, blocks, functions, stack
objects, and globals. Each operand records its use/define role, register class, optional
fixed register, and optional tie to another operand. Condition results use an explicit flags
virtual: `Compare` defines it and the adjacent `SetCondition` consumes it. Calls carry fixed
argument/result constraints plus general, float, and vector clobber masks. A `Fuel` check is
explicit before liveness: its first operand is the amount, its second names the instance
fuel counter through a `FuelCounter` relocation, and it defines (so clobbers) a fresh flags
virtual. Relocations identify the exact instruction operand and symbol rather than hiding
symbol references in an encoder-specific payload.
The current lowerer covers the verified LIR operations represented by the
machine opcode enum: scalar integer and float operations, comparisons and
conversions, aggregate pseudos, checked-memory/address pseudos, direct and
indirect calls, CFG transfers, returns, fuel, traps, and unreachable control.
These are pre-allocation pseudos; their presence does not claim that a complete
native encoder can execute every lowered program.
The current lowerer covers the verified LIR operations represented by the machine opcode
enum: scalar integer and float operations, comparisons and conversions, aggregate pseudos,
checked-memory/address pseudos, direct and indirect calls, CFG transfers, returns, fuel,
traps, and unreachable control. These are pre-allocation pseudos; their presence does not
claim that a complete native encoder can execute every lowered program.
`Allocate` remains an explicit effectful machine pseudo. Every dynamic execution
must produce fresh storage whose lifetime lasts until that allocating frame
exits, including repeated visits to one instruction in a loop or recursive
activation. It therefore is not represented as `StackAddress` plus one static
stack object per instruction site. Allocation and encoding must preserve the
pseudo until they implement that exact dynamic frame-storage behavior.
`Allocate` remains an explicit effectful machine pseudo. Every dynamic execution must
produce fresh storage whose lifetime lasts until that allocating frame exits, including
repeated visits to one instruction in a loop or recursive activation. It therefore is not
represented as `StackAddress` plus one static stack object per instruction site. Allocation
and encoding must preserve the pseudo until they implement that exact dynamic frame-storage
behavior.
Aggregate values are stack-class virtuals whose frame objects follow the plan
of `compiler_machine_aggregate.zi`, the native counterpart of zx2wasm's
aggregate slots. Values whose lifetimes never overlap share one object, so an
`AggregateInsert` whose destination is its source's object changes only its
member, and a block parameter that shares its arguments' object needs no edge
copy. On x86-64 an extract read only by extracts in its own block is a view:
`StackAddress` and `FieldAddress` or `ElementAddress` compute its address once,
shared with an earlier view of the same storage and member that dominates it,
and `AggregateExtract`/`AggregateInsert` forms whose aggregate operand is that
pointer register read and change its members in place. A changed view put back
where it came from emits nothing. A dynamic member's trailing immediate, like
the optional fourth `ElementAddress` operand, is the bound the shared LIR facts
prove its index below, or 0; a proven index is not checked.
Aggregate values are stack-class virtuals whose frame objects follow the plan of
`compiler_machine_aggregate.zi`, the native counterpart of zx2wasm's aggregate slots. Values
whose lifetimes never overlap share one object, so an `AggregateInsert` whose destination is
its source's object changes only its member, and a block parameter that shares its
arguments' object needs no edge copy. On x86-64 an extract read only by extracts in its own
block is a view: `StackAddress` and `FieldAddress` or `ElementAddress` compute its address
once, shared with an earlier view of the same storage and member that dominates it, and
`AggregateExtract`/`AggregateInsert` forms whose aggregate operand is that pointer register
read and change its members in place. A changed view put back where it came from emits
nothing. A dynamic member's trailing immediate, like the optional fourth `ElementAddress`
operand, is the bound the shared LIR facts prove its index below, or 0; a proven index is
not checked.
## Linux x86-64 ABI facts
Register numbers follow x86-64 encoding order. General-register argument
constraints are RDI, RSI, RDX, RCX, R8, and R9; float arguments use XMM0 through
XMM7 independently. General results use RAX and float results use XMM0. Calls
record the SysV caller-clobbered general registers and all sixteen XMM registers.
Division fixes the dividend and result to RAX and clobbers RDX; shift counts
use RCX. The lowerer obtains all of these from `compiler_abi.zi` queries for the
described target rather than naming x86-64 registers itself.
Register numbers follow x86-64 encoding order. General-register argument constraints are
RDI, RSI, RDX, RCX, R8, and R9; float arguments use XMM0 through XMM7 independently. General
results use RAX and float results use XMM0. Calls record the SysV caller-clobbered general
registers and all sixteen XMM registers. Division fixes the dividend and result to RAX and
clobbers RDX; shift counts use RCX. The lowerer obtains all of these from `compiler_abi.zi`
queries for the described target rather than naming x86-64 registers itself.
The general allocatable mask is `0xffcf`; bits 4 and 5 are excluded by the
`0x30` reserved mask, so RSP and RBP can never be assigned as ordinary virtual
register locations. Float and vector registers are separate logical classes but
share the same physical XMM bank (`float_vector_overlap = true`). Allocation
must therefore treat a live float and vector assignment to the same physical
number as interference.
The general allocatable mask is `0xffcf`; bits 4 and 5 are excluded by the `0x30` reserved
mask, so RSP and RBP can never be assigned as ordinary virtual register locations. Float and
vector registers are separate logical classes but share the same physical XMM bank
(`float_vector_overlap = true`). Allocation must therefore treat a live float and vector
assignment to the same physical number as interference.
Aggregate sizes use Ziran's packed internal layout. Aggregate arguments/results
are represented through stack objects and are deliberately distinct from the
external System V aggregate classification rules. C, System, and Host calling
forms, including external aggregate ABI, varargs, and callbacks, are rejected
explicitly; they are not silently treated as internal calls.
Aggregate sizes use Ziran's packed internal layout. Aggregate arguments/results are
represented through stack objects and are deliberately distinct from the external System V
aggregate classification rules. C, System, and Host calling forms, including external
aggregate ABI, varargs, and callbacks, are rejected explicitly; they are not silently
treated as internal calls.
### Supported call forms
Machine IR describes the whole internal call shape: float arguments carry
their XMM constraints, a seventh integer or any aggregate argument is counted
in `stack_argument_bytes`, and allocation lays out the outgoing area. The
implemented native call ABI is narrower. A call may pass at most six
arguments, each a general-class value in its ABI register in order, and may
return nothing or a general-class value in RAX. `MachineVerifyAllocated`
rejects every other call with `Unsupported` at the first offending argument or
result operand, or at the call when it reserves stack argument bytes: float
and vector arguments and results, aggregate arguments, arguments beyond the
sixth, and any outgoing stack bytes. The check runs before an encoder starts,
so no unsupported call reaches encoding or another engine. Incoming stack
parameters of a function that is not called natively remain representable
and are verified against the parameter order. The full SysV argument/result
classification, including float and stack passing, is later work; it is not
partially implemented.
Machine IR describes the whole internal call shape: float arguments carry their XMM
constraints, a seventh integer or any aggregate argument is counted in
`stack_argument_bytes`, and allocation lays out the outgoing area. The implemented native
call ABI is narrower. A call may pass at most six arguments, each a general-class value in
its ABI register in order, and may return nothing or a general-class value in RAX.
`MachineVerifyAllocated` rejects every other call with `Unsupported` at the first offending
argument or result operand, or at the call when it reserves stack argument bytes: float and
vector arguments and results, aggregate arguments, arguments beyond the sixth, and any
outgoing stack bytes. The check runs before an encoder starts, so no unsupported call
reaches encoding or another engine. Incoming stack parameters of a function that is not
called natively remain representable and are verified against the parameter order. The full
SysV argument/result classification, including float and stack passing, is later work,
tracked in `plans/open-work.md`; it is not partially implemented.
## Described targets versus executable targets
Canonical descriptions exist for maintained x86-64, ARMv7, AArch64, and wasm32
OS combinations so later allocation and backend work shares one target model.
A valid description is not an implementation claim. Linux and Android x86-64,
AArch64 and ARMv7 lower, allocate and encode; wasm32, Windows, macOS and WASI
fail machine lowering with `UnsupportedTarget`.
Canonical descriptions exist for maintained x86-64, ARMv7, AArch64, and wasm32 OS
combinations so later allocation and backend work shares one target model. A valid
description is not an implementation claim. Linux and Android x86-64, AArch64 and ARMv7
lower, allocate and encode; wasm32, Windows, macOS and WASI fail machine lowering with
`UnsupportedTarget`.
## Register allocation
`RegAllocAllocate(owner, target, limits)` in `compiler_regalloc.zi` takes the
owner's verified `Virtual` program and, on success, replaces it with a verified
`Allocated` program. The allocation is built in a separate owner and verified
with `MachineVerifyAllocated` there; only then are the two owners' tables
exchanged with `VecSwap`, which moves storage without allocating, so no step
after the owner starts changing can fail. On any failure, including one the
allocated verifier finds in the built program, the owner keeps its original
program and the `MachineDiagnostic` names the input function, block,
instruction, operand and virtual: an allocated instruction maps back to the
input instruction it rewrote, with operands at the same positions, and a
transfer the allocator inserted reports only its function and virtual. Each
function is processed in a fixed order:
`RegAllocAllocate(owner, target, limits)` in `compiler_regalloc.zi` takes the owner's
verified `Virtual` program and, on success, replaces it with a verified `Allocated` program.
The allocation is built in a separate owner and verified with `MachineVerifyAllocated`
there; only then are the two owners' tables exchanged with `VecSwap`, which moves storage
without allocating, so no step after the owner starts changing can fail. On any failure,
including one the allocated verifier finds in the built program, the owner keeps its
original program and the `MachineDiagnostic` names the input function, block, instruction,
operand and virtual: an allocated instruction maps back to the input instruction it rewrote,
with operands at the same positions, and a transfer the allocator inserted reports only its
function and virtual. Each function is processed in a fixed order:
1. `MachineVerify` and `MachineVerifyFuel` run first. Every control-flow cycle
must pass a fuel check, and every function a direct call or a taken address
can reach must charge fuel in its entry block before any call. A missing or
malformed check fails with `Fuel`.
2. Constraints become explicit transfers. A fixed input is moved into its
register just before the instruction, a fixed result out of it just after,
a register parameter out of its incoming register at entry, and a tied input
without a fixed register is copied into a short interval that the result
must reuse. Division keeps the dividend and quotient in RAX and RDX clobbered
across the instruction, shift counts use RCX, and call arguments and results
use their ABI registers.
3. Block liveness is solved over the item order, then each SSA virtual gets
one hull interval with its use positions. Block parameters are defined at
the block start; edge-copy sources are used at the predecessor terminator.
4. Linear scan runs per register bank (general; float and vector share the XMM
bank on x86-64) inside the target's allocatable masks minus one scratch
register per bank (R11 and XMM15). Fixed operands, early clobbers and call
clobbers block registers. An interval is split where its register becomes
blocked; under pressure the value with the farthest next required use goes
to memory until that use. Values live across a call take callee-saved
registers (RBX, R12–R15) or are spilled with reason `Call`.
5. Split boundaries, fixed transfers, block-parameter copies and edge location
fixes become `Move`, `Spill` and `Reload` instructions. Each edge's copies
are one parallel copy, sequentialized with cycles broken through the scratch
register or a frame `Temporary`; a branch edge that needs moves gets its own
block (`lir_block` is -1). Allocator transfers preserve flags, so they may
sit between a compare and its consumer. A transfer with equal source and
destination register renames a value and encodes no bytes.
6. The frame pointer is pushed on entry. Callee-saved registers the function
writes get `CalleeSave` homes; values, spills and temporaries sit at aligned
negative frame-pointer offsets; outgoing stack arguments occupy the 16-byte
aligned bottom of the frame; incoming stack arguments start 16 bytes above
the frame pointer in parameter order. The frame size is a multiple of 16.
1. `MachineVerify` and `MachineVerifyFuel` run first. Every control-flow cycle must pass a
fuel check, and every function a direct call or a taken address can reach must charge fuel
in its entry block before any call. A missing or malformed check fails with `Fuel`.
2. Constraints become explicit transfers. A fixed input is moved into its register just
before the instruction, a fixed result out of it just after, a register parameter out of its
incoming register at entry, and a tied input without a fixed register is copied into a short
interval that the result must reuse. Division keeps the dividend and quotient in RAX and RDX
clobbered across the instruction, shift counts use RCX, and call arguments and results use
their ABI registers.
3. Block liveness is solved over the item order, then each SSA virtual gets one hull
interval with its use positions. Block parameters are defined at the block start; edge-copy
sources are used at the predecessor terminator.
4. Linear scan runs per register bank (general; float and vector share the XMM bank on
x86-64) inside the target's allocatable masks minus one scratch register per bank (R11 and
XMM15). Fixed operands, early clobbers and call clobbers block registers. An interval is
split where its register becomes blocked; under pressure the value with the farthest next
required use goes to memory until that use. Values live across a call take callee-saved
registers (RBX, R12–R15) or are spilled with reason `Call`.
5. Split boundaries, fixed transfers, block-parameter copies and edge location fixes become
`Move`, `Spill` and `Reload` instructions. Each edge's copies are one parallel copy,
sequentialized with cycles broken through the scratch register or a frame `Temporary`; a
branch edge that needs moves gets its own block (`lir_block` is -1). Allocator transfers
preserve flags, so they may sit between a compare and its consumer. A transfer with equal
source and destination register renames a value and encodes no bytes.
6. The frame pointer is pushed on entry. Callee-saved registers the function writes get
`CalleeSave` homes; values, spills and temporaries sit at aligned negative frame-pointer
offsets; outgoing stack arguments occupy the 16-byte aligned bottom of the frame; incoming
stack arguments start 16 bytes above the frame pointer in parameter order. The frame size is
a multiple of 16.
Every `Spill` and `Reload` has a `MachineSpill` record with its value, slot,
register, reason (`Pressure`, `Call`, `Fixed`, `Parameter` or `Cycle`) and
nearest source origin. Flags-class operands or copies, a virtual read-modify-write
operand, conflicting fixed registers, broken ties, call clobber masks that keep
caller-saved registers or clobber reserved ones, non-internal calling forms,
unsupported targets and exceeded limits fail explicitly. Nothing is routed to
another engine.
Every `Spill` and `Reload` has a `MachineSpill` record with its value, slot, register,
reason (`Pressure`, `Call`, `Fixed`, `Parameter` or `Cycle`) and nearest source origin.
Flags-class operands or copies, a virtual read-modify-write operand, conflicting fixed
registers, broken ties, call clobber masks that keep caller-saved registers or clobber
reserved ones, non-internal calling forms, unsupported targets and exceeded limits fail
explicitly. Nothing is routed to another engine.
`MachineVerifyAllocated(program, limits)` in `compiler_machine_verify_allocated.zi`
is independent of the allocator. It rejects virtual operands, unresolved edge
copies, registers outside the bank masks (scratch registers only in transfers),
fixed-register mismatches, broken ties, malformed transfers, bad relocations,
relocation addends the target cannot hold (a direct call, function address or
fuel counter carries none; a global address carries a signed 32-bit addend),
[unsupported call forms](#supported-call-forms), spill records that disagree
with their instruction, misplaced fuel checks and frame layouts that are
misaligned, overlapping, missing callee-saved homes or whose incoming stack
arguments disagree with the parameter order. A forward dataflow over
registers, flags and stack objects then proves that every use finds its
value: a wrong value is `Interference`, a value lost to a call or clobber is
`Clobber`, a missing one is `Undefined`, and a parallel copy that reads a
source it already overwrote is `Copy`.
`MachineVerifyAllocated(program, limits)` in `compiler_machine_verify_allocated.zi` is
independent of the allocator. It rejects virtual operands, unresolved edge copies, registers
outside the bank masks (scratch registers only in transfers), fixed-register mismatches,
broken ties, malformed transfers, bad relocations, relocation addends the target cannot hold
(a direct call, function address or fuel counter carries none; a global address carries a
signed 32-bit addend), [unsupported call forms](#supported-call-forms), spill records that
disagree with their instruction, misplaced fuel checks and frame layouts that are
misaligned, overlapping, missing callee-saved homes or whose incoming stack arguments
disagree with the parameter order. A forward dataflow over registers, flags and stack
objects then proves that every use finds its value: a wrong value is `Interference`, a value
lost to a call or clobber is `Clobber`, a missing one is `Undefined`, and a parallel copy
that reads a source it already overwrote is `Copy`.
## Machine-code encoder
`compiler_x86_64.zi` encodes a program that passes `MachineVerifyAllocated`
for Linux x86-64 SysV into an in-memory image: code bytes, function, block and
instruction offsets, and PC-relative 32-bit relocations for global addresses,
the fuel counter and the trap handler. Direct calls and function addresses
inside the image are resolved by the encoder. A measuring pass and an exactly
sized writing pass must agree on every offset. `MachineX64Encode` publishes
the image only after verification, form checks and measuring succeed; any
diagnostic leaves the output owner unchanged. Every instruction form the
`compiler_x86_64.zi` encodes a program that passes `MachineVerifyAllocated` for Linux x86-64
SysV into an in-memory image: code bytes, function, block and instruction offsets, and
PC-relative 32-bit relocations for global addresses, the fuel counter and the trap handler.
Direct calls and function addresses inside the image are resolved by the encoder. A
measuring pass and an exactly sized writing pass must agree on every offset.
`MachineX64Encode` publishes the image only after verification, form checks and measuring
succeed; any diagnostic leaves the output owner unchanged. Every instruction form the
encoder does not implement is a hard diagnostic, never another engine.
Still required: the full SysV call ABI, external ABI classification, relocatable
objects/linking, unwind/debug information, native ZX loading, the remaining
target matrix, and physical-Alpha performance validation.
### ARMv7 (A32)
`compiler_armv7.zi` encodes for armv7a Linux and Android. LIR is
target-neutral: pointers and function values are 8-byte slots and `s64` is
the common integer, while the pipeline keeps one physical register per
virtual. ARMv7 therefore describes its general bank as register pairs, so
allocation, verification and lowering stay as they are:
`compiler_armv7.zi` encodes for armv7a Linux and Android. LIR is target-neutral: pointers
and function values are 8-byte slots and `s64` is the common integer, while the pipeline
keeps one physical register per virtual. ARMv7 therefore describes its general bank as
register pairs, so allocation, verification and lowering stay as they are:
- Pair n is (r2n, r2n+1) for n = 0..4; pair 5 is (r12, lr), the bank scratch,
so r12 and lr are free inside any instruction and lr is saved by every
prologue. r10 is the encoder's temporary and the base it rebases a frame
slot beyond A32's 4 KiB reach into; r11 is the frame pointer. Calls clobber
pairs 0, 1 and 5; pairs 2-4 (r4-r9) are callee-saved.
- A value of 32 bits or less lives in the even register, a 64-bit value in
both, low word first. Raw machine addresses are 32-bit. Floats are d0-d15
(VFPv3-D16), f32 in s(2n); d0-d7 are caller-saved, d7 the float scratch.
- Between generated functions: general arguments in pairs 0 and 1, floats in
d0-d5, the rest on the stack in 8-byte slots; results in pair 0 or d0; the
record-result address in r10. Indirect calls BLX pair 4. The entry widens a
narrower result into r1 for its C caller. Generated code reaches C only
through the loader's veneers, so softfp never meets it.
- 64-bit arithmetic is pair sequences. 64-bit divide and remainder and
int64/float conversions call loader helpers through a `RuntimeHelper`
relocation (symbol = `MachineHelper`), operands and result at sp; the
helper and resize veneers keep every register but lr. Addresses are
MOVW/MOVT relocation halves (addend 0 and 2); calls and veneers are BL.
- A dynamic element's address goes in lr (the address scratch), leaving r10
for the instruction's other frame operand, and the frame layout puts the
pointer runtime's arena mark and chain beside the callee saves, so those
sequences never rebase.
- Copies and zeroing of 64 bytes or more run a word loop (r10 and lr walk
the two sides, r0 counts and is kept at sp meanwhile), as AArch64 runs a
16-byte q31 loop and x86-64 an xmm15 loop, so code size does not grow
with record size.
- Pair n is (r2n, r2n+1) for n = 0..4; pair 5 is (r12, lr), the bank scratch, so r12 and lr
are free inside any instruction and lr is saved by every prologue. r10 is the encoder's
temporary and the base it rebases a frame slot beyond A32's 4 KiB reach into; r11 is the
frame pointer. Calls clobber pairs 0, 1 and 5; pairs 2-4 (r4-r9) are callee-saved.
- A value of 32 bits or less lives in the even register, a 64-bit value in both, low word
first. Raw machine addresses are 32-bit. Floats are d0-d15 (VFPv3-D16), f32 in s(2n); d0-d7
are caller-saved, d7 the float scratch.
- Between generated functions: general arguments in pairs 0 and 1, floats in d0-d5, the rest
on the stack in 8-byte slots; results in pair 0 or d0; the record-result address in r10.
Indirect calls BLX pair 4. The entry widens a narrower result into r1 for its C caller.
Generated code reaches C only through the loader's veneers, so softfp never meets it.
- 64-bit arithmetic is pair sequences. 64-bit divide and remainder and int64/float conversions
call loader helpers through a `RuntimeHelper` relocation (symbol = `MachineHelper`),
operands and result at sp; the helper and resize veneers keep every register but lr.
Addresses are MOVW/MOVT relocation halves (addend 0 and 2); calls and veneers are BL.
- A dynamic element's address goes in lr (the address scratch), leaving r10 for the
instruction's other frame operand, and the frame layout puts the pointer runtime's arena
mark and chain beside the callee saves, so those sequences never rebase.
- Copies and zeroing of 64 bytes or more run a word loop (r10 and lr walk the two sides, r0
counts and is kept at sp meanwhile), as AArch64 runs a 16-byte q31 loop and x86-64 an xmm15
loop, so code size does not grow with record size.
## Direct native code versus generated-code exporters
Direct native code means that Ziran's own encoders write machine code from
verified IR, with no generated C, external assembler, C compiler or system
linker. `zx2native` uses the machine-IR path: it lowers verified ZX through
the machine pipeline, writes the resulting Linux x86-64 image as an ELF
executable, and never reroutes unsupported forms to another engine. Source and
saved `.zir` first go through optimized ZX serialization and verification.
In-memory native ZX loading and runtime cutover remain milestone M3.
Direct native code means that Ziran's own encoders write machine code from verified IR, with
no generated C, external assembler, C compiler or system linker. `zx2native` uses the
machine-IR path: it lowers verified ZX through the machine pipeline, writes the resulting
Linux x86-64 image as an ELF executable, and never reroutes unsupported forms to another
engine. Source and saved `.zir` first go through optimized ZX serialization and
verification. In-memory native ZX loading has run through this pipeline since
milestone M3 (landed 2026-11-15) on the Linux rows; the full registry cutover
per [step 07](07-architecture-and-platform-coverage.md) stays open.
The C target (generated C compiled by a C toolchain) and the Go target
(generated Go built by the Go toolchain) also produce runnable binaries, but
they are separate exporters with their own toolchains and test rows. They are
never a fallback for direct native code: a form the native path does not
implement fails with its diagnostic and is not rerouted to C, Go, the portable
engine or any other backend, as the [gap policy](gap-policy.md) requires. The
focused tests below run their fixtures with `--target=c` only as the test
harness; what they check is the direct native pipeline.
The C target (generated C compiled by a C toolchain) and the Go target (generated Go built
by the Go toolchain) also produce runnable binaries, but they are separate exporters with
their own toolchains and test rows. They are never a fallback for direct native code: a form
the native path does not implement fails with its diagnostic and is not rerouted to C, Go,
the portable engine or any other backend, as the [gap policy](gap-policy.md) requires. The
focused tests below run their fixtures with `--target=c` only as the test harness; what they
check is the direct native pipeline.
## Focused local test
```sh
env -u DISPLAY -u WAYLAND_DISPLAY HARMONY_DESKTOP_RECOVERY=0 \
build-queue -- sh tests/machine_ir.sh build/bin/ziran
build-queue -- make CHECK_FILTER=machine_ir check
env -u DISPLAY -u WAYLAND_DISPLAY HARMONY_DESKTOP_RECOVERY=0 \
build-queue -- sh tests/regalloc.sh build/bin/ziran
build-queue -- make CHECK_FILTER=x86_encoder check
env -u DISPLAY -u WAYLAND_DISPLAY HARMONY_DESKTOP_RECOVERY=0 \
build-queue -- make CHECK_FILTER=regalloc check
```
The machine-IR fixture checks target descriptions, real LIR lowering, ABI
constraints, owned metadata, deterministic output, dynamic-allocation
representation, explicit unsupported targets/calling forms, bounded limits,
malformed MIR rejection and repeatable cleanup, then runs the encoder fixture,
which checks exact bytes, frames, relocations, fuel, traps, hard pre-encoding
call/addend rejection and output preservation. The allocation fixture lowers
real LIR and checks register pressure, call splitting, spills and reloads,
division and shift registers, flags, register, memory and aggregate copy
cycles, float and vector banks, frame and incoming stack-argument layout
(including out-of-order incoming homes), fuel placement, deterministic
output, explicit unsupported forms, and rejection of malformed allocated
programs at the faulting location. Its late-failure fixtures allocate
successfully and are then rejected by the allocated verifier (a float call
argument, a float call result, an aggregate stack call argument and a direct
call relocation with an addend); each checks the input-location diagnostic and
that the owner still holds its unchanged `Virtual` program, and the addend
fixture allocates the same owner once the input is valid. Float call arguments
and results, stack call arguments and global-address addends outside 32 bits
fail in `MachineVerifyAllocated` before any encoder pass runs.
The machine-IR fixture checks target descriptions, real LIR lowering, ABI constraints, owned
metadata, deterministic output, dynamic-allocation representation, explicit unsupported
targets/calling forms, bounded limits, malformed MIR rejection and repeatable cleanup. The
x86 encoder fixture checks exact bytes, frames, relocations, fuel, traps, pre-encoding
call/addend rejection and output preservation. The allocation fixture lowers real LIR and
checks register pressure, call splitting, spills and reloads, division and shift registers,
flags, register, memory and aggregate copy cycles, float and vector banks, frame and
incoming stack-argument layout (including out-of-order incoming homes), fuel placement,
deterministic output, explicit unsupported forms, and rejection of malformed allocated
programs at the faulting location. Its late-failure fixtures allocate successfully and are
then rejected by the allocated verifier (a float call argument, a float call result, an
aggregate stack call argument and a direct call relocation with an addend); each checks the
input-location diagnostic and that the owner still holds its unchanged `Virtual` program,
and the addend fixture allocates the same owner once the input is valid. Float call
arguments and results, stack call arguments and global-address addends outside 32 bits fail
in `MachineVerifyAllocated` before any encoder pass runs.
+68 -2
View File
@@ -56,7 +56,7 @@ What needed to change:
extensions unless the step-01 matrix names them as maintained rows.
Recorded decision: the checked-IR-to-LIR adapter stays in C
([`zir_asm_lower.c`](../cmd/zi2zx/zir_asm_lower.c)) because the checker's
([`compiler_zir_lower.zi`](../cmd/compiler_zir_lower.zi)) because the checker's
program records are C structures. Everything after LIR (verifier, codec,
engine, optimizer, machine IR, encoders, container, linker) stays in Ziran.
Step 03's proposed `compiler_lower*.zi` modules apply only if the checker
@@ -113,6 +113,10 @@ debug attachment (`zi2zx --debug`) gives native maps and native trap
diagnostics source lines. Wasm lowers the same verified ZX, both for
`zx2wasm` and for the bundle Wasm tier.
Every Linux x86-64 AOT image carries `.eh_frame` with `PT_GNU_EH_FRAME`, and
`zx2native --emit perf-map` publishes a bounded profiler map (M6a,
2026-11-24).
There is one ZX format. Every `.zx` is revision 28; the semantic bundle writer
and reader, the portable VM with `run --vm`, `BundleUsePortableVm`,
`BundleInstantiatePortable`, `libziran-vm.a`, bundle libraries, TinyCC and the
@@ -182,4 +186,66 @@ readonly data, the no-libc Linux x86-64 console veneer and validated typed
host values with instance-owned returned bytes, released once nothing the
program can reach names them. Resizable collection ownership, reentrant
callbacks and general native string/arbitrary-host instructions remain
explicit gaps. Open work from M4 on is in `plans/2026-11-15-assembly-remaining.md`.
explicit gaps. Open work from M4 on is in `plans/open-work.md`.
## Review of M5 and M6 (2026-11-24)
The first review's diagnosis still holds, and M5 is the milestone where it
repeats. M5's exit gate, "Step 07/08 rows with real launches", bundles four
kinds of work whose evidence is not available in the same place:
- ELF static archives and the C ABI for the Linux row are testable in this
checkout; the archive slice landed on 2026-11-24 and `tests/machine_elf.sh`
links, runs and rejects them.
- A real Windows launch is not available here. Wine parity is evidence that
the PE32+ encoding, Win64 ABI, imports and unwind records are right, but it
is emulation and cannot close a native row under the gap policy. The matrix
needs an explicit emulated state: Wine results stay recorded as emulated,
not as a Windows host result.
- Mach-O objects, Apple64 and signing need an Apple host and credentials.
They should stay a named Gap in the target registry until such a host and a
signing identity exist; implementing the container speculatively cannot
produce the required real launch.
- The in-process loader is per row. Linux x86-64, AArch64 and ARMv7 load
native ZX today; Windows and macOS loaders belong to their host slices, not
to a shared "archives" item.
Order the remaining work by the evidence each item can actually produce here:
1. **M5a** Linux ELF: shared objects (done) and static archives (done). Keep
each new C ABI shape and each archive subset behind `machine_elf.sh` plus a
named gap for everything else.
2. **M6a** inspection closure for the Implemented rows landed on 2026-11-24
(`bfdf3289`): every Linux x86-64 ELF carries `.eh_frame` with
`PT_GNU_EH_FRAME` and one CIE/FDE per generated function extent, and
`zx2native --emit perf-map` writes a bounded perf map. The debug
attachment predates it. `tests/machine_elf.sh` and
`tests/assembly_cases.zi` retain the checks; the other targets' unwind
rows and full source-to-byte attribution stay open.
3. **M5b** a real Windows host run, on hardware or a dedicated CI Windows
runner: the same `tests/zx_windows_parity_cases.zi`, with its current Wine
rows kept as the emulated control. Until then the row stays open.
4. **Native speed** next, because it is the owner-visible deficit and the
receipts exist. Landed: Vec growth reuses storage when nothing borrows it
(Alpha receipt `bench/results/native-resize-alpha-matched.json`, Vectors
checksum 94905000), unique-use Insert-in-place and record copy sharing in
the x86-64 machine lowering, frame-storage sharing in the portable engine,
and the dominance-scoped proof facts for bounds elision. The
borrowed-call-argument experiment was rejected and removed
(`bench/results/call-borrow-alpha.md`); the machine-native call form,
routing the closure through `ProofKernel::DecideOrder`, the k-nucleotide
copy loop, the print-heavy examples and the Alpha timing of the elision
remain. These are Alpha-only measurements; do not queue target breadth
ahead of them.
5. **M5c** Mach-O/Apple64 and signing, only when an Apple host and signing
identity are available. **M5d** the Windows loader follows M5b.
6. **M6b** the owner's full before/after comparison on Alpha's physical host
last, because it must compare the finished implementation, not an interim
slice.
Two smaller corrections: step 08 lists a textual listing re-assembler and
every object format for all rows, while the review above intentionally keeps
only maintained target rows and treats the listing as inspection, not a
required assembler dialect; and a "real launch" must be defined in the step-07
matrix as not emulated, so no Wine, emulator or cross-compilation result is
counted as a row's execution evidence.
+22 -16
View File
@@ -1,6 +1,6 @@
# Verified lowered-IR optimization pipeline
Status: bounded scalar pipeline, mandatory before experimental ZX production.
Status: bounded verified-LIR pipeline, mandatory before experimental ZX production.
Source `--opt` selects optimized LIR inspection and source optimization reports;
ZX input is never reoptimized. This module does not select target
instructions, allocate registers, or claim a performance result.
@@ -25,8 +25,8 @@ LirOptFree :: (owner: *LirOptOwner)
`LirOptResult`, and `LirOptProblem` are ordinary named exported records and
enums. Generated C consumers use normal module-prefixed symbols and records.
The default options enable constant folding, copy propagation, CFG
simplification, and dead-instruction elimination with at most eight folding
rounds.
simplification, dead-instruction elimination, and call inlining (growth-limited,
default `inline_calls = 48`) with at most eight folding rounds.
The input is immutable. `LirOptBuild` first verifies it under the supplied
limits and serializes it through the canonical owning lowered-IR codec before
@@ -43,14 +43,13 @@ returns `Owner`.
## Pass order and verification boundaries
The order is fixed and deterministic:
1. Verify the immutable input.
2. Fold exact scalar constants.
3. Propagate proven identity copies.
4. Simplify constant control flow and remove newly unreachable blocks.
5. Remove unused, nontrapping pure instructions.
6. Verify and expose the final owned program.
The order is fixed and deterministic. The build verifies the immutable input,
runs folding, copy-propagation, CFG-simplification and dead-code-elimination
rounds, then common subexpression elimination, growth-limited inlining, branch
specialization, loop-invariant motion, induction strengthening, loop rotation,
jump threading with block merging, and block layout as enabled, re-verifying
the program after every enabled pass before exposing the final owned program
([`compiler_opt.zi`](../cmd/compiler_opt.zi)).
Each enabled numbered pass calls `LirVerify`, even when it reports no change.
The folding pass re-encodes its appended constant table through the canonical
@@ -98,6 +97,15 @@ These operations are pure and nontrapping under the current verifier and
portable engine. Dynamic-index `Extract` and `Insert` stay in the program
because their bounds checks can trap, including when their result is unused.
Beyond these, the pipeline implements verified common subexpression
elimination, growth-limited leaf and call-site inlining that keeps source
origins, guarded branch specialization, loop-invariant motion, induction
variable strengthening, loop rotation, jump threading with block merging, and
deterministic block layout. Every pass re-verifies its output and preserves the
effect order, including `Fuel`; the retained cases in
[compiler_opt_cases.zi](../tests/compiler_opt_cases.zi) cover cse, inline,
licm, induction, rotate, thread, layout, devirt and fields behavior.
## Preserved behavior
No pass changes the order, count, immediate, or effect number of `Fuel`
@@ -149,10 +157,8 @@ giving the optimizer filesystem or terminal ownership.
The following are not represented by placeholder counters or no-op names:
- float arithmetic folding and float numeric-conversion folding;
- block-parameter coalescing, jump threading, and general block merging;
- range propagation, redundant-check removal, common subexpression
elimination, and load/store optimization;
- inlining, loop transformations, vectorization, or fuel-aware code motion;
- general range propagation and conservative load/store optimization;
- block-parameter coalescing, vectorization, or fuel-aware code motion;
- machine IR, instruction selection, register allocation, spilling, and ABI
lowering.
@@ -170,7 +176,7 @@ generated C, generated Go, and bundle execution on the engine:
```sh
env -u DISPLAY -u WAYLAND_DISPLAY build-queue -- \
sh tests/compiler_opt.sh build/bin/ziran
make CHECK_FILTER=compiler_opt check
```
Performance compilation and measurement are separate work and run only on
+96 -163
View File
@@ -1,16 +1,14 @@
# ZX performance comparison receipts
`bench/assembly_compare.zi` is the reusable, measurement-free report processor
for the eventual ZX before/after campaign. It reads raw receipts produced on one
physical host and atomically writes a Markdown report with absolute medians,
per-case ratios, regressions, missing cells, raw samples, and audited outlier
indices.
`bench/assembly_compare.zi` is the reusable, measurement-free report processor for the ZX
before/after campaign. It reads raw receipts produced on one physical host and atomically
writes a Markdown report with absolute medians, per-case ratios, regressions, missing cells,
raw samples, and audited outlier indices.
This is the reporting and collection infrastructure for the strict five-core
before/after campaign, not that final benchmark result. The full ASSEMBLY
implementation is incomplete and the strict campaign has not run. A separately
labeled portable-engine comparison has run on physical Alpha; it does not
measure the missing new-native cell or establish a native ZX speedup.
This is reporting and collection infrastructure, not a benchmark result. The strict
five-core campaign has not run; that pending work is tracked in `plans/open-work.md`. The
separately labeled portable-engine comparison has run on physical Alpha; it does not measure
the missing new-native cell or establish a native ZX speedup.
## Invocation
@@ -21,8 +19,8 @@ build-queue -- env -u DISPLAY -u WAYLAND_DISPLAY \
```
The processor does not invoke a compiler, VM, workload, timer, or remote host.
`bench/assembly_collect.zi` is the separate collector. Its measurement-free plan
validation may run locally:
`bench/assembly_collect.zi` is the separate collector. Its measurement-free plan validation
may run locally:
```sh
build-queue -- env -u DISPLAY -u WAYLAND_DISPLAY \
@@ -30,8 +28,7 @@ build-queue -- env -u DISPLAY -u WAYLAND_DISPLAY \
bench/assembly_collect.zi -- --validate PLAN.json
```
Actual collection must run only in the canonical checkout on Alpha's physical
host:
Actual collection runs only in the canonical checkout on Alpha's physical host:
```sh
build-queue -- env -u DISPLAY -u WAYLAND_DISPLAY \
@@ -39,21 +36,20 @@ build-queue -- env -u DISPLAY -u WAYLAND_DISPLAY \
bench/assembly_collect.zi -- PLAN.json bench/results/CAMPAIGN/raw.json
```
The collector checks its plan completely before execution, then attests the
fresh hostname, exact `lscpu` model name, `uname -srmo` result, and
`systemd-detect-virt` result `none`. The plan must name physical host `alpha`
and an `alpha...` hostname. A failed attestation occurs before input hashing,
cache changes, or workload commands. This is a host guard, not permission to
run the command from another machine with copied or edited provenance.
The collector checks its plan completely before execution, then attests the fresh hostname,
exact `lscpu` model name, `uname -srmo` result, and `systemd-detect-virt` result `none`. The
plan must name physical host `alpha` and an `alpha...` hostname. A failed attestation occurs
before input hashing, cache changes, or workload commands. This is a host guard, not
permission to run the command from another machine with copied or edited provenance.
### Collector plan, version 1
The plan root has exactly ten members: `schema_version` (exactly `1`),
`campaign`, `physical_host`, `hostname`, `cpu`, `os`, absolute
`working_directory`, absolute `collector_work`, `required_cells`, and `jobs`.
`collector_work` must be a child of the working directory. Required cells use
the same four-member schema documented below and may include modes that have no
job; those remain visible as missing cells in the generated report.
The plan root has exactly ten members: `schema_version` (exactly `1`), `campaign`,
`physical_host`, `hostname`, `cpu`, `os`, absolute `working_directory`, absolute
`collector_work`, `required_cells`, and `jobs`. `collector_work` must be a child of the
working directory. Required cells use the same four-member schema documented below and may
include modes that have no job; those remain visible as missing cells in the generated
report.
Each job has exactly these 24 members:
@@ -72,24 +68,22 @@ Each job has exactly these 24 members:
| `artifact` | Measured build/size artifact under `collector_work`, or `-` when the phase does not produce one. |
| `rss_tool` | Absolute GNU/BusyBox time executable for memory jobs, declared in the closure, or `-` for every other phase. |
Every sample starts a fresh child process. Warm phases require at least one
discarded warmup and preserve their private cache across warmups and samples.
Cold private caches are reset before every measured sample. Compile and size
jobs remove only their declared artifact before each sample, then run their
separate correctness command. Duration uses monotonic nanoseconds; throughput
requires `timing=internal-kernel-ns`, reads a positive kernel-nanosecond value
from the measured command, and divides exact iterations by that internal
interval, so process startup is not mislabeled as sustained work. Throughput
also requires a separate untimed correctness command. Memory uses the child
launcher's peak-RSS KiB; size uses the freshly produced regular file. Correctness
stdout must match the expected digest for every sample. Any command, timeout,
checksum, correctness, or post-run closure failure aborts without replacing the
raw receipt file.
Every sample starts a fresh child process. Warm phases require at least one discarded warmup
and preserve their private cache across warmups and samples. Cold private caches are reset
before every measured sample. Compile and size jobs remove only their declared artifact
before each sample, then run their separate correctness command. Duration uses monotonic
nanoseconds; throughput requires `timing=internal-kernel-ns`, reads a positive
kernel-nanosecond value from the measured command, and divides exact iterations by that
internal interval, so process startup is not mislabeled as sustained work. Throughput also
requires a separate untimed correctness command. Memory uses the child launcher's peak-RSS
KiB; size uses the freshly produced regular file. Correctness stdout must match the expected
digest for every sample. Any command, timeout, checksum, correctness, or post-run closure
failure aborts without replacing the raw receipt file.
The receipt's `toolchain` preserves the selector, cache/process policy, complete
ordered runtime-closure identities, verification argv, and explicit environment;
`flags` preserves the measured command argv after its executable. The collector
emits only the strict version-1 four-member document accepted by the processor.
The receipt's `toolchain` preserves the selector, cache/process policy, complete ordered
runtime-closure identities, verification argv, and explicit environment; `flags` preserves
the measured command argv after its executable. The collector emits only the strict
version-1 four-member document accepted by the processor.
Current honest selectors are:
@@ -100,11 +94,11 @@ Current honest selectors are:
| `direct-aot` | `direct-aot` | Supported only by executing the exact hashed ELF artifact. It is never relabeled as native ZX. |
| `control-c`, `control-go`, `control-wasm` | matching selector | Supported with an exact absolute command and complete hashed closure. |
| `old-c-tinycc-native` | — | Missing: the TinyCC route is removed, and its pre-cutover CLI default never gave native-only selection proof. |
| `new-native` | — | Missing: there is no native ZX engine until milestone M3. |
| `new-native` | — | Missing: the collector keeps this required cell closed ([`assembly_collect.zi`](../bench/assembly_collect.zi) rejects the selector and keeps the required cell missing). Native ZX executes in process since [M3](milestones.md), but no measurement receipt attests it. |
Requests for either missing execution mode fail plan validation. They may and
should remain in `required_cells`, where the processor reports them as missing
rather than manufacturing fallback receipts.
Requests for either missing execution mode fail plan validation. They may and should remain
in `required_cells`, where the processor reports them as missing rather than manufacturing
fallback receipts.
## Exact input schema, version 1
@@ -134,10 +128,9 @@ Every required cell requires one receipt from each core engine:
- `new-native`
- `direct-aot`
Missing core receipts do not make the input malformed. They produce an
incomplete status, a visible `missing` matrix entry, and an explicit item in the
missing-cells section. `control-c`, `control-go`, and `control-wasm` are optional
and are compared when present.
Missing core receipts do not make the input malformed. They produce an incomplete status, a
visible `missing` matrix entry, and an explicit item in the missing-cells section.
`control-c`, `control-go`, and `control-wasm` are optional and are compared when present.
Each receipt is an object with exactly these 21 members:
@@ -165,47 +158,36 @@ Each receipt is an object with exactly these 21 members:
| `repeats` | integer | 3–4096 and exactly equal to the raw sample count. |
| `samples` | number array | Positive finite JSON numbers in original measurement order. |
All strings are nonempty, contain no control bytes, and are at most 1024 bytes
unless a smaller bound is stated above. The complete input must be a regular
file from 2 bytes through 4 MiB. Across the document, no more than 65,536 raw
samples are accepted.
All strings are nonempty, contain no control bytes, and are at most 1024 bytes unless a
smaller bound is stated above. The complete input must be a regular file from 2 bytes
through 4 MiB. Across the document, no more than 65,536 raw samples are accepted.
Duplicate required cells, duplicate `receipt_id` values, or duplicate
engine/case/phase/metric cells are rejected. Unknown object members are rejected
because every object has an exact member count and every required member is
type-checked.
engine/case/phase/metric cells are rejected. Unknown object members are rejected because
every object has an exact member count and every required member is type-checked.
## Comparability gates
The entire accepted campaign must have one identical `physical_host`,
`host_mode`, `vm`, `cpu`, and `os`. Every receipt must directly identify a
physical host and no VM. Receipts for the same case/phase/metric must also have
identical:
The entire accepted campaign must have one identical `physical_host`, `host_mode`, `vm`,
`cpu`, and `os`, and every receipt must directly identify a physical host and no VM.
Receipts for the same case/phase/metric must also have identical workload and input
checksum, iteration count, unit, semantic settings, and expected correctness identity, and
each receipt's actual correctness identity must equal its expected identity. Any changed
host, VM, CPU, OS, workload, checksum, iteration count, unit, semantics, or correctness
identity rejects the document before output replacement. Toolchains and flags remain visible
per receipt but may differ between engines by design.
- workload and input checksum;
- iteration count;
- unit;
- semantic settings;
- expected correctness identity.
Each receipt's actual correctness identity must equal its expected identity.
Any changed host, VM, CPU, OS, workload, checksum, iteration count, unit,
semantics, or correctness identity rejects the document before output
replacement. Toolchains and flags remain visible per receipt but may differ
between engines by design.
The processor never pools duplicate or incompatible batches. A collector that
wants another batch must create a separately identified campaign input instead
of relying on implicit aggregation.
The processor never pools duplicate or incompatible batches. A collector that wants another
batch must create a separately identified campaign input instead of relying on implicit
aggregation.
## Statistics and ratio direction
Each receipt is analyzed by the canonical
`bench/benchmark_statistics.zi::BenchmarkAnalyze` implementation:
Each receipt is analyzed by the canonical `bench/benchmark_statistics.zi::BenchmarkAnalyze`
implementation:
- symmetric Tukey fences at 1.5×IQR;
- symmetric Tukey fences at 1.5×IQR, both tails checked;
- linearly interpolated inclusive first and third quartiles;
- both tails checked;
- a sample is excluded only when it is strictly outside a fence;
- at least three retained positive finite samples;
- the median is computed from retained samples;
@@ -223,18 +205,17 @@ Recognized phase/metric pairs and intended normalized favorable factors are:
| `code-size` | `code-size` | lower | baseline / candidate |
| `bundle-size` | `bundle-size` | lower | baseline / candidate |
A favorable factor above 1 is an improvement, below 1 is a regression, and
exactly 1 is unchanged. Every comparable row separately reports candidate
metric change as `(candidate - baseline) / baseline × 100%`. For example, this
keeps a lower-is-better duration increase distinct from the reciprocal favorable
factor; it never presents factor change as elapsed-time or size change.
A favorable factor above 1 is an improvement, below 1 is a regression, and exactly 1 is
unchanged. Every comparable row separately reports candidate metric change as `(candidate -
baseline) / baseline × 100%`, which keeps a lower-is-better duration increase distinct from
the reciprocal favorable factor and never presents factor change as elapsed-time or size
change.
If division of positive finite medians underflows or overflows, the row is marked
`noncomparable: derived ratio outside finite range`; no infinity or NaN claim is
written. An unknown metric is retained with its absolute medians and raw audit
but its pair is explicitly marked `noncomparable: unknown metric direction`.
No overall or geometric mean is calculated, so missing cells cannot disappear
inside an aggregate.
`noncomparable: derived ratio outside finite range`; no infinity or NaN claim is written. An
unknown metric is retained with its absolute medians and raw audit but its pair is
explicitly marked `noncomparable: unknown metric direction`. No overall or geometric mean is
calculated, so missing cells cannot disappear inside an aggregate.
The fixed primary comparisons for every available cell are:
@@ -242,8 +223,8 @@ The fixed primary comparisons for every available cell are:
2. `old-c-tinycc-native` → `new-native`
3. `old-c-tinycc-native` → `direct-aot`
Optional C, Go, and Wasm controls are each compared against
`old-portable-vm` when their receipts exist.
Optional C, Go, and Wasm controls are each compared against `old-portable-vm` when their
receipts exist.
## Output and failure behavior
@@ -253,78 +234,30 @@ The Markdown output contains:
- an absolute-median matrix for core and control engines;
- the fixed per-case comparisons with ratio and improvement/regression;
- every missing required engine/phase cell;
- per-receipt workload, checksum, iterations, semantics, toolchain, flags, and
correctness identities;
- explicit sample counts, raw samples in original order, excluded indices, and
retained medians.
- per-receipt workload, checksum, iterations, semantics, toolchain, flags, and correctness
identities;
- explicit sample counts, raw samples in original order, excluded indices, and retained
medians.
All receipt-controlled Markdown and HTML metacharacters are encoded before
rendering, including pipes, backticks, backslashes, angle brackets, ampersands,
asterisks, underscores, brackets, and hashes.
All receipt-controlled Markdown and HTML metacharacters are encoded before rendering: pipes,
backticks, backslashes, angle brackets, ampersands, asterisks, underscores, brackets, and
hashes.
The output follows input order and is byte-deterministic for identical input.
It is built completely in memory, then written through `ReplaceFile`, which
writes and syncs a private sibling before renaming it over the destination.
Malformed, statistically invalid, or incompatible receipts return failure
without replacing an existing report. An atomic write failure also returns
failure and removes its private sibling.
The output follows input order and is byte-deterministic for identical input. It is built
completely in memory, then written through `ReplaceFile`, which writes and syncs a private
sibling before renaming it over the destination. Malformed, statistically invalid, or
incompatible receipts return failure without replacing an existing report. An atomic write
failure also returns failure and removes its private sibling.
## Full comparison delivery gate
## Status
The owner's requested final comparison is the complete before/after campaign,
not a scalar microbenchmark or a selected best-case ratio. It remains pending
until the implementation and its local correctness gates are complete.
`bench/assembly_collect.zi` supplies the strict collector prerequisite for genuinely
selectable modes but cannot complete the five-core matrix: the TinyCC route is removed (the
M0 receipts are its only data), and there is no new-native ZX cell yet. The pending
full-campaign item lives in `plans/open-work.md`. The older `bench/zx_compare.py` harness
produced the labeled interim portable-engine comparison on physical Alpha; see
[`bench/zx_compare.md`](../bench/zx_compare.md#older-receipts) and the retained raw receipt.
That shell receipt is not the strict five-core campaign and cannot close the delivery gate.
Synthetic fixtures validate this report processor independently of the measured interim
results.
- Run every actual compilation and measurement directly on Alpha's physical
host. Record fresh host/virtualization evidence; if Alpha is unavailable,
leave the campaign pending instead of substituting another machine.
- Validate the baseline executable's complete runtime closure, standard
modules, headers and dependency/toolchain identities before calling it an
old-version baseline. The saved baseline binaries alone are not evidence
that this closure has been preserved. Keep exact workload/input bytes and
expected output checksums identical across comparable engines.
- Explicitly force each engine and reject silent interpreter/compiler/Wasm
fallbacks. A missing new-native ZX path remains `missing`, not an AOT result
relabeled as native ZX. Record optimization, CPU features, runtime budgets
and cache policy per engine; do not imply unmetered AOT has identical safety
costs to a metered interpreter.
- Cover scalar arithmetic, branches/loops, direct and indirect calls, packed
records/arrays, checked dynamic indexing, global/field pointers and aliasing,
allocation/collection/borrowed-view churn, text processing, host bridges and
applicable concurrency/runtime workloads. Include the VM root-tracing fix
and the constant-time native pointer-token checks in relevant workload results. Unsupported
engine/workload pairs must be explicit limitations, never zero-time samples.
- Measure cold compilation, cold startup, warm cached startup, warm sustained
throughput, memory, native code size and bundle size separately. Define the
cache/process boundary in each phase; never delete unrelated application or
user caches to manufacture a cold run. Exclude compilation from steady-state
throughput, but report it in the compilation phase instead of hiding it.
- Report every requested cell with absolute units, before/after medians,
favorable factor, actual metric percent change, sample count, raw samples
and symmetric outlier exclusions. Include regressions and missing cells as
prominently as speedups. Keep C/Go/Wasm controls alongside ZX results.
- Correlate measured hot paths with the exact ELF digest, emitted assembly,
byte ranges and source origins. Distinguish observed elapsed time or hardware
counters from estimated instruction costs. Missing counters remain unknown.
- Retain the real collector inputs, raw receipts and the generated Markdown
comparison under `bench/results/`. Synthetic reporter tests prove report
behavior only and must never be presented as measured language performance.
## Current limitation and next integration step
`bench/assembly_collect.zi` supplies the strict collector prerequisite for
genuinely selectable modes, but cannot complete the five-core matrix: both
native cells described above remain unavailable. The TinyCC cell can no longer
be measured, since its route is removed; the M0 receipts are its only data.
Once a real new-native ZX integration exists, the same plan format can add
that job.
The older `bench/zx_compare.py` harness has now produced a labeled interim
portable-engine comparison on physical Alpha; see
[`bench/zx_compare.md`](../bench/zx_compare.md#final-pointer-dispatch-cohort-2026-11-13)
and the retained raw receipt. It shows 59.81% scalar and 81.14% structured
improvements over its 2026-11-12 lowered-engine baseline, while remaining
1.024×/1.079× slower than the old VM. That shell receipt is not the strict
five-core campaign, does not supply either missing native cell, and cannot close
this delivery gate. Synthetic fixtures continue to validate this report
processor independently of those measured interim results.
+17 -11
View File
@@ -127,9 +127,11 @@ checks for empty arrays and zero-sized elements.
an identity-checked pointer token bound to that frame and its generation. The
optional initializer must have the exact pointee type and is copied at
allocation time; without one, the new storage has the pointee's zero value.
Accepted pointees are bool, fixed-width integer, `f32`, `f64`, and pointer
values. Aggregate pointees fail the `Allocate` operand rule, while pointers to
function types are rejected by the type verifier. Allocated pointers compose
Accepted pointees are any verified non-void value type: bool, fixed-width
integer, `f32`, `f64`, pointer, and aggregate/record/fixed-array values
(the verifier's `ValueType` rule in [`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi));
[lowered_exec_cases.zi](../tests/lowered_exec_cases.zi) allocates and reads
back an aggregate pointee. Allocated pointers compose
with load and store; a token whose frame has returned, or whose identity no
longer matches, fails with `.Pointer`. Every execution allocates fresh storage,
including repeated execution of one instruction in loops and recursion, so
@@ -141,7 +143,7 @@ The conformance cases cover narrowing and wrap, signed-minimum division,
division by zero, invalid shifts, mixed-width shifts, bool casts, checked float
casts, float32 rounding, signed zero, NaN comparisons and payload-preserving
negation, cyclic edge transfers, arrays and records, direct and indirect calls,
initialized and zero-default scalar allocation, same-site loops and recursion,
initialized and zero-default scalar and aggregate allocation, same-site loops and recursion,
active aliases, stale and reused-frame pointer failure, instance isolation,
pointer provenance, reuse and repeated close, all runtime limits, structured
origins, repeated failure, and verifier rejection.
@@ -152,11 +154,15 @@ engine.
## Exact current boundary
The verifier rejects `copy`, `zero`, and `host.call`; it also rejects
native-width integers, vectors, capabilities,
external functions, non-portable calling conventions, variadics, and
non-writable global addresses. Plan construction returns `InvalidProgram` with
the verifier diagnostic for these forms. They are not silently skipped.
The verifier rejects `copy` and `zero`; it also rejects native-width integers,
vectors, capability-typed values, ordinary calls to external functions,
non-portable calling conventions, variadics, and non-writable global
addresses. Typed host capability calls (`HostCall` with the declared signature)
are supported and execute through `LirExecTypedHostCall`
([`compiler_lowered_verify.zi`](../cmd/compiler_lowered_verify.zi),
[`compiler_exec.zi`](../cmd/compiler_exec.zi)). Plan construction returns
`InvalidProgram` with the verifier diagnostic for rejected forms; they are not
silently skipped.
Heap blocks live in the instance-owned bytes beside host-returned storage. A
block's address names the block and its generation. `resize` and free end that
@@ -166,7 +172,7 @@ owned bytes grows and shrinks in place; dead blocks at the end are given back.
Heap bytes count against `value_bytes`, and a request beyond it gives a null
result instead of a failure, so `VecPush` can report it.
Consequently this slice provides checked frame-local scalar allocation and
Consequently this slice provides checked frame-local scalar/aggregate allocation and
typed heap blocks, but does not yet provide arbitrary byte memory,
host callbacks, native-width or SIMD values,
capability values, state serialization or
@@ -181,7 +187,7 @@ Run:
```sh
env -u DISPLAY -u WAYLAND_DISPLAY build-queue -- \
sh tests/lowered_exec.sh build/bin/ziran
make CHECK_FILTER=lowered_exec check
```
The focused test reports:
+58 -23
View File
@@ -1,9 +1,10 @@
# ZX executable instruction container — revision 28
This is the one `.zx` format. The format owner is `cmd/compiler_bundle.zi`;
This document specifies the `.zx` executable format. The format owner is `cmd/compiler_bundle.zi`;
`cmd/compiler_exec_link.zi` binds it to the deterministic LIR codec and
verifier (current payload schema 4). `zi2zx` writes it; `ziran run`, `zi2zx run`,
the embedding API (`include/ziran_host.h`), `zx2wasm`, and `zx2native` read it.
Checked packages use the [ZX library format](zx-library-format.md).
## Integers, limits and ordering
@@ -27,7 +28,7 @@ truncation, and trailing bytes. There is no recovery scan or legacy fallback.
| 4 | 4 | format revision `28` |
| 8 | 4 | header size `64` |
| 12 | 4 | directory record size `32` |
| 16 | 8 | required feature mask; exactly bit 0 today |
| 16 | 8 | required feature mask, `1` for apps or `3` with module linkage |
| 24 | 8 | optional feature mask |
| 32 | 4 | section count |
| 36 | 4 | container flags; zero |
@@ -36,12 +37,13 @@ truncation, and trailing bytes. There is no recovery scan or legacy fallback.
| 56 | 4 | identity algorithm; `1` means SHA-256 |
| 60 | 4 | reserved; zero |
Required feature bit 0 retains the manifest contract name `portable-lir-schema-3`;
the internal payload independently carries and verifies current LIR schema 4.
A reader rejects any missing
or additional required feature. Optional bits are non-executable hints and may
be ignored. Any other revision is unsupported, and the reader never sends a
payload to the `.zir` parser.
Required feature bit 0 retains the manifest contract name `portable-lir-schema-3`.
The internal payload independently carries and verifies current LIR schema 4.
Required feature bit 1 advertises module linkage. A reader requires bit 0 and
rejects unknown required bits. A revision-28 reader that knows only bit 0 rejects
a module bundle. Optional bits are non-executable hints and may be ignored.
Any other revision is unsupported, and the reader never sends a payload to the
`.zir` parser.
## Directory record (32 bytes)
@@ -62,6 +64,7 @@ Implemented kinds are:
| 2 | yes | deterministic stripped internal instruction payload |
| 3 | yes | canonical assets, including an empty table |
| 4 | not accepted as required | reserved native variants |
| 5 | iff required feature bit 1 is set | module linkage bytes |
| `0x80000001` | no | opaque debug attachment |
| `0x80000002` | no | opaque source attachment |
| `0x80000003` | no | host interface: the names an embedder sees (below) |
@@ -71,7 +74,10 @@ An unknown optional section is bounded and skipped. An unknown required section
rejects before LIR decoding. A required kind-4 section rejects as an unsupported
native variant; arbitrary machine bytes are never selected or executed.
## Host interface (kind `0x80000003`, optional)
## Host interface (kind `0x80000003`)
The section is mandatory and nonempty when required feature bit 1 is set.
Its directory flags are zero in both app and module bundles.
The instruction payload is structural: a record is its field types, a string
is `{data, count}`. An embedder's host values carry names, so `zi2zx` writes
@@ -100,8 +106,8 @@ A spelling is the type as declared at that position, which a host sees as the
value's type name. Declaration text has its tabs and line ends as spaces. The
embedding API (`include/ziran_host.h`) uses these lines to translate host
values, copy a host's changes to `[]T` arguments back, export and import
module globals as state, and compare two files' capability ABIs. The engine
never reads this section, and a file without it runs the same.
module globals as state, and compare two files' capability ABIs. App bundles
may omit this section.
## Manifest (kind 1, exactly 128 bytes)
@@ -122,12 +128,20 @@ never reads this section, and a file without it runs the same.
The program identity is SHA-256 of `ZX28-PROGRAM\0` followed by the exact kind-2
bytes. The asset identity is SHA-256 of `ZX28-ASSETS\0`, the u32 asset count,
then each sorted asset's u32 name length/name bytes and u32 data length/data
bytes. The combined identity is SHA-256 of `ZX28-CONTENT\0`, the little-endian
entry ID, required-feature u64, program identity and asset identity.
bytes. For a bundle with required-feature mask `1`, the combined identity is
SHA-256 of `ZX28-CONTENT\0`, the entry ID as a little-endian u32, the mask as
a little-endian u64, the program identity and the asset identity.
All three identities are checked before the executable is exposed. Required
program, entry and assets affect content identity. Optional debug, source and
unknown optional attachments intentionally do not. Proof status zero means no
For a bundle with required-feature mask `3`, the combined identity is SHA-256
of `ZX28-MODULE-CONTENT\0`, the entry ID as a little-endian u32, the mask as
a little-endian u64, the program identity, the asset identity, the linkage byte
length as a little-endian u64, the exact kind-5 bytes, the host-interface byte
length as a little-endian u64 and the exact kind-`0x80000003` bytes.
The owned reader checks all three identities before exposing the executable.
Module linkage and its host interface affect the module bundle's content
identity. Debug, source and unknown optional attachments are outside the
combined identity. Proof status zero means no
opaque producer law/proof claim becomes verified merely by being attached or
hashed.
@@ -163,8 +177,9 @@ the embedder has bound every capability.
Outer validation uses the caller's `LirLimits` as well as the inner codec and
verifier. The reader rejects a container larger than `limits.bytes` before
framing or hashing and charges `limits.work` for container bytes, program and
asset hashing, symbol-name bytes, hash-table initialization/probes, reachability
and temporary copies. Temporary asset, symbol and reachability allocations are
asset hashing, module linkage and module host-interface hashing and copying,
symbol-name bytes, hash-table initialization/probes, reachability and temporary
copies. Temporary asset, symbol and reachability allocations are
checked against the byte budget before allocation. Symbol uniqueness uses
deterministic open-addressed tables; hash collisions remain explicitly charged.
The first reachable indirect call adds every function once, and later indirect
@@ -186,6 +201,15 @@ API validates and hashes them during the read; the embedding API copies them
when it opens the file and exposes them through `BundleAsset*`. `zi2zx
--asset-dir` stores them.
## Module linkage (kind 5)
The section is present exactly when required feature bit 1 is set. Its flags
are `1`, alignment is `8`, and its payload consists of the compiler's canonical
module linkage bytes. The payload must be nonempty and fits within the container
and reader byte limits. The framing API treats the payload as bytes. The owned
reader verifies the combined identity and copies the payload before returning.
The linkage codec defines the interpretation of these bytes.
## APIs and failure behavior
`ExecutableEncode` measures when output is empty. A short output returns its
@@ -193,6 +217,11 @@ required size and changes no byte. `ExecutableDecode` frames sections and assets
without interpreting LIR. `ZxExecWrite` produces a stripped deterministic
container; `ZxExecRead`, `ZxExecReadProgram`, and `ZxExecReadFree` provide the
bounded owned verified program. Empty and repeated frees are safe.
`ZxExecWriteModule(program, assets, output, interface, debug, module_linkage)`
writes the module form when linkage is nonempty. Empty linkage produces the app
form. `ZxExecReadModuleLinkage(owner)` returns bytes owned by a successful read
and valid until that owner is reused or freed. It returns an empty string for
an app bundle or an invalid owner.
The format-specific tools keep generated-output replacement semantics: they write a sibling
temporary and replaces the requested path only after a complete successful
@@ -204,14 +233,20 @@ entry mismatch, capability, variant, external and symbol failures.
## Remaining gaps
- One file is one linked program: there are no library or add-on containers,
cross-container symbol tables or partial-module composition.
- Generic cross-container symbol tables and thin/add-on composition remain
open. Landed since this text was written: module-linked bundles bind required
checked modules through the kind-5 linkage section with one combined
verified identity, and [`.zx` libraries](zx-library-format.md) exist as a
separate package format; neither creates a general cross-container symbol
table.
- Native target/CPU/OS/ABI variant metadata and template verification are not
implemented; a required variant rejects, and no arbitrary machine blob is
accepted.
- Debug/source attachment codecs, optimization remarks, law witnesses and proof
revalidation are not implemented; optional bytes remain non-executable and
proof status remains unverified. Laws are checked from source.
- The optional debug/source attachment codec exists (section `0x80000001`,
identity-bound and reader-reverified). Optimization remarks, law witnesses
and proof revalidation are not implemented; optional bytes remain
non-executable and proof status remains unverified. Laws are checked from
source.
The retained focused tests cover deterministic source/saved output, stripped
portable execution, owned input lifetime, legacy and feature rejection, unknown
+45
View File
@@ -0,0 +1,45 @@
# ZX checked library format, revision 1
`ziran pkg zx pack-ir` writes `.zx` libraries for use by the package compiler.
The package driver verifies the library and supplies its checked modules to
the compiler by package identity. ZX runtime modules and applications use the
[executable format](zx-executable-format.md).
All integers are unsigned little-endian. The 16-byte header has four fields.
| Offset | Width | Field |
| --- | --- | --- |
| 0 | 4 | Bytes `ZXLB` |
| 4 | 4 | Format revision, `1` |
| 8 | 4 | Section count, 3 to 4,098 |
| 12 | 4 | Exact file length, up to 268,435,456 bytes |
Sections follow the header in increasing bytewise order by path. Each record
has a four-byte path length, a four-byte payload length, a 32-byte raw SHA-256
of the payload, and then the path and payload bytes. Records are contiguous.
Paths are unique, relative, and 1 to 1,024 bytes long. Paths cannot contain
empty, `.` or `..` components, control bytes below 32, a backslash or a colon.
Payloads are nonempty. The final payload ends at the declared file length.
The required `checked-package.tsv` section is the literal `2`, package
identity, toolchain identity, and profile, separated by tabs and terminated
by one newline. Both identities have the form `p` followed by 16 lowercase
hexadecimal digits. The profile is a registry path segment of up to 128
ASCII letters, digits, hyphens, underscores, or periods, excluding `.` and
`..`. The required `ziran.toml` section contains the provider manifest. All
remaining sections hold serialized checked modules with `.zir` paths derived
from the provider's module paths. At least one module is required.
The registry descriptor repeats the metadata fields and adds the full
lowercase hexadecimal SHA-256 of the entire `.zx` file as a fifth field.
The package driver matches these pins to the package and toolchain in the
resolved dependency graph. The compiler checks module identities against
that graph when it opens their checked payloads.
Development libraries use `ZXLD` as their magic. Their metadata starts with
`dev` and adds a fifth field containing a lowercase hexadecimal source
fingerprint. It covers the provider manifest and lock, scanned module and
export source bytes, and feature defines. The writer checks the fingerprint
again before installing the completed file. Production package and runtime
readers reject this magic. A local development reader must be selected
explicitly and still checks the package and toolchain identities.
+147
View File
@@ -2,6 +2,153 @@
## [Unreleased]
## [0.9.0] - 2026-11-25
- `zx2native` on Linux x86-64 now implements the full System V AMD64 C ABI for registered host-library veneers: arbitrary records (including mixed float/integer/padded structs such as `Rectangle`, `Color`, `Vector2`, `BundleInput`, `TextRequest`), stack-spilled arguments past six integer / eight SSE registers, and record return values (both <=16-byte register returns and >16-byte `sret` hidden-pointer returns) marshal between Ziran's packed record layout and C's naturally aligned struct layout. This lets native executables produced from portable `.zx` bundles link full platform UI/SDL/GPU host libraries directly instead of hitting `assembly.gap.machine-host-abi`. `tests/machine_elf.sh` covers `Color`/`Rectangle`/stack-spilled calls, `string` returns, and 14-field padded struct returns.
- Setting `ZIRAN_JIT_DUMP` to an absolute directory makes the in-process native loader publish each instance's loaded code as a JITDUMP file there (`jit-<pid>-<sequence>.dump`) before it runs: one JIT_CODE_LOAD record per program function, with its loaded extent, so perf's JIT interface attributes samples to function names. A run without the variable writes no file. `tests/native_load.sh` checks the header, the records and the named function.
- A host library registered for `zx2native` may be an `ar(1)` archive of ELF64 x86-64 relocatable objects instead of a shared object. The Linux executable links the members its capabilities reach, each once, with their text, read-only data, writable data, zero fill, GOT entries and relocations, and the capability's veneer calls its member directly, so the executable stays static and has no interpreter or dynamic record. An unsupported section, relocation or symbol is the stable `assembly.gap.machine-archive` diagnostic naming the capability, member and symbol, and the old output is kept. `tests/machine_elf.sh` links and runs an archive, rejects an undefined member symbol, and keeps the shared-library case green.
- `zx2native --platform linux|windows` supplies the ZX Runner's file and clock services itself, so a program that uses `std/guest_files` or `std/guest_clock` links into the same static ELF or PE32+ as any other instead of stopping at a host-capability gap. The linker names the nine `host_api` services by function and signature, keeps them apart from library imports so the ELF stays static and the PE imports only what a veneer calls, and emits each veneer after the library ones. Linux veneers make the system calls with the path in a 4 KiB stack slot; Windows veneers widen UTF-8 paths to UTF-16 with `MultiByteToWideChar`, convert listed names back with `WideCharToMultiByte`, and import `GetFileAttributesExW`, `CreateFileW`, `ReadFile`, `WriteFile`, `DeleteFileW`, `MoveFileExW`, `CreateDirectoryW`, `FindFirstFileW`, `FindNextFileW`, `FindClose`, `QueryPerformanceCounter`, `QueryPerformanceFrequency` and `GetSystemTimeAsFileTime` as needed. A read or a listing grows a heap block through the runtime's resize entry and shrinks it to the final length; the block stays allocated. `tests/machine_elf.sh` and `tests/zx_windows_parity_cases.zi` run one program that writes, reads, renames and removes a file (with a non-ASCII name), lists a directory and reads both clocks on Linux and under Wine.
- `zx2native --platform windows` writes each line of standard output to a console once it ends, as the Linux ELF does, while a redirected or piped descriptor keeps whole buffers: the buffered runtime asks `GetConsoleMode` once, so an image with more than one console call imports it beside `GetStdHandle`, `WriteFile` and `ExitProcess`; hello, with one call, still imports the three. `tests/zx_windows_parity_cases.zi` runs a program that prints, works and prints again under a pseudo-terminal on both systems and times its first line.
- `zx2native --platform windows` writes x64 unwind data for every function with a prologue: a `.pdata` `RUNTIME_FUNCTION` and a `.xdata` `UNWIND_INFO` record that walks the pushed frame pointer and the stack allocation. The record starts where the frame does, after an early return that leaves before any frame exists, so a Windows stack walker attributes frames from the first byte.
- `zx2native --target armv7 --platform linux|android` writes a static ARMv7 ELF32 (EM_ARM, EABI5) with its own runtime, matching the AArch64 writer: the entry stub sets the stack limit, calls the initializers and the entry, and ends through the runtime's exit; the console writer is A32 machine code emitted from Ziran source. Both ARM rows run on their devices (Pixel 4a and Moto e6 play) and both report a named gap for a facility they do not carry.
- `zx2native --target aarch64 --platform linux|android` writes a static AArch64 ELF with its own runtime: the entry stub sets the stack limit, calls the initializers and the entry, and ends through the runtime's exit; the console writer is AArch64 machine code emitted from Ziran source. The image resolves every relocation at link time, so it needs no loader. A program that calls a formatter or a host capability is still a named gap.
## [0.8.0] - 2026-11-23
- Build native AArch64 and ARMv7 images with indexed relocation lookup, so each image relocation visits only its own instruction's machine relocations instead of scanning the whole program. Both devices pass the 81-program parity.
- ZX Runner: `make install-user` installs the `zx` command, the `.zx` file type (`application/x-ziran-bundle`, recognized by name and by its `ZX\0\0` header) and a desktop entry that file managers use to open `.zx` files. `zx app.zx` runs any bundle with the toolchain's runtime and hands it to no other program. It first explains a file that is not a ZX program or uses an older or newer ZX format, and names a bundle that needs platform capabilities, such as a window, that the runner does not provide. Started without a terminal, it also shows failures in a dialog.
- Removed `std/rss_scan` (feed item and tag scanning: `FeedNextItem`, `FeedTag`, `FeedCopyText`). The standard library has no replacement; a program that needs it copies `std/rss_scan.zi` from commit c3ef9fb2, the last one that has it, into its own module root.
- Removed `std/http_get_linux` (`GetHttps`, `GetHttpsCapped`). Use `std/net_http`: `SendCapped` with an `HttpRequest` whose `method` is `"GET"`. Commit 4c62f8b8 is the last one that has the old module.
- `#caller_location` names the call site's file relative to its module root, or by its package and the path inside that package, so the same sources build the same output from any folder or package cache.
- ZX embedders can request an active guest stop from another thread, including during initialization and library calls.
- Hosted ZX applications can open from a read callback with a smaller instruction store when running on the portable engine.
- Compile hot packed ZX integer instruction runs on Linux i386 with bounded executable storage and the interpreter's work, fuel and failure locations.
- Speed up large record and array loads in the ZX instruction engine.
- Check public API declarations and examples for a selected backend and platform with `ziran api`.
- Pack checked ZX libraries for explicit OS and CPU targets with `ziran pkg zx pack-ir --locked`.
- Reduce portable ZX integer execution overhead by reusing canonical operands and looking up edge metadata only at branches and jumps.
- Allow instruction-engine hosts to borrow packed read-only scalar slices for synchronous callbacks.
- Add optional bounded progress and cancellation callbacks to PNG/JPEG decoding while preserving the ordinary image readers.
- Add compact/reference instruction-budget parity coverage and retained i386 runtime comparisons; the unproven interpreter optimization candidate was withdrawn before installation.
- The portable ZX engine reuses frame storage for large record and array snapshots with disjoint lifetimes.
- Package locks preserve each dependency's own name and exports when multiple refs select the same local override.
- ZX supports indexing typed pointers. The engine and checked native backends use the backing allocation to reject invalid indices.
- The portable ZX engine can resize a heap block using adjacent free space on both sides, avoiding a replacement allocation when the combined space fits.
- The portable ZX engine reuses storage for temporary derived addresses across branches, so loops can traverse large buffers without filling the address table.
- Native ZX can run with a smaller temporary frame arena when the host cannot reserve 256 MiB of contiguous address space.
- Speed up SHA-256 verification on hosts without SHA instructions.
- Package tested native Ziran toolchains in Gitea by exact source revision and Linux host profile.
- Distribute checked packages as versioned `.zx` libraries for source-free imports in ZX and native builds.
- Publish and fetch verified `.zx` images and checked compiler companions through Gitea. Package locks can discover and pin compatible checked dependencies for source-free ZX builds.
- The engine-only ZX reader can decode directly into compact instruction storage and expand one function at a time for verification and planning.
- Compact ZX execution uses half the storage for value locations when the configured limits fit a signed 32-bit encoding. Larger plans retain 64-bit locations.
- C embedders can use `BundleOpenEngineReadAt` to reduce the engine’s verified instruction storage. A host allocator can release the unused storage through an optional shrink callback.
- C embedders can open seekable ZX app images through `BundleOpenReadAt` without keeping a full input buffer. The callback is needed only during verification, and images with assets, module linkage, or additional attachments use the byte-based API.
- Native x86-64 code copies and clears fixed-size values through 512 bytes with inline vector instructions, takes register hints from actual control-flow predecessors, creates a stackless leaf's frame only when a fuel check traps, and copies only the used members of record snapshots read through constant fields.
- `zx` hosts bundles in-process and gives them files, the clock, arguments and environment, and their own embedded assets (std/guest_files, guest_clock, guest_process, guest_assets); a capability it lacks is named in the error.
- `ziran api --json` exposes optional type-checked, runnable usage examples for public symbols.
- Native instances release temporary frame reservations while idle, so multiple bundles fit in a 32-bit address space without reducing the active frame limit or checked pointer protection.
- Embedders can route instruction-engine ZX output through a per-instance console callback, including output from global initializers.
- In-process native ZX resizes large heap blocks through the allocator instead of always allocating and copying a replacement. Growth remains zero-filled and checked aliases are invalidated even when the address stays the same. The Vectors kernel on Alpha took 38.19 µs instead of 40.04 µs in 11 matched rounds, against 34.07 µs for C.
- Wasm stores can copy a loaded record directly from its source when no intervening effect requires a snapshot. Copies through pointers preserve partially overlapping memory in either direction.
- The shared optimizer resolves calls through known function addresses, gives calls inside loops a larger inlining budget, and restores borrowed input on resource-limited specialization. Standalone ZX tools now rebuild when the specialization module changes.
- Source and saved module graphs can grow beyond 1,024 files, with bounds checked against available addressable storage.
- Platform conditions in modules with file-scope enum imports no longer force an otherwise ordinary import cycle to resolve at compile time.
- Executable ZX identities hash whole byte ranges through the runtime’s shared SHA-256 implementation, including CPU acceleration where supported, instead of feeding a separate hasher one byte at a time. Identity validation and resource limits are unchanged.
- The native disk cache reloads ARMv7 and AArch64 machine images, including the ARMv7 runtime helper relocations. Android apps reuse compiled code across launches.
- ZX lowering turns a range test with literal bounds, such as `code >= 12288 && code <= 12543`, on a stable local, record member or fixed-array element into one unsigned comparison. Kryon's TextIdeographic drops from 55 to 41 instructions, and the Text widget scenario ran faster in Wasm in 8 of 10 alternating Alpha rounds, with the paint result checked on every call.
- Wasm frames hold only the record slots a procedure still uses. A large record read in place, or a zeroed record that is never built, reserves no frame space, so Shovey, whose level replay reads single fields of a 306 KB global, compiles to Wasm instead of exceeding the 8 MB frame limit.
- On x86-64 and aarch64, native console prints read their arguments straight from the saved registers instead of decoding each by type. On Alpha, arrays.zi went from 1.018 to 0.490 µs per call, enums.zi from 0.353 to 0.177, below Wasm, and loops.zi from 1.560 to 0.720.
- Native ZX gathers standard output in the same console buffer as the engine and hands it to stdio once per run, and before standard error, a host capability call or a trap report. On Alpha, arrays.zi went from 1.150 to 1.023 µs per call, enums.zi from 0.392 to 0.360 and loops.zi from 1.780 to 1.600.
- Native host calls resolve each function's capability or platform service once per instance, keep up to eight arguments on the stack instead of allocating them, and format printed integers directly. On Alpha, arrays.zi went from 2.075 to 1.122 µs per call, enums.zi from 0.686 to 0.378 and loops.zi from 3.155 to 1.718.
- `BundleInstanceOptions.unbounded` runs an instance without step metering: native code for it is built without fuel checks, like an unbounded executable, and takes no step limit. The standard and example benchmark hosts use it, as C and Wasm run unmetered. A normal native run now leaves its output to stdio buffering, as the engine does, instead of flushing stdout and stderr on every call. On Alpha, enums.zi went from 1.213 to 0.688 µs per call, arrays.zi from 2.563 to 2.059, score.zi from 0.033 to 0.022, dijkstra by 24% and fannkuch-redux by 14%.
- In-process native ZX no longer makes a system call on every entry: each thread keeps its stack range, and a forked child looks it up again under its own limit. Records & calls (score.zi) went from 0.511 to 0.032 µs per call on Alpha and text_demo.zi from 0.512 to 0.033 µs; arrays, enums and loops took 13–30% less time.
- Fixes: native ARMv7 and AArch64 code reads and changes members of large records and globals in place, as x86-64 code does, instead of copying the whole record into the frame for every access. Shovey's `LevelReplayPump`, whose 12 MB frame stopped it at its frame limit when Play was pressed on an ARMv7 phone, now needs 1.8 MB on every target. A record or array built from zeros is zeroed in one pass instead of one store per member, so Shovey's native code shrinks from 6.4 to 1.4 MB on ARMv7 and from 2.8 to 0.9 MB on x86-64, and its AArch64 build, where one 4.7 MB function put branches out of range, now compiles.
- Native code is verified once: the encoder no longer verifies again a program register allocation just verified, which shortens a phone's on-device compile. The native disk cache now works in Android apps: a library linked without a GNU build ID, as reproducible APKs are, is identified by its code, and an app process caches in its own cache directory, so only the first launch after an install compiles a bundle.
- Fixes: generated C declares a generic procedure's copy for its caller when the copy's signature names a type through the template's own import alias and the caller has a module-scoped import of that name; GCC 14 rejected the call as an implicit declaration (Kryon's text Draw called from Terminal).
- ZX applications can load separately compiled libraries with verified typed imports, independent instances, export inspection and state-preserving replacement. The loader checks dependency graphs and accepts explicit module roots.
- Most of the compiler builds from Ziran source, bootstrapped from generated C seeds: source parsing, module discovery, declaration parsing, compile-time evaluation and condition selection, IR cleanup, the frontend IR, compiler contexts, source documents, diagnostics, paths, semantic IDs, SHA-256 and law checks, the checker (expressions, statements, values, functions, whole programs, generic linking, SIMD rules, borrow analysis), the C and Go backends with their SIMD and x86-64 assembly emitters, the checked IR codec, module loading, locked package resolution, executable ZX asset collection, entry linking for the C, Go and native backends, inline assembly checking and its C emission, and the ZX embedding API (`include/ziran_host.h`). The saved IR format and the C interfaces are unchanged.
- `ziran run app.zx` hands a bundle only to a runtime provider built by the same toolchain: a `.host` registration records `ziran version --identity` on its second line, and a provider of another build is refused with both identities.
- `ziran lock` and `ziran update` refresh checked-library entries saved under another toolchain instead of refusing; builds name the package and `ziran lock`.
- Generated C names a `#program_export` that two linked package revisions define, gives one type application one C type in every module that spells it, and keeps constants, globals and types off the runtime's and libc's names.
- Nested array literals work at file scope and in procedures: `table: [2][2]s64 = .[.[1, 2], .[3, 4]]`.
- Inside a project, `ziran api PACKAGE/MODULE` prints that package module; options may follow the input files, a module name that selects nothing is an error, and text output lists record fields and enum members.
- A syntax or import error says under it that checking stopped there, and a rejected `--bind` says which side is missing or which module already binds the capability.
- Go's `uintptr` is declared with `#type #foreign builtin "uintptr"`.
- New standard modules for Limbo ports: `std/list`, `std/pool`, `std/tuple`, `std/rune_text`, `std/zx_conc` and `std/bundle_guest`. `std/grapheme` answers ASCII text without its tables.
- Two dependencies that name one repository by different URLs share one module namespace under a local override.
## [0.7.0] - 2026-11-18
- Wasm now runs all three Kryon widget scenarios faster than Go, and two of them faster than C: Button takes 2.46 µs, Text 3.59 µs and Input 3.24 µs per two frames on Alpha, against 4.33, 3.89 and 6.59 µs in Go. Wasm code reads a record's fields where the record lies instead of copying it, builds records where their caller or parent keeps them, writes a single changed field in place, and writes zeroed records with wide stores or `memory.fill`. `zx2wasm --unbounded` makes a module with no step budget for runs that need none.
- The optimizer inlines small procedures, reads record members through the inserts that built them, drops unused calls to procedures without side effects, specializes calls that pass a literal Boolean controlling a loop, and turns recursion such as `Fib(n-1) + Fib(n-2)` into an accumulator loop. It hoists fixed member reads, such as a slice's data and count, out of loops and rotates loops whose test loads from memory, so JSON round trips run 9.7% and radix sort 6.8% faster. It also folds interval checks such as `value > 1000 || value < 0` into one unsigned comparison. A Kryon widget's theme lookups become the constants they read.
- Native x86-64 code is faster. Division and remainder by constants use multiplies and shifts, constant shifts use immediates, and floating-point values stay in XMM registers across calls that leave those registers alone. Small blocks are allocated in process, so binary-trees runs in under half the time of the C reference. Functions and loops are aligned, so an unrelated edit no longer moves a loop's speed, and `--checks` builds no longer branch around their traps. Float64 `sqrt` and `std/math.Sqrt` use the hardware square root on x86-64, AArch64 and ARMv7.
- New standard library features: `std/base64` encodes and decodes RFC 4648 base64; `std/jpeg` reads baseline and progressive JPEGs and writes JFIF on every target; `std/png_linux` inflates PNG data portably; `std/finite` has inline `Finite32` and `Finite64`; and `std/parallel` adds `ParallelProcessors` and `ParallelInitLanes`.
- Audio is part of the core standard library, independent of Kryon: mixing, PCM streams, WAV with IMA and Microsoft ADPCM, MP3, and Ogg/Vorbis with streaming and seeking, played through SDL, WebAudio, or AAudio and OpenSL ES on Android.
- Fixes: integers format correctly across the full signed 64-bit range, including the minimum value. The native runtime builds on ARMv7 again. An in-process native run of an entry without a result reports zero. Register allocation no longer copies a register from an unrelated block across a block edge.
- The Targets page on the website compares C, Go, native ZX and Wasm in microseconds, all measured on one physical host at one compiler revision. It covers a 29-workload standard suite with independent C and Go references, Kryon widgets and JSON/UTF-8 workloads, with raw samples and generated code to download.
- Known issue: on ARMv7, native ZX can stop Kryon's `LevelReplayPump` at its frame limit. The fix is not in this release.
## [0.6.0] - 2026-11-16
- Ziran is manually safe like C by default: native x86-64, AArch64 and ARMv7 code, Wasm, generated C and the checks Ziran writes into Go carry no defensive runtime checks, so pointers are addresses and indexes are raw. Build with `--checks` to get every bounds check, pointer token and trap as before, or write `#checks` at the top of a module, before a block or statement, or before one index or slice access to check exactly there. The ZX header records how a bundle was built. The portable engine stays checked.
+621 -223
View File
File diff suppressed because it is too large. Load diff
+48 -109
View File
@@ -1,138 +1,77 @@
# Ziran
Ziran is a general-purpose language with generated C and Go targets and a
portable executable format. The toolchain checks source, saves checked
modules, and builds portable programs you can run without a platform compiler.
Ziran is a general-purpose language with direct native, WebAssembly, portable
ZX, C and Go output. Master includes Unreleased work; the current version is
in [VERSION](VERSION) and [CHANGELOG.md](CHANGELOG.md).
[Website & playground](https://ziran-lang.org/) · [Compiler guide](docs/USAGE.md) · [Implementation status](docs/IMPLEMENTATION_STATUS.md)
The compiler and portable runner are under active development. Language
coverage and target limits are listed in the implementation status.
## Try it
```jai
main :: () {
print("Hello, World!\n");
}
```
Edit and run this example in the [browser playground](https://ziran-lang.org/).
[Website and playground](https://ziran-lang.org/) · [Compiler guide](docs/USAGE.md) · [Current support](docs/IMPLEMENTATION_STATUS.md)
## Quick start
You need Make, a C11 compiler, and GNU binutils. From the repository root:
Build with Make, a C11 compiler and GNU binutils:
```sh
make
build/bin/ziran check examples/hello.zi
build/bin/ziran run examples/hello.zi
build/bin/ziran build examples/hello.zi
```
This prints `Hello, World!`. To install the `ziran` command for your user, run
`make install-user` and add `~/.local/bin` to your `PATH`. Then start a
project from a template and run it:
`run` checks and executes `main`; `build` defaults to a direct native binary.
`make install-user` installs the tools in `~/.local/bin`.
```sh
ziran new hello # or --template lib, or a package's template
cd hello
ziran run -- Ada # Hello, Ada!
```zi
main :: () { print("Hello, World!\n") }
```
See [packages and projects](docs/PACKAGES.md) for templates, dependencies,
and `ziran build`/`install`.
## Tools
## Tools and formats
Use `build/bin/ziran` from the checkout, or `ziran` after installation.
Source → ZIR → LIR → optimized LIR → ZX → native (ELF/PE, x86-64/AArch64/ARMv7).
WebAssembly lowers from verified ZX through `zx2wasm`; C and Go export from ZIR
through `zi2c` and `zi2go`.
| Command | Purpose |
| --- | --- |
| `check` | Validate source and imports. |
| `build` | Generate C or Go output. |
| `ir` / `inspect` | Save checked modules and read their contents. |
| `bundle` / `run` | Build and run portable programs; `run --target=c FILE.zi -- ARGS` runs C-generated scripts. |
| `fmt` | Format source files. |
| `guide` / `features` / `capabilities` | Explore syntax, support, and target limits. |
| `api` | Query public declarations as JSON. |
| `build` | Build native output, or select `--target=c`, `go`, `wasm` or `zx`. |
| `ir` / `inspect` | Save checked `.zir` modules and inspect artifacts. |
| `bundle` / `run` | Link `.zx` executables and run source or ZX. |
| `learn` | Control native-build corpus recording and offline C-teacher verification/training. |
| `fmt` | Format source. |
| `guide` / `features` / `capabilities` | Query syntax and target limits. |
| `api` | Query checked public declarations. |
Source files use `.zi`, checked modules use [`.zir`](docs/ZIR.md), and portable
programs use [`.zx`](docs/ZX.md). Direct-native targets and the portable runner
have different limits.
The experimental direct pipeline is source → `.zir` → linked LIR →
verification → LIR optimization → portable `.zx`. Those verified ZX bytes run
in the portable interpreter
or, on an explicitly supported direct target, lower to machine code and a
platform binary. That direct-native route is experimental and incomplete; its
current gaps are tracked in [the assembly plan](ASSEMBLY/milestones.md).
Generated C and generated Go are separate routes that also produce platform
binaries after their own downstream toolchains run. “Native” in the assembly
documentation means verified ZX instructions lowered directly to machine code,
not a C- or Go-generated binary.
`zx2wasm` (and `ziran build --target=wasm`) lowers the same verified ZX to a
wasm32 module, and the bundle Wasm tier runs bundles in the browser through it;
see [ZX status](docs/ZX.md).
The opt-in Linux x86-64 `zx2native` path now has a first console veneer: its static
ELF owns `_start`, retries partial or interrupted `write` syscalls, and exits
the process with `exit_group`. It links no libc or CRT. Literal `print` formats
cover byte strings/text views, bools, every fixed signed and unsigned integer
width, and `%%`; floats and unavailable platform services are named hard gaps.
This implemented slice does not make the wider direct-native target matrix
complete.
Host capabilities describe portable, typed services a program requires.
Platform bindings implement those services for a host; they are separate from
CPU instruction lowering and from each target's calling convention or syscall
veneer.
Run source as a C-generated script with `ziran task.zi arguments`. Executable
Unix scripts can start with `#!/usr/bin/env ziran`; after `chmod +x task.zi`,
run them as `./task.zi arguments`. See
[C-generated scripts](docs/USAGE.md#c-generated-scripts).
## Standard library
The library includes text and UTF-8 helpers, generic values, sorting, queues,
JSON scanning, ZIP archives, and explicit HTTP and process capabilities.
Native Linux adapters provide file, socket, timer, and other system operations.
See the [standard library reference](https://ziran-lang.org/stdlib.html) and
[compiler guide](docs/USAGE.md#standard-library) for imports and platform limits.
Safety is manual by default, as in C. `--checks` opts a build into runtime
checks; `#checks` keeps bounds checks in selected source regions. See
[checks](docs/USAGE.md#checks) for target-specific behavior.
## Documentation
| Start here | What it covers |
| Read | When you need |
| --- | --- |
| [Compiler guide](docs/USAGE.md) | Commands, imports, foreign functions, and standard modules. |
| [Examples](https://ziran-lang.org/examples.html) | Small programs with source and output. |
| [Implementation status](docs/IMPLEMENTATION_STATUS.md) | Supported features and remaining work. |
| [Architecture](docs/ARCHITECTURE.md) | Compiler, runtime, and library boundaries. |
| [Language direction](docs/LANGUAGE_DIRECTION.md) | Language design and tooling goals. |
| [Jai parity roadmap](docs/JAI_PARITY_ROADMAP.md) | Planned language work. |
| [Benchmarks](bench/README.md) | Compiler and runtime measurements. |
| [Migration](docs/MIGRATION.md) | Repository migration details. |
| [docs/USAGE.md](docs/USAGE.md) | The compiler and standard library guide |
| [docs/IMPLEMENTATION_STATUS.md](docs/IMPLEMENTATION_STATUS.md) | Supported targets and limits |
| [docs/PACKAGES.md](docs/PACKAGES.md) | Packages, projects, and lock files |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | The compiler pipeline |
| [docs/LANGUAGE_DIRECTION.md](docs/LANGUAGE_DIRECTION.md) | Language syntax and directives |
| [docs/OWNED_VALUES.md](docs/OWNED_VALUES.md) | Owned values and recoverable failures |
| [docs/DIAGNOSTICS.md](docs/DIAGNOSTICS.md) | Diagnostic codes and JSON output |
| [docs/AUTHORING.md](docs/AUTHORING.md) | Tool-driven editing workflows |
| [docs/LAWS.md](docs/LAWS.md) | Laws and proof certificates |
| [docs/ZX.md](docs/ZX.md) | The portable ZX format |
| [bench/README.md](bench/README.md) | Running benchmarks |
| [plans/open-work.md](plans/open-work.md) | What is still open |
Kryon is a separate UI library that applications import explicitly.
Standard library and package APIs: [ziran-lang.org/modules.html](https://ziran-lang.org/modules.html).
Kryon is a separate UI library imported by applications; console programs have
no graphics dependency. Repository rules for agents live in
[AGENTS.md](AGENTS.md).
## Development
Run `make check` for the complete lean language, backend, and portable runtime
suite. Pruning removed 263 redundant check scripts and their unused helpers.
Workers follow the build queue's allocation; set `CHECK_JOBS=1` to run serially.
The check controller and its regression tests are written in Ziran.
The native command and formatter are written in Ziran. Compiler scanners,
declaration, foreign binding, and `using` modifier syntax, enum validation and
evaluation, type spelling and field parsing, expression and nested initializer
grammar, statement expression extraction, loop headers, optional `then`, and
compile-time branch syntax are also written in Ziran. Ziran also parses multiple
results and bindings, normalizes procedure-type parameters, expands formatted
builder statements, and rewrites
symmetric operators, procedure-name expressions, and local procedure names.
The rest of the compiler is still being migrated from C.
A fresh build uses the generated modules in `bootstrap/` to build a bootstrap
compiler, then compiles their maintained `cmd/compiler_*.zi` sources for the
ordinary tools. Run
`make check-bootstrap` to verify that the generated seed matches the source.
After changing a compiler module, use `make update-bootstrap` to refresh its seed.
Run `make check` for the retained local suite and `make check-bootstrap` for
bootstrap reproducibility. `CHECK_FILTER=text` selects matching tests. The
compiler uses maintained Ziran and C sources; bootstrap seeds live in
`bootstrap/`. Refresh affected seeds with `make update-bootstrap` after
compiler changes.
+1 -1
View File
@@ -1 +1 @@
0.6.0
0.9.0
+24 -13
View File
@@ -1,12 +1,14 @@
ASSEMBLY_C := $(BUILD_DIR)/compiler-assembly
ASSEMBLY_MACHINE_SOURCES := cmd/compiler_target.zi cmd/compiler_machine_image.zi cmd/compiler_abi.zi cmd/compiler_machine_ir.zi \
ASSEMBLY_MACHINE_SOURCES := cmd/compiler_vector_form.zi cmd/compiler_vectorize.zi cmd/compiler_vector_x86.zi \
cmd/compiler_target.zi cmd/compiler_machine_image.zi cmd/compiler_abi.zi cmd/compiler_machine_ir.zi \
cmd/compiler_machine_verify.zi cmd/compiler_machine_aggregate.zi cmd/compiler_machine_fields.zi cmd/compiler_machine_select.zi cmd/compiler_machine_lower.zi \
cmd/compiler_machine_verify_allocated.zi cmd/compiler_regalloc.zi cmd/compiler_x86_bytes.zi cmd/compiler_x86_64.zi cmd/compiler_x86_runtime.zi \
cmd/compiler_x86_win64.zi cmd/compiler_x86_host.zi cmd/compiler_x86_image.zi \
cmd/compiler_aarch64.zi cmd/compiler_armv7.zi \
cmd/compiler_encode.zi cmd/compiler_aarch64.zi cmd/compiler_aarch64_runtime.zi cmd/compiler_aarch64_elf.zi cmd/compiler_armv7.zi cmd/compiler_armv7_runtime.zi cmd/compiler_armv7_elf.zi \
cmd/compiler_arm_bytes.zi \
cmd/compiler_machine_elf.zi cmd/compiler_machine_pe.zi cmd/compiler_machine_pipeline.zi cmd/compiler_native_cache.zi
ASSEMBLY_SOURCES := cmd/compiler_bundle.zi cmd/compiler_lowered_ir.zi cmd/compiler_lowered_verify.zi cmd/compiler_lowered_proven.zi cmd/compiler_zir_lower.zi cmd/compiler_exec_serial.zi cmd/compiler_exec_debug.zi cmd/compiler_exec_link.zi cmd/compiler_exec.zi cmd/compiler_opt.zi $(ASSEMBLY_MACHINE_SOURCES)
ASSEMBLY_SOURCES := std/math.zi cmd/compiler_bundle.zi cmd/compiler_lowered_ir.zi cmd/compiler_lowered_verify.zi cmd/compiler_lowered_proven.zi cmd/compiler_zir_lower.zi cmd/compiler_zx_run.zi cmd/compiler_exec_serial.zi cmd/compiler_exec_debug.zi cmd/compiler_exec_link.zi cmd/compiler_exec.zi cmd/compiler_opt.zi cmd/compiler_opt_ssa.zi cmd/compiler_opt_rotate.zi cmd/compiler_opt_loop.zi cmd/compiler_opt_licm.zi cmd/compiler_opt_induction.zi cmd/compiler_opt_layout.zi cmd/compiler_opt_inline.zi cmd/compiler_opt_specialize.zi cmd/compiler_opt_thread.zi cmd/compiler_opt_accumulate.zi cmd/compiler_opt_dom.zi cmd/compiler_learning.zi cmd/compiler_learning_policy.zi cmd/compiler_learning_table.zi $(ASSEMBLY_MACHINE_SOURCES)
ASSEMBLY_SOURCES += std/finite.zi
ifneq ($(BOOTSTRAP),1)
ifeq ($(NATIVE_HOST_ENABLED),1)
@@ -14,9 +16,9 @@ ifeq ($(NATIVE_HOST_ENABLED),1)
# CFLAGS would also reach the prerequisites make builds for it, zi2c among
# them, where the set's own math.h and vec.h would shadow the real ones;
# `private` prevents that but needs GNU Make 3.82, and macOS ships 3.81.
$(foreach source,cmd/zir/zir_host_native.c cmd/zir/zir_host_native_armv7.c,\
$(foreach source,bootstrap/runtime/zir_host_native.c bootstrap/runtime/zir_host_native_armv7.c,\
$(eval $(call obj,$(source))_CFLAGS += -I$(ASSEMBLY_C)))
$(call obj,cmd/zir/zir_host_native.c cmd/zir/zir_host_native_armv7.c): $(ASSEMBLY_C)/.generated
$(call obj,bootstrap/runtime/zir_host_native.c bootstrap/runtime/zir_host_native_armv7.c): $(ASSEMBLY_C)/.generated
endif
endif
@@ -32,7 +34,7 @@ $(ASSEMBLY_C)/.ran: assembly.mk $(ASSEMBLY_SOURCES) $(GEN_ZI2C)
rm -rf $(BUILD_DIR)/compiler-assembly.next
env -u DISPLAY -u WAYLAND_DISPLAY $(GEN_ZI2C) --no-main --root cmd -o $(BUILD_DIR)/compiler-assembly.next \
cmd/compiler_lowered_verify.zi cmd/compiler_zir_lower.zi cmd/compiler_exec_serial.zi cmd/compiler_exec_link.zi cmd/compiler_exec.zi cmd/compiler_opt.zi \
cmd/compiler_machine_pipeline.zi cmd/compiler_native_cache.zi
cmd/compiler_machine_pipeline.zi cmd/compiler_native_cache.zi cmd/compiler_zx_run.zi
@mkdir -p $(ASSEMBLY_C); changed=; \
for f in $(BUILD_DIR)/compiler-assembly.next/*; do \
cmp -s "$$f" "$(ASSEMBLY_C)/$${f##*/}" || { cp "$$f" $(ASSEMBLY_C)/; changed=1; }; done; \
@@ -57,11 +59,13 @@ $(BUILD_DIR)/obj/assembly-core.o: assembly.mk $(ASSEMBLY_C)/.generated $(BUILD_D
# engine, including its own compiler_bundle symbols. Keep the native machine
# pipeline in a separate relocatable object so linking libziran cannot pull in a
# second copy of those public symbols from assembly-core.o.
ASSEMBLY_NATIVE_MODULES := compiler_abi compiler_machine_image \
ASSEMBLY_NATIVE_MODULES := compiler_vector_form compiler_vectorize compiler_vector_x86 compiler_opt_ssa \
compiler_abi compiler_machine_image \
compiler_machine_ir compiler_machine_verify \
compiler_machine_aggregate compiler_machine_fields compiler_machine_select compiler_machine_lower compiler_machine_verify_allocated compiler_regalloc \
compiler_target compiler_x86_bytes compiler_x86_64 compiler_x86_runtime compiler_aarch64 compiler_armv7 \
compiler_target compiler_learning compiler_learning_policy compiler_x86_bytes compiler_x86_64 compiler_x86_runtime compiler_encode compiler_aarch64 compiler_aarch64_runtime compiler_aarch64_elf compiler_armv7 compiler_armv7_runtime compiler_armv7_elf \
compiler_x86_win64 compiler_x86_host compiler_x86_image \
compiler_x86_archive \
compiler_arm_bytes \
compiler_machine_elf compiler_machine_pe \
compiler_machine_pipeline \
@@ -78,11 +82,18 @@ $(BUILD_DIR)/obj/native-core.o: assembly.mk $(ASSEMBLY_C)/.generated $(ENGINE_NA
objects="$$objects $$object"; \
done; $(CC) -r -nostdlib -o $@ $$objects
$(call obj,cmd/zx2native/main.c cmd/zi2zx/zx_exec_run.c cmd/zi2zx/main.c): $(BUILD_DIR)/obj/%.o: %.c $(ASSEMBLY_C)/.generated $(BUILD_DIR)/.compiler-flags $(IR_READY)
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(FRAMEFLAGS) $(DEPFLAGS) -I$(ASSEMBLY_C) -Icmd/zi2zx -Icmd/zx2wasm -c -o $@ $<
# zx2native's driver is Ziran (cmd/zx2native.zi); the generated copy uses the
# assembly set's own headers and links its unprefixed entry points.
ZX2NATIVE_C := $(BUILD_DIR)/zx2native-c
$(ZX2NATIVE_C)/.generated: cmd/zx2native.zi cmd/compiler_cli.zi cmd/compiler_ir.zi \
$(BUILD_DIR)/compiler-assembly/.generated $(BIN_DIR)/zi2c
$(BIN_DIR)/zi2c --entry zx2native:main --root cmd --module-path std -o $(ZX2NATIVE_C) cmd/zx2native.zi
touch $@
$(ZX2NATIVE_C)/%.c: $(ZX2NATIVE_C)/.generated
@test -f $@
$(BIN_DIR)/zx2native: $(call obj,cmd/zx2native/main.c cmd/zi2zx/zx_exec_run.c) \
$(BIN_DIR)/zx2native: $(ZX2NATIVE_C)/zx2native.c \
$(BUILD_DIR)/obj/assembly-core.o $(BUILD_DIR)/libziran.a | $(BIN_DIR)
$(CC) $(CFLAGS) -o $@ $^ $(RUNTIME_LIBS)
$(NICE) $(CC) $(CFLAGS) -I$(ZX2NATIVE_C) -I$(BUILD_DIR)/compiler-assembly -o $@ \
$(ZX2NATIVE_C)/zx2native.c $(BUILD_DIR)/obj/assembly-core.o $(BUILD_DIR)/libziran.a $(RUNTIME_LIBS)
chmod 755 $@
+18
View File
@@ -24,6 +24,24 @@ benchmark on the current desktop. Record the host in every report and collect
both sides of a comparison on the same host; retained desktop results keep
their original provenance.
## Standard benchmarks and the host gate
`bench/standard/README.md` describes the standard language benchmarks
(`wasm-tier --standard`, `--standard-full` for the Benchmarks Game sizes) and
`standard-compile`. Anything the site's kernel or standard tables publish is
measured with `--host-gate`: each measured job runs on one logical CPU of the
quietest core, inherited by the child so no wrapper process adds time, with Go
at `GOMAXPROCS=1`. A poller on the other cores reads that CPU's
`scaling_cur_freq` every 10 ms and the sibling's busy time. A job is kept only
if its 10th to 90th percentile clock is within 3% of its median, the median
reaches 95% of the clock calibrated at start, and the hyperthread sibling is
busy at most 15% of the job; otherwise it runs again (up to eight attempts),
and rejected attempts stay in the receipt with their observations. The site
generators refuse receipts without it. Alpha's powersave/HWP clock otherwise
moves between 0.8 and 4.3 GHz and run time follows it
(`results/records-native-frequency-alpha-2026-11-16.json`). Compile-time builds
are not pinned.
Timed compiler/codec kernels are an explicit benchmark command, outside
`make check`: `build/bin/ziran run --target=c bench/bench.zi -- compiler-kernels` on Alpha.
Routine tests still validate benchmark statistics and command interfaces.
+1 -1
View File
@@ -115,7 +115,7 @@ func benchKernel(n int64, seed uint64) uint64 {
'AR='+str(ndk/'llvm-ar'), 'OBJCOPY='+str(ndk/'llvm-objcopy'),
'CFLAGS=-O2 -fPIC', library], env, cwd=ROOT)
execute([cc, '-O2', '-std=c11', '-D_GNU_SOURCE', '-I'+str(ROOT/'include'),
'-I'+str(ROOT/'cmd/zir'), '-I'+str(ROOT/'bootstrap/compiler_ir'), ROOT/'bench/vm_startup.c', library, '-lm', '-pthread',
'-I'+str(ROOT/'bootstrap/runtime'), '-I'+str(ROOT/'bootstrap/compiler_ir'), ROOT/'bench/vm_startup.c', library, '-lm', '-pthread',
'-o', out/'vm-runner'], env)
data = dict(schema=1, created_utc=time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()),
abi=args.abi, small=args.small, large=args.large, seed=SEED,
+88
View File
@@ -0,0 +1,88 @@
// Read a valid executable with a synthetic binary asset, at the small and
// 75 MB package sizes. Compile and run only on Alpha's physical host:
// LDLIBS="$PWD/build/libziran.a" build-queue -- ziran build --target=c --exe --entry asset_digest:main --root bench --module-path cmd \
// -o build/asset-digest bench/asset_digest.zi
// build-queue -- build/asset-digest/asset_digest
// Each JSON line retains all 11 read samples, with one untimed warmup.
#import "std/timer_linux"
using Bundle :: #import "compiler_bundle"
using Link :: #import "compiler_exec_link"
using Lir :: #import "compiler_lowered_ir"
using Vectors :: #import "std/vec"
Measure :: (program: Lir.LirProgram, count: s64) -> bool {
payload: Vec(u8)
if !VecResize(payload, count) { return false }
defer VecFree(payload)
for index: 0..count - 1 { payload[index] = cast(u8)(index * 37 + 11) }
assets: [1]Bundle.Asset = .{.{name = "data/payload.bin", data = TextView(payload[:])}}
empty: []u8
measured := Link.ZxExecWrite(program, assets[:], empty)
encoded: Vec(u8)
if measured.problem != .None || !VecResize(encoded, measured.size) ||
Link.ZxExecWrite(program, assets[:], encoded[:]).problem != .None { return false }
defer VecFree(encoded)
decoded_assets: [1]Bundle.Asset
layout := Bundle.ExecutableDecode(TextView(encoded[:]), decoded_assets[:])
if layout.problem != .None { return false }
identity: [32]u8
samples: [11]s64
for round: 0..11 {
owner: Link.ZxExecOwner
began := MonotonicNanoseconds()
read := Link.ZxExecRead(*owner, TextView(encoded[:]), Lir.LirDefaultLimits())
elapsed := MonotonicNanoseconds() - began
if read.problem != .None || !owner.valid || owner.assets != 1 {
Link.ZxExecReadFree(*owner)
return false
}
if round == 0 { identity = owner.identity }
else {
for index: 0..31 {
if identity[index] != owner.identity[index] { Link.ZxExecReadFree(*owner); return false }
}
samples[round - 1] = elapsed
}
Link.ZxExecReadFree(*owner)
}
print("{\"asset_bytes\":%,\"bundle_bytes\":%,\"identity\":[", count, measured.size)
for index: 0..31 {
if index > 0 { print(",") }
print("%", identity[index])
}
print("],\"assets_identity\":[")
for index: 0..31 {
if index > 0 { print(",") }
print("%", layout.assets_identity[index])
}
print("],\"content_identity\":[")
for index: 0..31 {
if index > 0 { print(",") }
print("%", layout.content_identity[index])
}
print("],\"samples_ns\":[")
for index: 0..10 {
if index > 0 { print(",") }
print("%", samples[index])
}
print("]}\n")
return true
}
main :: () -> s32 {
types: [2]Lir.LirType = .{.{kind = .Void}, .{kind = .Integer, bits = 32, is_signed = true}}
modules: [1]string = .{"asset-digest"}
constants: [1]Lir.LirConstant = .{.{type = 1, bits = 42}}
values: [1]s32 = .{1}
returned: [1]s32 = .{0}
instructions: [2]Lir.LirInstruction
instructions[0] = .{op = .Constant, result = 0, symbol = 0, origin = -1}
instructions[1] = .{op = .Return, result = -1, operands = returned[:], symbol = -1, origin = -1}
blocks: [1]Lir.LirBlock = .{.{instructions = instructions[:]}}
functions: [1]Lir.LirFunction = .{.{module = 0, name = "main", result = 1,
values = values[:], blocks = blocks[:], entry = 0, origin = -1}}
program := Lir.LirProgram.{version = Lir.LirVersion, modules = modules[:],
types = types[:], constants = constants[:], functions = functions[:], entry = 0}
if !Measure(program, 1000000) || !Measure(program, 75000000) { return 1 }
return 0
}
+29 -7
View File
@@ -35,6 +35,8 @@ Benchmark :: struct {
runner: Runner
place: Place
summary: string
module_path: string
compiler_library: bool
}
// A bare name removes the variable from the driver's environment.
@@ -42,16 +44,19 @@ BENCH_ENVIRONMENT: [9]string = .["DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", "DB
"SESSION_MANAGER", "XDG_SESSION_ID", "XDG_SESSION_TYPE", "ZIRAN_PROFILE", "ZIRAN_LEARN=off"];
// Files in bench/ that a registered benchmark builds or imports.
SUPPORT_FILES: [7]string = .["bench.zi", "benchmark_statistics.zi", "codec_kernels.py", "json_document.zi",
"math_sqrt.zi", "native_cache_fixture.zi", "wasm_tier.zi"];
SUPPORT_FILES: [15]string = .["bench.zi", "benchmark_statistics.zi", "standard_compile_entry.zi", "standard_cases.zi", "codec_kernels.py", "json_document.zi",
"math_sqrt.zi", "native_cache_fixture.zi", "wasm_tier.zi", "c_teacher_assembly.zi", "c_teacher_profile.zi", "c_teacher_rules.zi", "rill_row.zi", "zx_i386_blocks.zi", "zx_aggregate_load.zi"];
Add :: (list: *Vec(Benchmark), name: string, file: string, runner: Runner, place: Place, summary: string) {
unused VecPush(list.*, Benchmark.{.name = name, .file = file, .runner = runner, .place = place, .summary = summary})
Add :: (list: *Vec(Benchmark), name: string, file: string, runner: Runner, place: Place, summary: string,
module_path: string = "", compiler_library: bool = false) {
unused VecPush(list.*, Benchmark.{.name = name, .file = file, .runner = runner, .place = place, .summary = summary,
.module_path = module_path, .compiler_library = compiler_library})
}
Registry :: () -> Vec(Benchmark) {
list: Vec(Benchmark)
Add(*list, "android-execution", "bench/android_execution.py", .Python, .Device, "cross-built kernels on one Android device")
Add(*list, "asset-digest", "bench/asset_digest.zi", .Ziran, .Host, "checked executable asset digest throughput", "cmd", true)
Add(*list, "assembly", "bench/assembly.py", .Python, .Host, "assembly, portable fallback, C, Go and the ZX engine")
Add(*list, "assembly-collect", "bench/assembly_collect.zi", .Ziran, .Host, "strict assembly comparison receipts")
Add(*list, "assembly-compare", "bench/assembly_compare.zi", .Ziran, .Report, "compare collected assembly receipts")
@@ -59,6 +64,11 @@ Registry :: () -> Vec(Benchmark) {
Add(*list, "bundle-assets", "bench/bundle_assets.py", .Python, .Host, "checked resource loading with real bundles")
Add(*list, "bundle-instances", "bench/bundle_instances.py", .Python, .Host, "bundle loading and fresh-instance costs")
Add(*list, "compiler-build", "bench/compiler_build.zi", .Ziran, .Host, "full native compiler rebuild")
Add(*list, "standard-compile", "bench/standard_compile.zi", .Ziran, .Host, "complete standard suite builds in C, Go, generated C, native ZX and Wasm")
Add(*list, "standard-ab", "bench/standard_ab.zi", .Ziran, .Host, "shuffled C and in-process ZX native runners on the standard suite")
Add(*list, "standard-profile", "bench/standard_profile.zi", .Ziran, .Host, "SIGPROF samples of an in-process standard runner by function")
Add(*list, "c-teacher", "bench/c_teacher.zi", .Ziran, .Host, "generated C versus native assembly and SIGPROF")
Add(*list, "c-teacher-tune", "bench/c_teacher_tuning.zi", .Ziran, .Host, "offline leaf policies against generated C")
Add(*list, "compiler-kernels", "bench/compiler_kernel_benchmarks.sh", .Shell, .Host, "timed compiler and codec kernels")
Add(*list, "compiler-scaling", "bench/compiler_scaling.py", .Python, .Host, "module graphs and generic specialization")
Add(*list, "cpu-features", "bench/cpu_features.py", .Python, .Host, "CPU-selected assembly against fallbacks")
@@ -74,7 +84,9 @@ Registry :: () -> Vec(Benchmark) {
Add(*list, "native-builds", "bench/native_builds.py", .Python, .Host, "complete native builds against C and Go")
Add(*list, "native-header-graphs", "bench/native_header_graphs.py", .Python, .Host, "native builds with a dense record ABI")
Add(*list, "native-probe", "bench/native_probe.py", .Python, .Host, "native builds with interleaved probes")
Add(*list, "native-resize-ab", "bench/native_resize_ab.py", .Python, .Host, "matched frozen native runtimes on scalar and vector kernels")
Add(*list, "reachable-types", "bench/reachable_types.py", .Python, .Host, "qualified type-graph lookup")
Add(*list, "rill-compact", "bench/rill_compact.zi", .Ziran, .Host, "checked row memory operations in compact and full-plan engines", "cmd")
Add(*list, "record-calls", "bench/record_calls.py", .Python, .Host, "record values and calls across backends")
Add(*list, "smoke", "bench/smoke.py", .Python, .Host, "cross-target smoke, startup included")
Add(*list, "text-scan", "bench/text_scan.py", .Python, .Host, "UTF-8 scanning across backends")
@@ -85,11 +97,14 @@ Registry :: () -> Vec(Benchmark) {
Add(*list, "vm-execution", "bench/vm_execution.py", .Python, .Host, "verified engine execution")
Add(*list, "vm-native", "bench/vm_native.py", .Python, .Host, "engine workloads against generated C and Go")
Add(*list, "vm-startup", "bench/vm_startup.py", .Python, .Host, "checked loading and engine preparation")
Add(*list, "wasm-tier", "bench/wasm_tier.py", .Python, .Host, "native and Wasm against the engine and C")
Add(*list, "wasm-tier", "bench/wasm_tier.py", .Python, .Host, "native/Wasm kernels; --standard adds independent C/Go references")
Add(*list, "widget-native", "bench/widget_native.py", .Python, .Host, "matched frozen public Kryon Text, Input and Button scenarios")
Add(*list, "widget-profile", "bench/widget_profile.zi", .Ziran, .Host, "SIGPROF of warmed public widget scenarios")
Add(*list, "zx-compare", "bench/zx_compare.zi", .Ziran, .Host, "ZX runtime comparison cohorts")
Add(*list, "zx-compare-devices", "bench/zx_compare.py", .Python, .Device, "ZX comparison on Alpha or a USB phone")
Add(*list, "zx-engine", "bench/zx_engine.zi", .Ziran, .Host, "instruction engine against the C target")
Add(*list, "zx-execution", "bench/zx_execution.zi", .Ziran, .Host, "warm execution of the matrix's bundles")
Add(*list, "zx-host-slice", "bench/benchmark_zx_host_slice.py", .Python, .Host, "matched i386 host slices, integer blocks and aggregate loads")
return list
}
@@ -193,7 +208,8 @@ Run :: (repo: string, item: Benchmark, extra: []string, local: bool) -> s32 {
if item.runner == .Ziran {
ziran := TextDetach(JoinPath(repo, "build/bin/ziran"))
if !IsFile(ziran) { print("build the toolchain first: make\n"); return 2 }
prefix := string.[ziran, "run", "--target=c", "--root", TextDetach(JoinPath(repo, "bench")), "--module-path", repo,
modules := ifx item.module_path == "" then repo else TextDetach(JoinPath(repo, item.module_path))
prefix := string.[ziran, "run", "--target=c", "--root", TextDetach(JoinPath(repo, "bench")), "--module-path", modules,
TextDetach(JoinPath(repo, item.file)), "--"]
for part: prefix { unused VecPush(command, part) }
} else {
@@ -204,8 +220,14 @@ Run :: (repo: string, item: Benchmark, extra: []string, local: bool) -> s32 {
for part: extra { unused VecPush(command, part) }
mode := ifx local then "local, not a measurement" else PlaceName(item.place)
print("benchmark % on % (virtualization %, %)\n", item.name, host, virtualization, mode)
environment: Vec(string)
for variable: BENCH_ENVIRONMENT { unused VecPush(environment, variable) }
if item.compiler_library {
libraries := Concat(Concat(EnvironmentText("LDLIBS"), " "), TextDetach(JoinPath(repo, "build/libziran.a")))
unused VecPush(environment, Concat("LDLIBS=", libraries))
}
options: ProcessOptions = .{arguments = VecSlice(command, 0, command.count), directory = repo,
environment = BENCH_ENVIRONMENT[:]}
environment = environment[:]}
// The header reaches the terminal before anything the driver prints.
unused FlushAll(null)
run: ProcessRun
+88
View File
@@ -0,0 +1,88 @@
"""Measure ZX execution with matched Linux/i386 archives on physical Alpha."""
import argparse
import hashlib
import json
import os
from pathlib import Path
import platform
import socket
import subprocess
import sys
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
from benchmark_samples import HostGate, summarize_samples
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('loader', type=Path)
parser.add_argument('libraries', type=Path)
parser.add_argument('inputs', type=Path)
parser.add_argument('output', type=Path)
parser.add_argument('--hot-blocks', action='store_true', help='Use the integer fixture in place of host slices')
parser.add_argument('--aggregate-loads', action='store_true', help='Also measure 32 KiB aggregate snapshots')
args = parser.parse_args()
host = socket.gethostname()
virtualization = subprocess.run(['systemd-detect-virt'], text=True, capture_output=True).stdout.strip()
if host.split('.')[0] != 'alpha' or virtualization != 'none':
parser.error('A physical Alpha host is required')
inputs = args.inputs.resolve()
gate = HostGate()
workloads = [('integer-blocks', 113475636, 'engine', False)] if args.hot_blocks else [
('small', 0x235689BC, 'slice', True), ('large', 0x235689BC, 'slice', True),
]
if args.aggregate_loads:
workloads.append(('aggregate-load', 499008, 'engine', False))
workloads.extend([
('rill-row', 1622073797, 'engine', False),
('sieve', 2262, 'engine', False),
('records', 68788, 'engine', False),
])
order = ('baseline', 'candidate', 'candidate', 'baseline',
'candidate', 'baseline', 'baseline', 'candidate')
receipt = {'host': host, 'virtualization': virtualization, 'kernel': platform.release(),
'gate': gate.describe(), 'order': order, 'sha256': {}, 'workloads': {}}
for artifact in sorted(inputs.iterdir()):
if artifact.is_file():
with artifact.open('rb') as stream:
receipt['sha256'][artifact.name] = hashlib.file_digest(stream, 'sha256').hexdigest()
def save():
temp = args.output.with_suffix('.tmp')
temp.write_text(json.dumps(receipt, indent=2) + '\n')
temp.replace(args.output)
for workload, expected, driver, borrow in workloads:
attempts = []
samples = {'baseline': [], 'candidate': []}
receipt['workloads'][workload] = {'attempts': attempts, 'summaries': {}}
for variant in order:
env = dict(os.environ)
env.pop('MATRIX_BORROW_SLICE', None)
if borrow and variant == 'candidate':
env['MATRIX_BORROW_SLICE'] = '1'
command = [args.loader, '--library-path', args.libraries,
inputs / f'{variant}-{driver}', inputs / f'{workload}.zx', str(expected), '15']
for _ in range(gate.ATTEMPTS):
measurement, observation = gate.observe(lambda: json.loads(
subprocess.check_output(command, env=env, text=True)))
rejection = gate.rejection(observation)
attempts.append(dict(variant=variant, borrowed=borrow and variant == 'candidate',
measurement=measurement, host_gate=observation, rejection=rejection))
save()
print(f'{workload} {variant} cpu{gate.cpu}: {rejection or "accepted"}', flush=True)
if rejection is None:
samples[variant].extend(ms / measurement['batches'] for ms in measurement['batch_samples_ms'])
break
gate.choose_core()
else:
raise SystemExit('Host gate rejected every attempt')
result = receipt['workloads'][workload]
result['summaries'] = {variant: summarize_samples(values) for variant, values in samples.items()}
result['speedup'] = result['summaries']['baseline']['median_ms'] / result['summaries']['candidate']['median_ms']
save()
if __name__ == '__main__':
main()
+407
View File
@@ -0,0 +1,407 @@
// Compare generated C with the native pipeline using identical checked input.
// Run only through bench/bench.zi; all compilation and sampling shares its
// learning-off environment and the caller's build-queue reservation.
#import "c_teacher_assembly"
#import "c_teacher_profile"
#import "c_teacher_rules"
#import "std/byte_text_linux"
#import "std/environment_linux"
#import "std/file"
#import "std/file_tree_linux"
#import "std/json_document"
#import "std/number_text"
#import "std/process_run_linux"
#import "std/text_tools"
using Vectors :: #import "std/vec"
#scope_file
Case :: struct { name: string; bundle: string; cdir: string; symbol: string; header: string; expected: s32; printing: bool; checksum: string }
Finding :: struct { workload: string; compiler: string; name: string; native: TeacherMetrics; teacher: TeacherMetrics; samples: s64; total: s64; score: s64 }
Join :: (a: string, b: string) -> string { parts := string.[a, b]; return TextDetach(TextJoin(parts[:], "")) }
Number :: (n: s64) -> string { bytes: [32]u8; return Join("", FormatInteger(n, bytes[:])) }
Field :: (d: *JsonDocument, node: s32, key: string) -> string { return TextDetach(JsonString(d, JsonMember(d, node, key))) }
Integer :: (d: *JsonDocument, node: s32, key: string) -> s64 { n, ok := JsonInteger(d, JsonMember(d, node, key)); return ifx ok then n else -1 }
Capture :: (args: []string) -> (text: string, code: s32) {
run: ProcessRun
options: ProcessOptions = .{arguments = args, capture_output = true, merge_error = true}
if !RunProcess(options, *run) { return "could not start child", 127 }
return TextDetach(BuilderFinish(run.output)), run.code
}
Require :: (args: []string) -> bool {
text, code := Capture(args)
if code != 0 { print("command failed (%): %\n%\n", code, TextJoin(args, " "), text); return false }
return true
}
Sources :: (directory: string, suffix: string, files: *Vec(string)) {
names: Vec(string)
if !ListDirectory(directory, *names) { return }
for name: names {
path := TextDetach(JoinPath(directory, name))
if IsDirectory(path) { Sources(path, suffix, files) }
else if TextHasSuffix(path, suffix) { unused VecPush(files.*, path) }
}
}
Hash :: (path: string) -> string {
command := string.["sha256sum", path]
text, code := Capture(command[:])
return ifx code == 0 && text.count >= 64 then text[:64] else "unavailable"
}
Clang :: () -> string {
candidates := string.["clang", "clang-22", "clang-21", "clang-20", "clang-19", "clang-18", "clang-17"]
for candidate: candidates {
command := string.[candidate, "--version"]
version, code := Capture(command[:])
if code == 0 { return candidate }
}
return ""
}
Metrics :: (m: TeacherMetrics) -> string {
values := s64.[m.instructions, m.loop_instructions, m.back_edges, m.stack_reads, m.stack_writes,
m.memory, m.indexed, m.branches, m.forward_branches, m.calls, m.vectors, m.multiplies, m.divides, m.shifts, m.loop_constants]
parts: Vec(string)
for value: values { unused VecPush(parts, Number(value)) }
return TextDetach(TextJoin(VecSlice(parts, 0, parts.count), "/"))
}
Patterns :: (n: TeacherMetrics, c: TeacherMetrics) -> string {
patterns: Vec(string)
if n.stack_reads + n.stack_writes > c.stack_reads + c.stack_writes { unused VecPush(patterns, "stack traffic (regalloc/aggregate lane)") }
if n.branches > c.branches { unused VecPush(patterns, "branch layout/loop rotation (SSA lane)") }
if n.calls > c.calls { unused VecPush(patterns, "calls/inlining candidates") }
if n.multiplies + n.divides > c.multiplies + c.divides { unused VecPush(patterns, "strength reduction candidates") }
if n.loop_constants > c.loop_constants { unused VecPush(patterns, "loop constants/LICM candidates") }
if c.vectors > n.vectors { unused VecPush(patterns, "vector idioms (inspect scalar SSE uses)") }
if n.memory > c.memory { unused VecPush(patterns, "memory/address folding candidates") }
return TextDetach(TextJoin(VecSlice(patterns, 0, patterns.count), "; "))
}
SaveProfile :: (path: string, profile: *TeacherProfile, digest: string) -> bool {
document: JsonDocument
defer JsonReset(*document)
root := JsonNewObject(*document)
JsonSet(*document, root, "artifact_sha256", JsonNewStringCopy(*document, digest))
JsonSet(*document, root, "samples", JsonNewInteger(*document, profile.total))
JsonSet(*document, root, "runs", JsonNewInteger(*document, profile.runs))
ips := JsonNewArray(*document)
JsonSet(*document, root, "ips", ips)
for sample: profile.samples {
ip := JsonNewObject(*document)
JsonSet(*document, ip, "address", JsonNewInteger(*document, cast(s64)sample.address))
JsonSet(*document, ip, "count", JsonNewInteger(*document, sample.count))
unused JsonAppend(*document, ips, ip)
}
return WriteEntireFile(path, TextDetach(JsonWrite(*document, root, JsonPythonStyle(2))))
}
Append :: (text: *Vec(u8), value: string) { BuilderAppend(text.*, value) }
Line :: (text: *Vec(u8), value: string) { Append(text, value); Append(text, "\n") }
Row :: (text: *Vec(u8), cells: []string) {
Append(text, "| "); Append(text, TextDetach(TextJoin(cells, " | "))); Line(text, " |")
}
LoopSummary :: (code: []TeacherInstruction, begin: s64, end: s64, base: s64, profile: *TeacherProfile) -> string {
loops := TeacherLoops(code, begin, end)
best: TeacherLoop
best_samples: s64 = -1
for loop: loops {
samples: s64
for sample: profile.samples {
if sample.address >= cast(u64)(base + loop.begin) && sample.address <= cast(u64)(base + loop.end) { samples += sample.count }
}
if samples > best_samples || samples == best_samples && loop.instructions > best.instructions {
best = loop; best_samples = samples
}
}
if best_samples < 0 { return "none" }
parts := string.[Number(best.begin), "..", Number(best.end), ": ", Number(best.instructions), " instructions, ", Number(best_samples), " samples"]
return TextDetach(TextJoin(parts[:], ""))
}
Bindings :: (arguments: *Vec(string)) -> bool {
text, found := ReadEntireFile("build/site-library-targets/sources/widget_benchmarks.json")
document: JsonDocument
defer JsonReset(*document)
if !found || !JsonRead(*document, text) { return false }
bindings := JsonMember(*document, document.root, "bindings")
if JsonKindOf(*document, bindings) != .Array { return false }
for index: cast(s32)0..JsonCount(*document, bindings) - 1 {
binding := TeacherIRBinding(JsonString(*document, JsonElement(*document, bindings, index)))
if binding == "" { return false }
unused VecPush(arguments.*, "--bind")
unused VecPush(arguments.*, binding)
}
return true
}
// Reuse the scenario harness's checked IR, including its ordinary library
// bindings, rather than teaching this tool anything about widget internals.
GenerateC :: (item: Case, directory: string) -> bool {
if item.name == "Hello" { return true }
arguments: Vec(string)
root := ifx item.header == "wasm_tier.h" then "bench" else "build/site-library-targets/ir"
module := ifx item.header == "wasm_tier.h" then "wasm_tier" else "widget_benchmarks"
entry := ifx item.header == "wasm_tier.h" then item.name else Join(item.name, "Case")
flags := string.["build/bin/zi2c", "--no-main", "--root", root, "--module-path", "std", "--entry",
Join(module, Join(":", entry)), "-o", directory]
for flag: flags { unused VecPush(arguments, flag) }
if root == "bench" { unused VecPush(arguments, "bench/wasm_tier.zi") }
else {
if !Bindings(*arguments) { return false }
Sources(root, ".zir", *arguments)
}
return Require(VecSlice(arguments, 0, arguments.count))
}
Compare :: (item: Case, compiler: string, work: string, report: *Vec(u8), findings: *Vec(Finding)) -> bool {
directory := TextDetach(JoinPath(work, item.name))
if !CreateDirectories(directory) { return false }
generated := TextDetach(JoinPath(directory, "c"))
if !GenerateC(item, generated) { return false }
cdir := ifx item.name == "Hello" then item.cdir else generated
native := TextDetach(JoinPath(directory, "native"))
mapfile := TextDetach(JoinPath(directory, "native.map.json"))
native_command := string.["build/bin/zx2native", "-o", native, item.bundle]
map_command := string.["build/bin/zx2native", "--emit", "map", "-o", mapfile, item.bundle]
if !Require(native_command[:]) || !Require(map_command[:]) { return false }
maptext, read := ReadEntireFile(mapfile)
map: JsonDocument
defer JsonReset(*map)
if !read || !JsonRead(*map, maptext) { return false }
identity := JsonMember(*map, map.root, "identity")
if Field(*map, identity, "digest") != Hash(native) { print("native map identity mismatch for %\n", item.name); return false }
image := JsonMember(*map, map.root, "image")
offset := Integer(*map, image, "text_file_offset")
size := Integer(*map, image, "text_size")
base := Integer(*map, image, "text_virtual_address")
raw := TextDetach(JoinPath(directory, "text.bin"))
extract_command := string.["dd", Join("if=", native), Join("of=", raw), "bs=65536", "iflag=skip_bytes,count_bytes",
Join("skip=", Number(offset)), Join("count=", Number(size)), "status=none"]
if offset < 0 || size <= 0 || !Require(extract_command[:]) { return false }
native_dump := string.["objdump", "-D", "-b", "binary", "-m", "i386:x86-64", "-M", "intel", "--no-show-raw-insn", raw]
ntext, ncode := Capture(native_dump[:])
if ncode != 0 { return false }
unused WriteEntireFile(JoinPath(directory, "native.asm"), ntext)
executable := TextDetach(JoinPath(directory, compiler))
arguments: Vec(string)
flags := string.[compiler, "-O2", "-std=c11"]
for flag: flags { unused VecPush(arguments, flag) }
matrix_flags := string.["-DMATRIX_NATIVE", Join("-I", cdir),
Join("-DMATRIX_HEADER=\"", Join(item.header, "\"")), Join("-DMATRIX_ENTRY=", item.symbol)]
if item.header != "" { for flag: matrix_flags { unused VecPush(arguments, flag) } }
if item.header != "" { unused VecPush(arguments, "bench/site_target_host.c") }
if item.printing { unused VecPush(arguments, "-DMATRIX_VOID") }
Sources(cdir, ".c", *arguments)
link_flags := string.["-lm", "-o", executable]
for flag: link_flags { unused VecPush(arguments, flag) }
if !Require(VecSlice(arguments, 0, arguments.count)) { return false }
parity_command := string.[executable, "-", item.checksum, "3"]
parity, parity_code := Capture(parity_command[:])
if parity_code != 0 { print("C checksum parity failed for %/%: %\n", item.name, compiler, parity); return false }
unused WriteEntireFile(JoinPath(directory, Join(compiler, ".parity.json")), parity)
c_dump := string.["objdump", "-d", "-M", "intel", "--no-show-raw-insn", executable]
ctext, ccode := Capture(c_dump[:])
if ccode != 0 { return false }
unused WriteEntireFile(JoinPath(directory, Join(compiler, ".asm")), ctext)
// Sampling is diagnostic, never a benchmark timing. Short programs may
// yield no ticks; report unknown instead of inventing a time share.
profile := TeacherSampleProgram(native, item.expected)
if !profile.valid { print("sampling failed for %\n", item.name); return false }
if !SaveProfile(JoinPath(directory, Join(compiler, ".profile.json")), *profile, Hash(native)) { return false }
Line(report, Join("\n## ", Join(item.name, Join(" / ", compiler))))
Line(report, Join("Native SHA-256: ", Hash(native)))
Line(report, Join("C SHA-256: ", Hash(executable)))
Line(report, Join("ZX SHA-256: ", Hash(item.bundle)))
version_command := string.[compiler, "--version"]
compiler_version, version_code := Capture(version_command[:])
version_end := TextFind(compiler_version, "\n")
if version_end >= 0 { compiler_version = compiler_version[:version_end] }
Line(report, Join("Compiler: ", compiler_version))
Line(report, Join("SIGPROF samples/runs: ", Join(Number(profile.total), Join("/", Number(profile.runs)))))
Line(report, "\n| Function | Native metrics | C metrics | Samples | Native loop with most samples (text offsets) |\n| --- | --- | --- | ---: | --- |")
ninst := TeacherInstructions(ntext)
cinst := TeacherInstructions(ctext)
symbol_command := string.["nm", "-S", "-n", "--defined-only", executable]
symbol_text, symbol_code := Capture(symbol_command[:])
if symbol_code != 0 { return false }
symbols := TeacherSizedSymbols(symbol_text)
proposals: JsonDocument
defer JsonReset(*proposals)
proposal_root := JsonNewObject(*proposals)
JsonSet(*proposals, proposal_root, "schema_version", JsonNewInteger(*proposals, 1))
JsonSet(*proposals, proposal_root, "native_sha256", JsonNewStringCopy(*proposals, Hash(native)))
JsonSet(*proposals, proposal_root, "zx_sha256", JsonNewStringCopy(*proposals, Hash(item.bundle)))
JsonSet(*proposals, proposal_root, "c_sha256", JsonNewStringCopy(*proposals, Hash(executable)))
JsonSet(*proposals, proposal_root, "compiler", JsonNewStringCopy(*proposals, compiler_version))
proposal_rules := JsonNewArray(*proposals)
JsonSet(*proposals, proposal_root, "candidates", proposal_rules)
functions := JsonMember(*map, map.root, "functions")
for index: cast(s32)0..JsonCount(*map, functions) - 1 {
function := JsonElement(*map, functions, index)
begin := Integer(*map, function, "begin")
end := Integer(*map, function, "end")
if begin < 0 || end <= begin { continue }
name := Field(*map, function, "name")
module := Field(*map, function, "module")
mangled := Join(module, Join("_", name))
found := false
cbegin: s64
cend: s64
cmetrics: TeacherMetrics
for symbol: symbols {
if symbol.name == mangled || name != "main" && symbol.name == name {
cmetrics = TeacherMeasure(VecSlice(cinst, 0, cinst.count), symbol.begin, symbol.end)
cbegin = symbol.begin; cend = symbol.end
found = true; break
}
}
native_metrics := TeacherMeasure(VecSlice(ninst, 0, ninst.count), begin, end)
samples: s64
for sample: profile.samples {
if sample.address >= cast(u64)(base + begin) && sample.address < cast(u64)(base + end) { samples += sample.count }
}
cname := ifx found then Metrics(cmetrics) else "absent (inline/dead/renamed unknown)"
cells := string.[mangled, Metrics(native_metrics), cname, Number(samples),
LoopSummary(VecSlice(ninst, 0, ninst.count), begin, end, base, *profile)]
Row(report, cells[:])
if found {
rules := TeacherMineRewrites(VecSlice(ninst, 0, ninst.count), begin, end,
VecSlice(cinst, 0, cinst.count), cbegin, cend)
for rule: rules {
proposal := JsonNewObject(*proposals)
JsonSet(*proposals, proposal, "rule", JsonNewStringCopy(*proposals, "x86-multiply-constant"))
JsonSet(*proposals, proposal, "function", JsonNewStringCopy(*proposals, mangled))
JsonSet(*proposals, proposal, "factor", JsonNewInteger(*proposals, rule.factor))
JsonSet(*proposals, proposal, "native", JsonNewStringCopy(*proposals, rule.native))
JsonSet(*proposals, proposal, "teacher", JsonNewStringCopy(*proposals, rule.teacher))
JsonSet(*proposals, proposal, "precondition", JsonNewStringCopy(*proposals, "integer-modulo-width; flags-dead; no-memory"))
JsonSet(*proposals, proposal, "verified", JsonNewBool(*proposals, false))
unused JsonAppend(*proposals, proposal_rules, proposal)
}
}
if found && native_metrics.instructions > cmetrics.instructions {
delta := native_metrics.instructions - cmetrics.instructions
// Ranking is a proxy, not estimated cycles. Weight excess code by
// observed function samples; unsampled functions rank last.
score := ifx profile.total > 0 then samples * 100000 * delta / (native_metrics.instructions * profile.total) else 0
unused VecPush(findings.*, Finding.{workload = item.name, compiler = compiler, name = mangled,
native = native_metrics, teacher = cmetrics, samples = samples, total = profile.total, score = score})
}
}
return WriteEntireFile(JoinPath(directory, Join(compiler, ".candidates.json")),
TextDetach(JsonWrite(*proposals, proposal_root, JsonPythonStyle(2))))
}
#program_export
main :: (argc: s32, argv: **u8) -> s32 {
output := "bench/results/c-teacher-omega.md"
if argc == 3 && TextFromCString(argv[1]) == "--output" { output = TextFromCString(argv[2]) }
else if argc != 1 { print("c_teacher.zi [--output REPORT.md]\nPrepare wasm-tier and library-targets through bench/bench.zi first.\n"); return 2 }
work := "build/c-teacher"
if !CreateDirectories(work) { return 1 }
cases: Vec(Case)
kernel_names := string.["Sieve", "Records", "Hash", "Vectors", "Calls", "Printing"]
for name: kernel_names {
wrapper_path := Join("build/wasm-tier/native_", Join(name, ".zi"))
wrapper, found := ReadEntireFile(wrapper_path)
if !found { print("prepare wasm-tier first: missing %\n", wrapper_path); return 1 }
wrapper = TextDetach(TextReplace(wrapper, "0..31", "0..1023"))
checksum_at := TextFind(wrapper, "checksum != ")
result := "0"
if checksum_at >= 0 {
at := checksum_at + 12
end := TextFind(wrapper, " {", at)
checksum, ok := TextInteger(wrapper[at:end])
if !ok { return 1 }
result = Number(checksum / 32)
wrapper = TextDetach(TextReplace(wrapper, Join("checksum != ", Number(checksum)), Join("checksum != ", Number(checksum * 32))))
}
teacher_source := TextDetach(JoinPath(work, Join("teacher_", Join(name, ".zi"))))
bundle := TextDetach(JoinPath(work, Join(name, ".zx")))
if !WriteEntireFile(teacher_source, wrapper) { return 1 }
build_command := string.["build/bin/zi2zx", "--root", work, "--module-path", "bench", "--module-path", "std",
"--entry", Join("teacher_", Join(name, ":main")), "-o", bundle, teacher_source]
if !Require(build_command[:]) { return 1 }
unused VecPush(cases, Case.{name = name, bundle = bundle,
cdir = "build/wasm-tier/c", symbol = Join("wasm_tier_", name), header = "wasm_tier.h", expected = 42, printing = name == "Printing", checksum = result})
}
widget_cases := string.["Button", "Text", "Input"]
widget_ids := string.["button", "text", "input"]
for index: 0..2 {
folder := Join("build/site-library-targets/", widget_ids[index])
module := Join("teacher_", widget_cases[index])
source := TextDetach(JoinPath(work, Join(module, ".zi")))
bundle := TextDetach(JoinPath(work, Join(module, ".zx")))
body := string.["Widget :: #import \"widget_benchmarks\";\n#program_export\nmain :: () -> s32 {\n",
" for iteration: 0..2047 { if Widget.", widget_cases[index], "Case() != 0 { return 1 } }\n return 0\n}\n"]
if !WriteEntireFile(source, TextDetach(TextJoin(body[:], ""))) { return 1 }
command: Vec(string)
flags := string.["build/bin/zi2zx", "--root", work, "--module-path", "build/site-library-targets/ir", "--module-path", "std",
"--entry", Join(module, ":main"), "-o", bundle]
for flag: flags { unused VecPush(command, flag) }
if !Bindings(*command) { return 1 }
unused VecPush(command, source)
Sources("build/site-library-targets/ir", ".zir", *command)
if !Require(VecSlice(command, 0, command.count)) { return 1 }
unused VecPush(cases, Case.{name = widget_cases[index], bundle = bundle,
cdir = Join(folder, "/c"), symbol = Join(widget_cases[index], "Case"), header = "widget_benchmarks.h", checksum = "0"})
}
hello_bundle := string.["build/bin/zi2zx", "--root", "examples", "--module-path", "std", "--entry", "hello:main", "-o", "build/c-teacher/hello.zx", "examples/hello.zi"]
hello_c := string.["build/bin/zi2c", "--root", "examples", "--module-path", "std", "-o", "build/c-teacher/hello-c", "examples/hello.zi"]
if !Require(hello_bundle[:]) || !Require(hello_c[:]) { return 1 }
unused VecPush(cases, Case.{name = "Hello", bundle = "build/c-teacher/hello.zx", cdir = "build/c-teacher/hello-c",
symbol = "hello_main", header = "hello.h", printing = true, checksum = "0"})
report: Vec(u8)
revision_command := string.["git", "rev-parse", "HEAD"]
revision, code := Capture(revision_command[:])
Line(*report, "# C teacher: native assembly comparison")
Line(*report, Join("\nBase revision: ", TextTrim(revision)))
host_command := string.["hostname"]
host, host_code := Capture(host_command[:])
if host_code != 0 { return 1 }
Line(*report, Join("Host: ", TextTrim(host)))
tool_names := string.["build/bin/zi2c", "build/bin/zi2zx", "build/bin/zx2native"]
tool_hashes: Vec(string)
for tool: tool_names {
digest := Hash(tool)
unused VecPush(tool_hashes, digest)
Line(*report, Join(tool, Join(" SHA-256: ", digest)))
}
Line(*report, "Learning off. Generated C compiled with -O2; native compiled from verified ZX. Function extents come from the native map; C symbols match module_name or exported name exactly. Absent symbols are not evidence of inlining. Metrics: instructions/loop-union/back-edges/stack-reads/stack-writes/memory/indexed/branches/forward-branches/calls/vector-register-uses/mul/div/shifts/loop-immediate-or-PC-relative candidates. Stack traffic includes locals and saves. Vector-register uses include scalar floating point. Loop constants are LICM candidates, not proven invariants. Back edges describe loop bodies, not execution frequency. SIGPROF uses a 1ms CPU timer, at most 30 runs; zero samples means unknown time share. Sampling includes process startup and runtime. Ranking weights relative instruction excess by observed function samples; it predicts neither cycles nor speedup.")
findings: Vec(Finding)
clang := Clang()
failures: s64
for item: cases {
if !Compare(item, "cc", work, *report, *findings) {
Line(*report, Join("\nINCOMPLETE: comparison failed for ", item.name))
failures += 1
continue
}
if clang != "" && !Compare(item, clang, work, *report, *findings) {
Line(*report, Join("\nINCOMPLETE: clang comparison failed for ", item.name))
failures += 1
}
}
ranked: Vec(u8)
Line(*ranked, "\n## Ranked C wins\n\n| Workload/compiler/function | Weighted excess | Function samples/total (estimated CPU share) | Patterns to inspect | Native | C |\n| --- | ---: | ---: | --- | --- | --- |")
for index: 1..findings.count - 1 {
at := index
while at > 0 && findings[at].score > findings[at - 1].score {
swap := findings[at]; findings[at] = findings[at - 1]; findings[at - 1] = swap; at -= 1
}
}
for finding: findings {
identity := string.[finding.workload, finding.compiler, finding.name]
share := ifx finding.total > 0 then Join(Number(finding.samples * 100 / finding.total), "%") else "unknown"
cells := string.[TextDetach(TextJoin(identity[:], "/")), Number(finding.score),
Join(Number(finding.samples), Join("/", Join(Number(finding.total), Join(" ", share)))),
Patterns(finding.native, finding.teacher), Metrics(finding.native), Metrics(finding.teacher)]
Row(*ranked, cells[:])
}
Append(*report, TextDetach(BuilderFinish(ranked)))
for index: 0..tool_names.count - 1 {
if Hash(tool_names[index]) != tool_hashes[index] {
Line(*report, Join("INCOMPLETE: compiler changed during comparison: ", tool_names[index]))
failures += 1
}
}
if !WriteEntireFile(output, TextDetach(BuilderFinish(report))) { return 1 }
print("C teacher: % workloads, % ranked function comparisons, % failed; %\n", cases.count, findings.count, failures, output)
return ifx failures == 0 then 0 else 1
}
+194
View File
@@ -0,0 +1,194 @@
// Structural observations, never equivalence proofs. Addresses are normalized
// by the caller: ELF virtual addresses for C, text-relative addresses for ZX.
#import "std/text_tools"
#import "std/byte_text_linux"
using Vectors :: #import "std/vec"
TeacherInstruction :: struct {
address: s64
mnemonic: string
operands: string
}
TeacherFunction :: struct {
name: string
begin: s64
end: s64
}
TeacherLoop :: struct { begin: s64; end: s64; instructions: s64 }
// Checked IR export uses the leaf module name. Apply the same mapping to
// each qualified side of a manifest binding; retain the function spelling.
TeacherIRBinding :: (binding: string) -> string {
sides := TextSplit(binding, "=")
flattened: Vec(string)
for side: sides {
colon := TextFind(side, ":")
if colon < 0 { return "" }
slash := TextFindLast(side[:colon], "/")
unused VecPush(flattened, side[slash + 1:])
}
if flattened.count != 2 { return "" }
return TextDetach(TextJoin(VecSlice(flattened, 0, flattened.count), "="))
}
TeacherMetrics :: struct {
instructions: s64
loop_instructions: s64
back_edges: s64
stack_reads: s64
stack_writes: s64
memory: s64
indexed: s64
branches: s64
forward_branches: s64
calls: s64
vectors: s64
multiplies: s64
divides: s64
shifts: s64
loop_constants: s64
}
TeacherHex :: (text: string) -> (value: s64, valid: bool) {
if TextHasPrefix(text, "0x") { text = text[2:] }
value: s64
digits: s64
for byte: text {
digit: s64 = -1
if byte >= 48 && byte <= 57 { digit = cast(s64)byte - 48 }
if byte >= 97 && byte <= 102 { digit = cast(s64)byte - 87 }
if byte >= 65 && byte <= 70 { digit = cast(s64)byte - 55 }
if digit < 0 || value > 576460752303423487 { return 0, false }
value = value * 16 + digit
digits += 1
}
return value, digits > 0
}
// objdump --no-show-raw-insn -M intel. Ignore symbol headings, data and
// diagnostic lines; never count a wrapped instruction byte line as code.
TeacherInstructions :: (text: string) -> Vec(TeacherInstruction) {
result: Vec(TeacherInstruction)
lines := TextLines(text)
for raw: lines {
line := TextTrim(raw)
colon := TextFind(line, ":")
if colon <= 0 { continue }
address, valid := TeacherHex(line[:colon])
if !valid { continue }
body := TextTrim(line[colon + 1:])
at: s64
while at < body.count && !TextIsSpace(body[at]) { at += 1 }
if at == 0 { continue }
mnemonic := body[:at]
if mnemonic == "(bad)" || mnemonic[0] == 46 { continue }
unused VecPush(result, TeacherInstruction.{address = address, mnemonic = mnemonic,
operands = TextTrim(body[at:])})
}
return result
}
TeacherSymbols :: (text: string) -> Vec(TeacherFunction) {
result: Vec(TeacherFunction)
lines := TextLines(text)
for raw: lines {
line := TextTrim(raw)
left := TextFind(line, " <")
right := TextFind(line, ">:")
if left <= 0 || right <= left { continue }
address, valid := TeacherHex(line[:left])
if !valid { continue }
if result.count > 0 { result[result.count - 1].end = address }
unused VecPush(result, TeacherFunction.{name = line[left + 2:right], begin = address, end = 9223372036854775807})
}
return result
}
// nm -S -n --defined-only gives real symbol sizes, excluding alignment
// padding and adjacent functions. Zero-sized/untyped symbols stay unmatched.
TeacherSizedSymbols :: (text: string) -> Vec(TeacherFunction) {
result: Vec(TeacherFunction)
lines := TextLines(text)
for line: lines {
pieces := TextSplit(TextTrim(line), " ")
fields: Vec(string)
for piece: pieces { if piece != "" { unused VecPush(fields, piece) } }
if fields.count != 4 || fields[2] != "T" && fields[2] != "t" { continue }
address, address_ok := TeacherHex(fields[0])
size, size_ok := TeacherHex(fields[1])
if !address_ok || !size_ok || size <= 0 || size > 9223372036854775807 - address { continue }
unused VecPush(result, TeacherFunction.{name = fields[3], begin = address, end = address + size})
}
return result
}
TeacherBranch :: (instruction: TeacherInstruction) -> bool {
return TextHasPrefix(instruction.mnemonic, "j") || instruction.mnemonic == "loop"
}
TeacherTarget :: (instruction: TeacherInstruction) -> (address: s64, valid: bool) {
at: s64
while at < instruction.operands.count && !TextIsSpace(instruction.operands[at]) { at += 1 }
return TeacherHex(instruction.operands[:at])
}
TeacherLoops :: (code: []TeacherInstruction, begin: s64, end: s64) -> Vec(TeacherLoop) {
result: Vec(TeacherLoop)
for instruction: code {
if instruction.address < begin || instruction.address >= end || !TeacherBranch(instruction) { continue }
target, valid := TeacherTarget(instruction)
if !valid || target < begin || target > instruction.address { continue }
count: s64
for member: code { if member.address >= target && member.address <= instruction.address { count += 1 } }
unused VecPush(result, TeacherLoop.{begin = target, end = instruction.address, instructions = count})
}
return result
}
TeacherMeasure :: (code: []TeacherInstruction, begin: s64, end: s64) -> TeacherMetrics {
result: TeacherMetrics
// Count the union of loop intervals; nested loops must not inflate the
// static instruction count. Back edges are candidates, not hotness data.
loops := TeacherLoops(code, begin, end)
result.back_edges = loops.count
for instruction: code {
if instruction.address < begin || instruction.address >= end { continue }
result.instructions += 1
loop := false
for candidate: loops {
if instruction.address >= candidate.begin && instruction.address <= candidate.end { loop = true }
}
if loop { result.loop_instructions += 1 }
operands := instruction.operands
memory := TextContains(operands, "[")
if memory {
result.memory += 1
if TextContains(operands, "*") || TextContains(operands, "+r") || TextContains(operands, "+e") { result.indexed += 1 }
// Stack references include locals, saved registers and spills.
// They cannot be identified as allocator spills from assembly alone.
if TextContains(operands, "[rsp") || TextContains(operands, "[rbp") {
comma := TextFind(operands, ",")
bracket := TextFind(operands, "[")
if comma >= 0 && bracket < comma && instruction.mnemonic != "cmp" && instruction.mnemonic != "test" && instruction.mnemonic != "lea" {
result.stack_writes += 1
} else if instruction.mnemonic != "lea" { result.stack_reads += 1 }
}
}
if TeacherBranch(instruction) {
result.branches += 1
target, valid := TeacherTarget(instruction)
if valid && target > instruction.address { result.forward_branches += 1 }
}
if instruction.mnemonic == "call" { result.calls += 1 }
if TextContains(operands, "xmm") || TextContains(operands, "ymm") || TextContains(operands, "zmm") { result.vectors += 1 }
if instruction.mnemonic == "imul" || instruction.mnemonic == "mul" { result.multiplies += 1 }
if instruction.mnemonic == "idiv" || instruction.mnemonic == "div" { result.divides += 1 }
if instruction.mnemonic == "shl" || instruction.mnemonic == "shr" || instruction.mnemonic == "sar" { result.shifts += 1 }
if loop && (TextContains(operands, ",0x") || instruction.mnemonic == "lea" && TextContains(operands, "[rip")) {
result.loop_constants += 1
}
}
return result
}
+213
View File
@@ -0,0 +1,213 @@
// SIGPROF sampling of a private child, Linux x86-64. Install ITIMER_PROF at
// exec's first stop, restore its instruction and registers, and then sample
// unchanged code. No signal handler or runtime is added to the measured ELF.
#import "std/c_string"
#import "std/file"
#import "std/number_text"
#import "std/text_tools"
using Vectors :: #import "std/vec"
#scope_file
libc_teacher :: #system_library "libc";
Ptrace :: (request: s64, pid: s32, address: u64, data: u64) -> s64 #foreign libc_teacher "ptrace";
Fork :: () -> s32 #foreign libc_teacher "fork";
Exec :: (path: *u8, arguments: **u8) -> s32 #foreign libc_teacher "execv";
Exit :: (code: s32) -> void #foreign libc_teacher "_exit";
WaitPid :: (pid: s32, status: *s32, options: s32) -> s32 #foreign libc_teacher "waitpid";
Kill :: (pid: s32, number: s32) -> s32 #foreign libc_teacher "kill";
Open :: (path: *u8, flags: s32) -> s32 #foreign libc_teacher "open";
Dup :: (from: s32, to: s32) -> s32 #foreign libc_teacher "dup2";
Close :: (fd: s32) -> s32 #foreign libc_teacher "close";
PreadRaw :: (fd: s32, buffer: *u8, count: u64, offset: s64) -> s64 #foreign libc_teacher "pread";
Errno :: () -> *s32 #foreign libc_teacher "__errno_location";
Registers :: struct { words: [27]u64 }
Wait :: (pid: s32, status: *s32) -> bool {
while true {
if WaitPid(pid, status, 0) == pid { return true }
if Errno()[0] != 4 { return false }
}
}
Hex :: (text: string) -> u64 {
value: u64 = 0
for byte: text {
if byte >= #char "0" && byte <= #char "9" { value = value * 16 + cast(u64)(byte - #char "0") }
else if byte >= #char "a" && byte <= #char "f" { value = value * 16 + cast(u64)(byte - #char "a") + 10 }
else { break }
}
return value
}
// The first executable mapping without a path in MAPS, read from the
// stopped child's memory.
CaptureImage :: (pid: s32, maps: string, profile: *TeacherProfile) {
lines := TextLines(maps)
for line: lines {
dash := TextFind(line, "-")
space := TextFind(line, " ")
if dash <= 0 || space <= dash || space + 4 > line.count || line[space + 3] != #char "x" { continue }
// Anonymous mappings end after the inode field: five fields only.
fields: s64 = 0
at: s64 = 0
while at < line.count {
while at < line.count && line[at] == #char " " { at += 1 }
if at < line.count { fields += 1 }
while at < line.count && line[at] != #char " " { at += 1 }
}
if fields != 5 { continue }
begin := Hex(line[0:dash])
end := Hex(line[dash + 1:space])
if end <= begin || end - begin > 268435456 { return }
buffer: [32]u8
parts := string.["/proc/", FormatInteger(cast(s64)pid, buffer[:]), "/mem"]
path: [64]u8
if !CopyCString(TextDetach(TextJoin(parts[:], "")), path[:]) { return }
fd := Open(*path[0], 0)
if fd < 0 { return }
unused VecResize(profile.image, cast(s64)(end - begin))
if PreadRaw(fd, *profile.image[0], end - begin, cast(s64)begin) == cast(s64)(end - begin) { profile.image_base = begin }
else { unused VecResize(profile.image, 0) }
unused Close(fd)
return
}
}
Trace :: (request: s64, pid: s32, address: u64, data: u64) -> bool {
error := Errno()
error[0] = 0
result := Ptrace(request, pid, address, data)
return result != -1 || Errno()[0] == 0
}
#scope_export
TeacherSample :: struct { address: u64; count: s64 }
TeacherProfile :: struct {
samples: Vec(TeacherSample)
total: s64
runs: s64
valid: bool
exit_code: s32
// With maps requested: the child's first anonymous executable mapping
// (an in-process native image) and its address.
image_base: u64
image: Vec(u8)
}
TeacherSampleRun :: (path: string, profile: *TeacherProfile) -> bool {
arguments := string.[path]
return TeacherSampleProcess(arguments[:], profile, null)
}
// Samples ARGUMENTS[0] run with ARGUMENTS. MAPS, when not null, receives
// the child's /proc maps at its 64th sample, so samples in anonymous code
// (an in-process native image) and in shared libraries can be attributed.
TeacherSampleProcess :: (arguments: []string, profile: *TeacherProfile, maps: *Vec(u8)) -> bool {
if arguments.count < 1 || arguments.count > 15 { return false }
text: [8192]u8
sink: [16]u8
pointers: [16]*u8
used: s64 = 0
for index: cast(s64)0..arguments.count - 1 {
if used + arguments[index].count + 1 > text.count || !CopyCString(arguments[index], text[used:]) { return false }
pointers[index] = *text[used]
used += arguments[index].count + 1
}
pointers[arguments.count] = null
if !CopyCString("/dev/null", sink[:]) { return false }
cpath := pointers[0]
pid := Fork()
if pid < 0 { return false }
if pid == 0 {
fd := Open(*sink[0], 1)
if fd < 0 { Exit(120); return false }
unused Dup(fd, 1); unused Dup(fd, 2); unused Close(fd)
if !Trace(0, 0, 0, 0) { Exit(121); return false }
unused Exec(cpath, *pointers[0])
Exit(122)
return false
}
reaped := false
status: s32
defer {
if !reaped {
// Confirm this PID is still our unreaped child before signaling.
pending := WaitPid(pid, *status, 1)
if pending == 0 || pending == pid && (status & 255) == 127 {
unused Kill(pid, 9)
unused Wait(pid, *status)
}
}
}
if !Wait(pid, *status) { return false }
if (status & 255) != 127 { reaped = true; return false }
// EXITKILL ensures a stopped child cannot outlive a failed tracer.
if !Trace(16896, pid, 0, 1048576) { return false }
saved: Registers
if !Trace(12, pid, 0, cast(u64)*saved) { return false }
ip := saved.words[16]
error := Errno()
error[0] = 0
original := Ptrace(1, pid, ip, 0)
if original == -1 && Errno()[0] != 0 { return false }
// syscall is two bytes; single-step it with setitimer(ITIMER_PROF).
patched := (cast(u64)original & ~cast(u64)65535) | 1295
if !Trace(4, pid, ip, patched) { return false }
timer := saved.words[19] - 128
values: [4]u64 = .[0, 1000, 0, 1000]
for index: 0..3 { if !Trace(5, pid, timer + cast(u64)index * 8, values[index]) { return false } }
registers := saved
registers.words[10] = 38
registers.words[14] = 2
registers.words[13] = timer
registers.words[12] = 0
if !Trace(13, pid, 0, cast(u64)*registers) || !Trace(9, pid, 0, 0) || !Wait(pid, *status) { return false }
if (status & 255) != 127 || !Trace(12, pid, 0, cast(u64)*registers) || registers.words[10] != 0 { return false }
if !Trace(4, pid, ip, cast(u64)original) || !Trace(13, pid, 0, cast(u64)*saved) || !Trace(7, pid, 0, 0) { return false }
while Wait(pid, *status) {
if (status & 127) == 0 {
reaped = true
profile.exit_code = (status >> 8) & 255
profile.runs += 1
return true
}
if (status & 255) != 127 { reaped = true; return false }
signal_number := (status >> 8) & 255
if signal_number == 27 {
if !Trace(12, pid, 0, cast(u64)*registers) { return false }
address := registers.words[16]
found := false
for index: 0..profile.samples.count - 1 {
if profile.samples[index].address == address { profile.samples[index].count += 1; found = true; break }
}
if !found { unused VecPush(profile.samples, TeacherSample.{address = address, count = 1}) }
profile.total += 1
if maps != null && profile.total == 64 {
buffer: [32]u8
parts := string.["/proc/", FormatInteger(cast(s64)pid, buffer[:]), "/maps"]
path := TextDetach(TextJoin(parts[:], ""))
captured: Vec(u8)
if ReadFileInto(path, *captured) {
CaptureImage(pid, TextView(captured[:]), profile)
unused VecResize(<<maps, 0)
for byte: captured { unused VecPush(<<maps, byte) }
}
VecFree(captured)
}
signal_number = 0
}
if !Trace(7, pid, 0, cast(u64)signal_number) { return false }
}
return false
}
TeacherSampleProgram :: (path: string, expected: s32) -> TeacherProfile {
profile: TeacherProfile
valid := true
for run: 0..29 {
if !TeacherSampleRun(path, *profile) || profile.exit_code != expected { valid = false; break }
if profile.total >= 150 { break }
}
profile.valid = valid
return profile
}
+59
View File
@@ -0,0 +1,59 @@
// Mine candidates only. Matching two assembly idioms proves nothing about
// program equivalence; the learning verifier must certify their semantics.
#import "c_teacher_assembly"
#import "std/text_tools"
using Vectors :: #import "std/vec"
TeacherRewrite :: struct { factor: s64; native: string; teacher: string }
TeacherLeaFactor :: (operands: string) -> s64 {
left := TextFind(operands, "[")
right := TextFind(operands, "]")
if left < 0 || right < left { return 0 }
body := operands[left + 1:right]
plus := TextFind(body, "+")
if plus <= 0 { return 0 }
base := body[:plus]
index := body[plus + 1:]
star := TextFind(index, "*")
if star < 0 { return ifx base == index then 2 else 0 }
if index[:star] != base { return 0 }
scale, valid := TeacherHex(index[star + 1:])
if !valid || scale != 1 && scale != 2 && scale != 4 && scale != 8 { return 0 }
return 1 + scale
}
TeacherIdiomFactor :: (instruction: TeacherInstruction) -> s64 {
if instruction.mnemonic == "lea" { return TeacherLeaFactor(instruction.operands) }
parts := TextSplit(instruction.operands, ",")
if parts.count != 2 { return 0 }
if instruction.mnemonic == "add" && TextTrim(parts[0]) == TextTrim(parts[1]) { return 2 }
if instruction.mnemonic != "shl" && instruction.mnemonic != "sal" { return 0 }
shift, valid := TeacherHex(TextTrim(parts[1]))
if !valid || shift < 1 || shift > 30 { return 0 }
return cast(s64)(cast(u64)1 << cast(u64)shift)
}
TeacherMineRewrites :: (native: []TeacherInstruction, begin: s64, end: s64,
teacher: []TeacherInstruction, cbegin: s64, cend: s64) -> Vec(TeacherRewrite) {
result: Vec(TeacherRewrite)
for instruction: native {
if instruction.address < begin || instruction.address >= end || instruction.mnemonic != "imul" { continue }
operands := TextSplit(instruction.operands, ",")
if operands.count != 3 { continue }
factor, valid := TeacherHex(TextTrim(operands[2]))
if !valid || factor < 2 { continue }
duplicate := false
for rule: result { if rule.factor == factor { duplicate = true; break } }
if duplicate { continue }
for candidate: teacher {
if candidate.address < cbegin || candidate.address >= cend || TeacherIdiomFactor(candidate) != factor { continue }
n := string.[instruction.mnemonic, " ", instruction.operands]
c := string.[candidate.mnemonic, " ", candidate.operands]
unused VecPush(result, TeacherRewrite.{factor = factor,
native = TextDetach(TextJoin(n[:], "")), teacher = TextDetach(TextJoin(c[:], ""))})
break
}
}
return result
}
+220
View File
@@ -0,0 +1,220 @@
// Offline calibration of the bounded leaf pass. Run through bench/bench.zi.
// Uses the teacher's long, checksum-checking kernel wrappers and generated C.
#import, file "../cmd/compiler_exec_link.zi";
#import, file "../cmd/compiler_opt.zi";
#import, file "../cmd/compiler_lowered_ir.zi";
#import, file "../cmd/compiler_bundle.zi";
#import, file "../cmd/compiler_learning.zi";
#import "std/byte_text_linux"
#import "std/environment_linux"
#import "std/file"
#import "std/file_tree_linux"
#import "std/json_document"
#import "std/number_text"
#import "std/process_run_linux"
#import "std/text_tools"
#import "std/timer_linux"
#import "std/vec"
#scope_file
Join :: (a: string, b: string) -> string { parts := string.[a, b]; return TextDetach(TextJoin(parts[:], "")) }
Number :: (n: s64) -> string { digits: [32]u8; return Join("", FormatInteger(n, digits[:])) }
Capture :: (arguments: []string) -> (text: string, code: s32) {
run: ProcessRun
options := ProcessOptions.{arguments = arguments, capture_output = true, merge_error = true}
if !RunProcess(options, *run) { return "cannot start child", 127 }
return TextDetach(BuilderFinish(run.output)), run.code
}
Require :: (arguments: []string) -> bool {
text, code := Capture(arguments)
if code != 0 { print("calibration failed (%): %\n%\n", code, TextJoin(arguments, " "), text); return false }
return true
}
Digest :: (path: string) -> string {
command := string.["sha256sum", "--", path]
text, code := Capture(command[:])
return ifx code == 0 && text.count >= 64 then text[:64] else ""
}
TextField :: (document: *JsonDocument, root: s32, key: string, value: string) {
JsonSet(document, root, key, JsonNewStringCopy(document, value))
}
Policy :: (document: *JsonDocument, row: s32, leaf: s32) {
policy := JsonNewObject(document)
JsonSet(document, row, "policy", policy)
JsonSet(document, policy, "leaf_operations", JsonNewInteger(document, leaf))
JsonSet(document, policy, "unroll_factor", JsonNewInteger(document, 1))
JsonSet(document, policy, "block_layout", JsonNewInteger(document, 1))
JsonSet(document, policy, "allocation", JsonNewInteger(document, 0))
}
// Clone/verify and vary only the leaf pass. The canonical input has already
// passed the ordinary optimizer; running other passes again would confound it.
Variant :: (source: string, output: string, leaf: s32) -> bool {
bytes, found := ReadEntireFile(source)
if !found { return false }
decoded: ZxExecOwner
defer ZxExecReadFree(*decoded)
if ZxExecRead(*decoded, bytes, LirDefaultLimits()).problem != .None || decoded.assets != 0 { return false }
if ZxExecReadProgram(*decoded).checks { return false }
optimized: LirOptOwner
defer LirOptFree(*optimized)
options := LirOptOptions.{maximum_rounds = 1, inline_leaf_operations = leaf}
result := LirOptBuild(*optimized, ZxExecReadProgram(*decoded), LirDefaultLimits(), options)
if result.problem != .None { return false }
program := LirOptProgram(*optimized)
assets: [0]Asset
empty: []u8
measured := ZxExecWrite(program, assets[:], empty, TextView(decoded.interface[:]))
if measured.problem != .None { return false }
encoded: Vec(u8)
defer VecFree(encoded)
if !VecResize(encoded, measured.size) { return false }
written := ZxExecWrite(program, assets[:], encoded[:], TextView(decoded.interface[:]))
if written.problem != .None || written.size != measured.size { return false }
print("leaf=% inlined_calls=% source=%\n", leaf, result.counters.inline_leaf.instructions, source)
return WriteEntireFile(output, TextView(encoded[:]))
}
Time :: (executable: string) -> s64 {
command := string.[executable]
options := ProcessOptions.{arguments = command[:], output_path = "/dev/null", error_path = "/dev/null"}
run: ProcessRun
start := MonotonicNanoseconds()
if !RunProcess(options, *run) || run.code != 42 { return -1 }
return MonotonicNanoseconds() - start
}
Record :: (corpus: string, bundle: string, elf: string, original: string, compiler: string) -> string {
format := Join("zx", Join(Number(ExecutableVersionNumber()), Join("-lir", Number(LirVersion))))
zx_digest := Digest(bundle)
native_digest := Digest(elf)
relative := Join(format, Join("/", Join(zx_digest, Join("/x86_64-", native_digest))))
stem := Join(corpus, Join("/", relative))
folder := PathParent(stem)
if !CreateDirectories(folder) { return "" }
copy_zx := string.["cp", "--", bundle, Join(folder, "/program.zx")]
copy_elf := string.["cp", "--", elf, Join(stem, ".elf")]
map := string.["build/bin/zx2native", "--emit", "map", "-o", Join(stem, ".map.json"), bundle]
if !Require(copy_zx[:]) || !Require(copy_elf[:]) || !Require(map[:]) { return "" }
document: JsonDocument
defer JsonReset(*document)
root := JsonNewObject(*document)
TextField(*document, root, "format", format)
TextField(*document, root, "target", "x86_64")
TextField(*document, root, "platform", "linux")
TextField(*document, root, "zx2native_sha256", compiler)
TextField(*document, root, "input_sha256", original)
TextField(*document, root, "producer", "c-teacher-tune")
if !WriteEntireFile(Join(stem, ".record.json"), JsonWrite(*document, root, JsonCompactStyle())) { return "" }
return Join(relative, ".record.json")
}
Epoch :: (work: string) -> string {
// Hash the source inventory too: exact tool identities alone cannot detect
// edits awaiting a rebuild. Include untracked learning modules explicitly.
command := string.["git", "ls-files", "cmd", "std", "Makefile", "assembly.mk", "bench"]
inventory, code := Capture(command[:])
if code != 0 { return "" }
paths := TextLines(inventory)
defer VecFree(paths)
text: Vec(u8)
for path: paths {
if path == "" || TextHasPrefix(path, "bench/results/") { continue }
hash := Digest(path)
if hash.count != 64 { VecFree(text); return "" }
BuilderAppend(text, path); BuilderAppend(text, hash)
}
extra := string.["build/bin/zi2c", "build/bin/zi2zx", "build/bin/zx2native",
"cmd/compiler_opt_inline.zi", "cmd/compiler_learning.zi", "cmd/compiler_learning_policy.zi",
"cmd/compiler_learning_table.zi", "bench/c_teacher_tuning.zi"]
for path: extra {
hash := Digest(path)
if hash.count != 64 { VecFree(text); return "" }
BuilderAppend(text, path); BuilderAppend(text, hash)
}
receipt := Join(work, "/source-epoch")
return ifx WriteEntireFile(receipt, BuilderFinish(text)) then Digest(receipt) else ""
}
#scope_export
#program_export
main :: (argc: s32, argv: **u8) -> s32 {
output: string; corpus: string
if argc != 5 { print("usage: c-teacher-tune --output FILE --corpus DIR\n"); return 1 }
for index: cast(s32)1..argc - 1 {
value := TextFromCString(argv[index])
if value == "--output" && index + 1 < argc { output = TextFromCString(argv[index + 1]) }
if value == "--corpus" && index + 1 < argc { corpus = TextFromCString(argv[index + 1]) }
}
if output == "" || corpus == "" || EnvironmentText("ZIRAN_LEARN") != "off" { return 1 }
policy := LearningTuningChoice()
if policy.leaf_operations != 0 || policy.block_layout != 1 {
print("calibration needs the baseline leaf/layout table and freshly prepared teacher inputs\n"); return 1
}
work := "build/c-teacher/tuning"
if !CreateDirectories(work) || !CreateDirectories(corpus) { return 1 }
epoch := Epoch(work)
compiler := Digest("build/bin/zx2native")
host := string.["hostname"]
hostname, host_code := Capture(host[:])
if epoch.count != 64 || compiler.count != 64 || host_code != 0 { return 1 }
document: JsonDocument
defer JsonReset(*document)
root := JsonNewObject(*document)
JsonSet(*document, root, "schema_version", JsonNewInteger(*document, 1))
JsonSet(*document, root, "checks", JsonNewBool(*document, false))
TextField(*document, root, "target", "x86_64-linux")
TextField(*document, root, "learning", "off")
TextField(*document, root, "host", TextTrim(hostname))
TextField(*document, root, "source_epoch_sha256", epoch)
TextField(*document, root, "method", "paired process wall time; 1024 checksum-checked kernel calls; includes startup; 11 samples")
rows := JsonNewArray(*document)
JsonSet(*document, root, "measurements", rows)
names := string.["Sieve", "Records", "Hash", "Vectors", "Calls", "Printing"]
for name: names {
folder := Join(work, Join("/", name))
if !CreateDirectories(folder) { return 1 }
original := Join("build/c-teacher/", Join(name, ".zx"))
source := Join("build/c-teacher/teacher_", Join(name, ".zi"))
reference_folder := Join(folder, "/c")
reference := Join(reference_folder, Join("/teacher_", name))
c := string.["env", "CFLAGS=-O2", "build/bin/zi2c", "--exe", "--root", "build/c-teacher", "--module-path", "bench", "--module-path", "std",
"--entry", Join("teacher_", Join(name, ":main")), "-o", reference_folder, source]
if !Require(c[:]) { return 1 }
for leaf: cast(s32)0..cast(s32)1 {
bundle := Join(folder, Join("/policy-", Join(Number(leaf), ".zx")))
native := Join(folder, Join("/policy-", Number(leaf)))
if !Variant(original, bundle, leaf) { return 1 }
encode := string.["build/bin/zx2native", "-o", native, bundle]
if !Require(encode[:]) { return 1 }
record := Record(corpus, bundle, native, Digest(original), compiler)
if record == "" || Time(native) <= 0 || Time(reference) <= 0 { return 1 }
row := JsonNewObject(*document)
unused JsonAppend(*document, rows, row)
TextField(*document, row, "workload", name)
TextField(*document, row, "input_sha256", Digest(original))
TextField(*document, row, "zx_sha256", Digest(bundle))
TextField(*document, row, "native_sha256", Digest(native))
TextField(*document, row, "compiler_sha256", compiler)
TextField(*document, row, "corpus_record", record)
TextField(*document, row, "checksum", "42"); TextField(*document, row, "c_checksum", "42")
file := OpenRead(native)
if !file.valid { return 1 }
JsonSet(*document, row, "code_bytes", JsonNewInteger(*document, FileSize(file)))
CloseFile(file)
Policy(*document, row, leaf)
ns := JsonNewArray(*document); cs := JsonNewArray(*document)
JsonSet(*document, row, "native_ns", ns); JsonSet(*document, row, "c_ns", cs)
for sample: 0..10 {
// Alternate native/reference order to reduce drift bias.
n: s64; ctime: s64
if sample % 2 == 0 { n = Time(native); ctime = Time(reference) }
else { ctime = Time(reference); n = Time(native) }
if n <= 0 || ctime <= 0 { return 1 }
unused JsonAppend(*document, ns, JsonNewInteger(*document, n))
unused JsonAppend(*document, cs, JsonNewInteger(*document, ctime))
}
}
}
if Epoch(work) != epoch || Digest("build/bin/zx2native") != compiler { print("compiler/source changed; calibration rejected\n"); return 1 }
if !WriteEntireFile(output, JsonWrite(*document, root, JsonPythonStyle(2))) { return 1 }
print("Saved measured leaf policies: %, corpus %\n", output, corpus)
return 0
}
+2 -2
View File
@@ -539,7 +539,7 @@ def main():
raise RuntimeError(f'logical TypeLayout audit needs {library}; build toolchain first')
# A sanitized libziran.a (make sanitize) needs its instrumentation flags.
library_flags = os.environ.get('VM_CFLAGS', '').split()
invoke([cc, *cflags, *library_flags, '-I', ROOT / 'cmd/zir', '-I', ROOT / 'bootstrap/compiler_ir', '-I', ROOT / 'include',
invoke([cc, *cflags, *library_flags, '-I', ROOT / 'bootstrap/runtime', '-I', ROOT / 'bootstrap/compiler_ir', '-I', ROOT / 'include',
out / 'logical-layout.c', library, '-lm', '-pthread', '-o', out / 'logical-layout'], 'compile', 'logical TypeLayout probe')
logical = json.loads(invoke([out / 'logical-layout', FIXTURES, layout_source], 'audit', 'logical TypeLayout source')[0])
if [(r['size'], r['alignment']) for r in logical] != [(8, 8), (8, 8), (16, 8), (24, 8)]:
@@ -786,7 +786,7 @@ def main():
# tools and inputs, and the headers the C builds above include.
built_headers = [name for name in metadata['compiler_sources_changed_during_run']
if name.endswith('.h') and (name.startswith('include/') or
Path(name).parent in (Path('cmd/zir'), Path('bootstrap/compiler_ir')))]
Path(name).parent in (Path('bootstrap/runtime'), Path('bootstrap/compiler_ir')))]
if built_headers:
raise RuntimeError('headers the benchmark built against changed during run: '
+ ', '.join(built_headers) + '; rerun on stable sources')
+14 -46
View File
@@ -6,7 +6,6 @@ is build/measurement orchestration; workload logic and oracles live in Ziran.
"""
import argparse
from datetime import datetime, timezone
import html
import json
import os
from pathlib import Path
@@ -22,6 +21,7 @@ HARNESS_ROOT = Path(os.environ.get('ZIRAN_BENCH_HARNESS_ROOT', ROOT)).resolve()
sys.path.insert(0, str(HARNESS_ROOT / 'scripts'))
import site_targets as base
import site_target_platforms as hosts
from benchmark_samples import GATE_METHOD, HostGate
base.REPO = ROOT
base.SITE = SITE
hosts.ROOT = HARNESS_ROOT
@@ -42,42 +42,6 @@ HARNESSES = ['bench/json_text.py', 'scripts/site_target_platforms.py', 'scripts/
'bench/site_target_host.c', 'bench/site_target_host.go', 'site/target-abi.js', 'site/target-measure.js']
def render(data):
rows = []
for case in data['examples']:
cells = ''.join('<td>' + (base.format_time(case['targets'][target]['measurement']['execution_ms'])
if case['targets'][target]['status']=='ok' else '<abbr title="' + html.escape(case['targets'][target]['diagnostic'],quote=True) + '">Unavailable</abbr>') + '</td>'
for target in ('c', 'go', 'zx', 'wasm'))
rows.append('<tr><th scope="row"><a href="' + html.escape(case['source']) + '">' +
html.escape(case['title']) + '</a></th>' + cells + '</tr>')
return ('<section class="section" id="json-text"><div class="section-head"><span class="eyebrow">Real workloads</span>'
'<h2>JSON and UTF-8 on Alpha</h2><p>Compare the same Ziran source across four targets. '
'Inputs are prepared once during warmup; parsing, decoding, output allocation and result validation remain in each call.</p></div>'
'<div class="matrix-scroll" tabindex="0" role="region" aria-label="JSON and UTF-8 benchmark results">'
'<table class="target-matrix"><caption class="sr-only">Median time per operation on Alpha</caption>'
'<thead><tr><th scope="col">Workload and source</th><th scope="col">C</th><th scope="col">Go</th>'
'<th scope="col">ZX</th><th scope="col">Wasm · V8</th></tr></thead><tbody>' + ''.join(rows) + '</tbody></table></div>'
'<p>' + html.escape(data['host']) + ' · ' + html.escape(data['measured_at'][:10]) + ' · ' + str(data['samples']) +
' batches per target. Symmetric 1.5×IQR filtering; every batch checks its result. '
'Process startup, offline compilation and loading are excluded. Wasm uses Node/V8; these are target comparisons, '
'not JavaScript-source comparisons. Unavailable cells retain the compiler diagnostic and have no timing. '
'<a href="generated/json-text/matrix.json">Raw samples, excluded indices, compiler hashes and outputs ↓</a></p></section>')
def write_section(data):
page = SITE / 'targets.html'
if not page.exists():
page.parent.mkdir(parents=True, exist_ok=True)
shutil.copyfile(SOURCE_SITE / 'targets.html', page)
start, end = '<!-- generated:json_text -->', '<!-- /generated:json_text -->'
text = page.read_text()
if start not in text:
text = text.replace('</main>', start + '\n' + end + '\n</main>')
left = text.index(start) + len(start)
right = text.index(end, left)
page.write_text(text[:left] + '\n' + render(data) + '\n' + text[right:])
def build(compiler, samples):
if platform.node() != 'alpha':
raise RuntimeError('Benchmark compilation and measurement require the selected Alpha physical host')
@@ -87,9 +51,10 @@ def build(compiler, samples):
env = hosts.environment()
env['PATH'] = str(Path.home() / '.local/bin') + ':' + env['PATH']
env['ZIRAN_JOBS'] = '1'
env['ZIRAN_LEARN'] = 'off'
# All helpers use the same scrubbed environment, including downstream Go.
hosts.environment = lambda: env.copy()
data = {'schema_version': 1, 'host': platform.node() + ' · ' + base.cpu_name(),
data = {'schema_version': 1, 'revision': hosts.run(['git', 'rev-parse', 'HEAD'], cwd=compiler), 'checks': False, 'learning': 'off', 'host': platform.node() + ' · ' + base.cpu_name(),
'measured_at': datetime.now(timezone.utc).isoformat(), 'samples': samples,
'compiler': {tool: base.sha(compiler / 'build/bin' / tool)
for tool in ('zi2c', 'zi2go', 'zi2zx', 'zx2wasm')},
@@ -97,9 +62,12 @@ def build(compiler, samples):
'harnesses': {p: base.sha((ROOT if p == 'bench/json_text.py' else HARNESS_ROOT) / p) for p in HARNESSES},
'versions': {name: hosts.run(command, env=env).splitlines()[0] for name, command in
{'cc': ['cc', '--version'], 'go': ['go', 'version'], 'node': ['node', '--version']}.items()},
'methodology': hosts.metadata('', '', {}, samples)['methodology'], 'examples': []}
'methodology': hosts.metadata('', '', {}, samples)['methodology'].removesuffix(' Shared machines and uncontrolled clocks; no universal target ranking.') + GATE_METHOD, 'examples': []}
zx = WORK / 'zx-runner'
hosts.runtime_build('cc', compiler / 'build/libziran.a', zx)
hosts.runtime_build('cc', compiler / 'build/libziran.a', zx,
['-include', HARNESS_ROOT / 'bench/site_target_backend.h',
'-DMATRIX_ZX_BACKEND=BUNDLE_BACKEND_NATIVE'])
data['zx_backend'] = 'native'
jobs = []
for name, title, expected in CASES:
source = ROOT / 'bench/json_text' / (name + '.zi')
@@ -169,23 +137,24 @@ def build(compiler, samples):
jobs.append((row, cell, invoke))
data['examples'].append(row)
random.Random(42).shuffle(jobs)
gate = HostGate()
timed_env = gate.environment(env)
for row, cell, command in jobs:
print('Measuring', row['id'], command[0], flush=True)
measured = hosts.summarize(hosts.read_measurement(hosts.run(command, env=env), row), row['expected'])
measured = hosts.measure(command, row, timed_env, gate)
cell['measurement'] = {**measured, 'command': base.command_text(command)}
(OUTPUT / 'matrix.json').write_text(json.dumps(data, indent=2) + '\n')
write_section(data)
def check():
data = json.loads((OUTPUT / 'matrix.json').read_text())
assert data['schema_version'] == 1 and data['host'].startswith('alpha · ') and 3 <= data['samples'] <= 31
assert [(row['id'], row['expected']) for row in data['examples']] == [(name, str(oracle)) for name, _, oracle in CASES]
for path, digest in {**data['harnesses'], **data['stdlib']}.items():
assert base.sha(ROOT / path) == digest, 'Stale benchmark input: ' + path
base.check_committed(base.published_revision(OUTPUT / 'matrix.json'), data['harnesses'], 'Benchmark harness')
base.check_committed(data['revision'], data['stdlib'], 'Standard library')
base.check_committed(data['revision'], {row['source_input']: row['source_sha256'] for row in data['examples']}, 'Workload')
for row in data['examples']:
assert base.sha(SITE / row['source']) == row['source_sha256']
assert base.sha(ROOT / row['source_input']) == row['source_sha256']
assert set(row['targets']) == {'c', 'go', 'zx', 'wasm'}
for cell in row['targets'].values():
if cell['status']=='unavailable':
@@ -197,7 +166,6 @@ def check():
for file in cell['files']:
path = SITE / file['path']
assert path.stat().st_size == file['bytes'] and base.sha(path) == file['sha256']
assert '\n' + render(data) + '\n<!-- /generated:json_text -->' in (SITE / 'targets.html').read_text()
print('Alpha JSON/text source, artifact, oracle and raw-sample local validation passed')
+89
View File
@@ -0,0 +1,89 @@
#!/usr/bin/env python3
"""Matched frozen-runtime A/B on the existing wasm_tier kernels (physical Alpha)."""
import argparse
from datetime import datetime, timezone
import hashlib
import json
import os
from pathlib import Path
import platform
import random
import subprocess
import sys
import wasm_tier as tier
from benchmark_samples import GATE_METHOD, HostGate, summarize_samples
def identity(path):
path = Path(path).resolve()
digest = hashlib.sha256()
with path.open('rb') as source:
for block in iter(lambda: source.read(1024 * 1024), b''):
digest.update(block)
return {'path': str(path), 'sha256': digest.hexdigest(), 'bytes': path.stat().st_size}
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--before', type=Path, required=True)
parser.add_argument('--after', type=Path, required=True)
parser.add_argument('--output', type=Path, required=True)
args = parser.parse_args()
virt = subprocess.run(['systemd-detect-virt'], capture_output=True, text=True)
if platform.node().split('.')[0].lower() != 'alpha' or virt.returncode != 1 or virt.stdout.strip() != 'none':
parser.error('measurement requires physical Alpha')
if args.output.exists():
parser.error('output already exists')
os.environ['ZIRAN_LEARN'] = 'off'
env = HostGate.environment(tier.platforms.environment())
gate = HostGate()
rng = random.Random(29)
kernels, artifacts, oracles = {}, {}, {}
for name in tier.KERNELS:
bundle = tier.WORK / (name + '.zx')
output = subprocess.run([tier.tool('zi2zx'), 'run', '--backend', 'engine', bundle],
env=env, check=True, capture_output=True, text=True).stdout
expected = '0' if name == 'Printing' else output.splitlines()[-1]
stdout = output if name == 'Printing' else output[:output.rstrip('\n').rfind('\n') + 1]
example = {'id': name, 'expected': expected, 'stdout': stdout}
commands = {'c': [tier.WORK / (name + '-c'), '-', expected],
'before': [args.before, bundle, expected], 'after': [args.after, bundle, expected]}
kernels[name] = (example, commands)
oracles[name] = example
artifacts[name] = {'bundle': identity(bundle), 'c': identity(commands['c'][0])}
artifacts.update(before=identity(args.before), after=identity(args.after),
engine=identity(tier.tool('zi2zx')), driver=identity(__file__))
runs = {name: {label: [] for label in ('c', 'before', 'after')} for name in kernels}
order = []
for round_index in range(11):
jobs = [(name, label) for name in kernels for label in runs[name]]
rng.shuffle(jobs)
for name, label in jobs:
example, commands = kernels[name]
command = [*commands[label], '11']
measured = tier.platforms.measure(command, example, env, gate)
measured['command'] = [str(part) for part in command]
runs[name][label].append(measured)
order.append([round_index, name, label])
print(f'round {round_index + 1}/11 complete', flush=True)
summary = {name: {label: summarize_samples([run['execution_ms'] for run in values])
for label, values in labels.items()} for name, labels in runs.items()}
report = {'host': platform.node(), 'virtualization': virt.stdout.strip(),
'measured_at': datetime.now(timezone.utc).isoformat(), 'learning': 'off',
'rounds': 11, 'samples_per_run': 11, 'seed': 29, 'artifacts': artifacts,
'oracles': oracles, 'order': order, 'runs': runs, 'summary': summary,
'methodology': '11 shuffled matched rounds; identical bundles, frozen static runtime runners and C references. '
'Each run warms 150 ms then measures 11 calibrated batches; every checksum and stdout is verified '
'against the instruction engine. Symmetric inclusive 1.5xIQR applied within each run and across '
'run medians; raw samples and excluded indices retained. ' + GATE_METHOD}
args.output.parent.mkdir(parents=True, exist_ok=True)
args.output.write_text(json.dumps(report, indent=2) + '\n')
print('kernel | C us | before us | after us | after/before')
for name, labels in summary.items():
c, before, after = (labels[label]['median_ms'] * 1000 for label in ('c', 'before', 'after'))
print(f'{name} | {c:.3f} | {before:.3f} | {after:.3f} | {after / before:.4f}')
if __name__ == '__main__':
main()
+2 -2
View File
@@ -39,12 +39,12 @@ def main():
sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest()
libraries = dict(before=args.before_lib.resolve(),current=args.library.resolve())
for label,library in libraries.items():
subprocess.run(['cc','-O2','-D_GNU_SOURCE','-std=c11','-Iinclude','-Icmd/zir','-Ibootstrap/compiler_ir','bench/reachable_types.c',library,'-lm','-pthread','-o',out/label],cwd=ROOT,env=env,check=True)
subprocess.run(['cc','-O2','-D_GNU_SOURCE','-std=c11','-Iinclude','-Ibootstrap/runtime','-Ibootstrap/compiler_ir','bench/reachable_types.c',library,'-lm','-pthread','-o',out/label],cwd=ROOT,env=env,check=True)
meta = dict(schema=1,platform=platform.platform(),repetitions=args.repetitions,before_limit=args.before_limit,measurement_launcher=timer,
compiler_version=subprocess.check_output(['cc','--version'],text=True),cpu_affinity=sorted(os.sched_getaffinity(0)) if hasattr(os,'sched_getaffinity') else None,
environment_switches={k:env.get(k) for k in ['ZIRAN_VERIFY_SYMBOL_LOOKUPS','ZIRAN_PROFILE','ZIRAN_VM_PROFILE']},
libraries={label:dict(path=str(p),sha256=sha(p)) for label,p in libraries.items()},
source_sha256={name:sha(ROOT/name) for name in ['cmd/zir/zir.c','bench/reachable_types.c','bench/reachable_types.py']},
source_sha256={name:sha(ROOT/name) for name in ['bootstrap/runtime/zir.c','bench/reachable_types.c','bench/reachable_types.py']},
caveats=['Two qualified lookups per round: the connected final module and an absent module. Input-graph construction and process startup are outside the internal wall/CPU timers.',
'Cold samples invalidate entry-scope answers each round. Cached samples reuse answers prepared before timing.',
'A supplied nonzero before-limit identifies a known baseline cutoff. Incorrect larger answers are retained and are not equivalent-work speed comparisons.',
@@ -0,0 +1,2 @@
{"asset_bytes":1000000,"bundle_bytes":1000692,"identity":[147,148,66,160,185,37,92,215,181,45,229,48,116,97,194,17,173,248,74,122,33,182,120,24,121,31,155,135,145,43,82,196],"assets_identity":[37,194,20,27,176,58,156,51,209,194,4,13,69,223,87,93,255,20,92,193,155,239,170,211,42,234,171,211,37,3,109,169],"content_identity":[108,103,45,1,245,77,89,231,112,223,169,153,115,163,113,48,113,31,49,89,3,223,68,96,77,140,35,110,78,198,249,239],"samples_ns":[3903304,3873521,4031240,4568817,6078163,3885425,3876850,3944065,3884335,3928744,3890097]}
{"asset_bytes":75000000,"bundle_bytes":75000692,"identity":[147,148,66,160,185,37,92,215,181,45,229,48,116,97,194,17,173,248,74,122,33,182,120,24,121,31,155,135,145,43,82,196],"assets_identity":[140,146,218,49,232,156,101,169,130,212,253,247,203,195,97,51,232,190,195,46,219,94,140,192,154,83,197,124,198,90,126,67],"content_identity":[64,40,38,203,59,101,215,125,236,47,86,79,228,16,218,27,45,233,227,11,167,141,242,136,122,26,95,251,42,38,194,28],"samples_ns":[291416430,283968212,291549050,298719639,289953063,292520883,291144700,294325959,288278339,295167755,294985478]}
@@ -0,0 +1,2 @@
{"asset_bytes":1000000,"bundle_bytes":1000692,"identity":[147,148,66,160,185,37,92,215,181,45,229,48,116,97,194,17,173,248,74,122,33,182,120,24,121,31,155,135,145,43,82,196],"samples_ns":[7222309,6136048,5406500,5068298,5066495,5061515,5073100,5063878,5085195,5071416,5097492]}
{"asset_bytes":75000000,"bundle_bytes":75000692,"identity":[147,148,66,160,185,37,92,215,181,45,229,48,116,97,194,17,173,248,74,122,33,182,120,24,121,31,155,135,145,43,82,196],"samples_ns":[370829279,386735547,372795918,369875583,369998273,368584362,374932839,374786265,367915773,369741776,369379626]}
@@ -0,0 +1,2 @@
{"asset_bytes":1000000,"bundle_bytes":1000692,"identity":[147,148,66,160,185,37,92,215,181,45,229,48,116,97,194,17,173,248,74,122,33,182,120,24,121,31,155,135,145,43,82,196],"assets_identity":[37,194,20,27,176,58,156,51,209,194,4,13,69,223,87,93,255,20,92,193,155,239,170,211,42,234,171,211,37,3,109,169],"content_identity":[108,103,45,1,245,77,89,231,112,223,169,153,115,163,113,48,113,31,49,89,3,223,68,96,77,140,35,110,78,198,249,239],"samples_ns":[4990679,4987763,4987935,5142164,5027256,5087958,5318701,5087849,5219289,5103524,5232645]}
{"asset_bytes":75000000,"bundle_bytes":75000692,"identity":[147,148,66,160,185,37,92,215,181,45,229,48,116,97,194,17,173,248,74,122,33,182,120,24,121,31,155,135,145,43,82,196],"assets_identity":[140,146,218,49,232,156,101,169,130,212,253,247,203,195,97,51,232,190,195,46,219,94,140,192,154,83,197,124,198,90,126,67],"content_identity":[64,40,38,203,59,101,215,125,236,47,86,79,228,16,218,27,45,233,227,11,167,141,242,136,122,26,95,251,42,38,194,28],"samples_ns":[372081671,372255239,371330025,372086237,376693237,368831105,376700490,374658442,371790001,372838035,367910734]}
@@ -0,0 +1,65 @@
{
"host": "alpha",
"physical_host_verified": "systemd-detect-virt: none",
"cpu": "Intel Core i7-8700 @ 3.20GHz",
"affinity_cpu": 3,
"cflags": "-O2",
"learning": "off",
"samples": 11,
"warmups": 1,
"comparison": "sequential before/after, not interleaved",
"source_baseline_revision": "31f41848",
"source_before_sha256": "81643c45850d1651b54589f38746254828e41884c9dc703036af9e84b955dc6d",
"source_after_sha256": "6a0f297a22859a6cbbc51c34cd7fdef383ae4686efc7638827fc9cc018b28a57",
"probe_sha256": "f622aea386518d3da48288321c956709426689637ee60c5006a849de784fd6b6",
"generated_reader_before_sha256": "9c24004eea4ed3ece86a577c6b935a37ee52ba5b0fa18e9f391ebbc80200d7b0",
"generated_reader_after_sha256": "1543fa2b1d5a0febc05f1c121440e5b449f651a7995a77df8fda398bea43d46a",
"executable_before_sha256": "c4eded0e74d65498dc639b38f090aebcb5108dd88ec733b4c2ed194779e8d030",
"executable_after_sha256": "918e9d027125774ab8add1c4e0a27e216662c446aef7e5ba1cc37f6648cb1eb7",
"linked_runtime_sha256": "fe2641e24f151d0d00b8d0316e1b6820bb6eab09f4772ef8458ba93215272d02",
"identities_match": true,
"statistics": "symmetric 1.5xIQR fences, inclusive interpolated quartiles",
"results": [
{
"asset_bytes": 1000000,
"before": {
"median_ms": 5.087958,
"MB_s": 196.5425029058809,
"excluded_indices": []
},
"after": {
"median_ms": 3.890097,
"MB_s": 257.06299868615105,
"excluded_indices": [
3,
4
]
}
},
{
"asset_bytes": 75000000,
"before": {
"median_ms": 372.170738,
"MB_s": 201.52041077447632,
"excluded_indices": [
10
]
},
"after": {
"median_ms": 292.0349665,
"MB_s": 256.8185614855131,
"excluded_indices": [
1
]
}
}
],
"build_command": "env -u DISPLAY -u WAYLAND_DISPLAY CFLAGS=-O2 ZIRAN_LEARN=off LDLIBS=\"$PWD/build/libziran.a\" build-queue -- ziran build --target=c --exe --entry asset_digest:main --root bench --module-path cmd -o build/asset-digest bench/asset_digest.zi",
"run_command": "env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_LEARN=off build-queue -- taskset -c 3 build/asset-digest/asset_digest",
"limitations": [
"Synthetic package; not a Breeze first-frame measurement.",
"Alpha-only x86 result; Android SHA2 throughput is unmeasured.",
"Baseline was taken before candidate; this is not an interleaved comparison.",
"Content verification and byte/work limits are unchanged."
]
}
+48
View File
@@ -0,0 +1,48 @@
# Executable asset digest throughput on Alpha
The reader now uses the existing C streaming SHA-256 implementation. It feeds
whole strings, encodes small integer fields in one stack buffer, and uses the
runtime's shared constants and CPU dispatch. The separate Ziran compressor is
removed. Domain tags, integer byte order, budget accounting and identity checks
are unchanged.
| Synthetic asset | Before read (ms) | After read (ms) | Before MB/s | After MB/s |
| --- | ---: | ---: | ---: | ---: |
| 1,000,000 bytes | 5.088 | 3.890 | 196.5 | 257.1 |
| 75,000,000 bytes | 372.171 | 292.035 | 201.5 | 256.8 |
The 75 MB read takes 21.5% less time. These are direct `ZxExecRead` timings on
physical Alpha (Intel Core i7-8700), pinned to CPU 3, compiled with `-O2` and
learning off. Each series has one warmup and eleven retained raw samples.
Before and after were measured sequentially; they were not interleaved.
All program, asset and content identities match between implementations.
The same symmetric 1.5×IQR rule with inclusive interpolated quartiles applies
to every series. Excluded sample indices remain in the metadata.
The baseline reader source matches the current checkout before the change.
Only `compiler_exec_link.zi` changed on Alpha between accepted measurements;
the linked runtime archive, compiler, probe and other sources stayed fixed.
The temporary reader source edit was restored afterward. Source, executable,
generated-reader and runtime hashes, exact commands, excluded indices and
computed medians are in [metadata](asset-digest-alpha-metadata.json).
Raw samples are in [before](asset-digest-alpha-before.jsonl) and
[after](asset-digest-alpha-after.jsonl). An earlier exploratory baseline,
before adding all identity fields to the probe's output, is retained in
[initial baseline](asset-digest-alpha-before-initial.jsonl) and is not used
for the table. The reusable probe is [asset_digest.zi](../asset_digest.zi).
This is a synthetic asset-size measurement, not Breeze's startup or first-frame
time. Android SHA2 acceleration and the application's nested bundles still
need measurements on the device. A parent asset digest and a nested bundle's
program/asset/file digests cover different byte streams and domain tags, so
this change does not skip or reuse any of those validation steps.
Local verification: the executable bundle test passes independent SHA-256
asset identity vectors at 17 sizes (empty payload, SHA padding and block
boundaries, binary bytes, and more than 1 MiB), plus reader rejection after
payload mutation. Forced portable SHA dispatch passes the same bundle cases.
`env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_LEARN=off build-queue -- sh -c
'make check && make check-bootstrap'` passes all 271 retained local tests
(284.7 seconds, none reused), and bootstrap output matches. The benchmark
registry test also passes; `bench/bench.zi -- asset-digest` supplies the
compiler module path and runtime archive used by the probe.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,14 @@
{
"baseline_receipt": "bench/results/c-teacher-alpha-six-before.json",
"baseline_original_receipt": "bench/results/wasm-tier-targets-2026-11-16.json",
"after_receipt": "bench/results/c-teacher-alpha-six-after.json",
"meaning": "Calls is folded Fib(20); this control measures wrapper/startup, not recursive-call performance.",
"complete": true,
"five_fresh_baseline_native_artifacts_match_historical_six": true,
"harness_original_sha256": "aaa48e7b68a238e20c33ac07762269f6ab3dce251aa463b0d95c098da0ec9044",
"harness_control_sha256": "10f6981cb077a700e1dc15b5b4009eb5c039ef3c0528479df770060f26207dcc",
"calls_native_artifact_unchanged": true,
"tools_unchanged": true,
"harness_restored": true,
"finished_unix": 1794863895
}
@@ -0,0 +1,65 @@
# C teacher: physical Alpha checkpoint, 2026-11-16
Compared the baseline [compiler revision](https://github.com/ziranlang/ziran/commit/96c23c7de6bc622225a916dfce18bff04486ba2b) with the [verified learning feature](https://github.com/ziranlang/ziran/commit/36e6caf9643d82b58434f11aad507da79f895922) on physical Alpha, Intel i7-8700. This is a fixed, pushed compiler comparison; later SSA, rotation, vectorizer and returned-record changes are outside this checkpoint. Learning recording and runtime checks were off. All builds and measurements ran serially through Alpha build-queue; every timing has eleven raw samples and symmetric inclusive-quartile 1.5×IQR exclusions.
The [before](c-teacher-alpha-2026-11-16-before.md) and [after](c-teacher-alpha-2026-11-16-after.md) assembly reports cover all six kernels, Button, Text, Input and hello with GCC 15.2 and Clang 21.1.8 at `-O2`. The after report has 1,506 ranked function comparisons and zero failed workloads. Native map extents identify functions, backward branches identify static loop envelopes, and SIGPROF supplies estimated function shares. Counts and weighted excess are inspection priorities, not cycle estimates or speedup predictions.
| Ranked finding | Native / C instructions | Native stack reads / writes | Function SIGPROF share | Owner |
| --- | ---: | ---: | ---: | --- |
| Records / Clang | 382 / 73 | 4 / 260 | 162 / 162 | records and aggregate lane |
| Sieve / Clang | 77 / 36 | 2 / 2 | 163 / 163 | SSA, rotation and loop lane |
| Hash / GCC | 50 / 26 | 0 / 0 | 158 / 158 | SSA and loop lane |
| Printing / GCC | 59 / 32 | 5 / 5 | 35 / 99 | call and memory selection candidates |
Vectors illustrates the limits of instruction counts: native has 104 instructions versus GCC’s 109, yet runs slower. Native has eleven stack reads and eleven writes versus seven and eight; GCC uses vector registers in its reduction. Stack traffic includes locals and saved registers, and vector-register uses include scalar floating point. Back-edge envelopes include cold paths; loop constants and missing C symbols do not prove LICM or inlining opportunities. Widget startup samples include session/theme setup and do not replace warm scenario timings. Zero samples mean unknown share. Existing detailed path findings were routed to the records, loop and vectorizer owners; this checkpoint adds the controlled Alpha measurements.
Fresh kernel medians, microseconds per call:
| Kernel | Native before | Native after | C after | Native/C after |
| --- | ---: | ---: | ---: | ---: |
| Sieve | 64.481 | 64.040 | 34.923 | 1.83 |
| Records | 47.748 | 47.181 | 15.743 | 3.00 |
| Hash | 40.322 | 40.406 | 27.961 | 1.45 |
| Vectors | 62.574 | 62.221 | 32.703 | 1.90 |
| Printing | 11.292 | 13.047 | 9.352 | 1.40 |
The [fresh baseline](c-teacher-alpha-before.json) and [fresh after receipt](c-teacher-alpha-after.json) use the standard lane’s current five-kernel harness. Sieve and Hash emit identical native artifacts before and after, so their small timing differences are noise observations. Records, Vectors and Printing artifacts change. The small Records/Vectors timing changes do not establish a useful speedup; Printing regresses from 11.292 to 13.047 µs and remains open. Native timings amortize one process over 32 calls; C, engine and Wasm time warm in-process calls. Compilation is excluded.
The original request also includes Calls. The standard lane removed it from its current timing list because Fib(20) is constant folded. The [six-kernel baseline](c-teacher-alpha-six-before.json) preserves the earlier physical-Alpha receipt at the same baseline revision (19:35 UTC), and the [six-kernel after control](c-teacher-alpha-six-after.json) restores Calls for a separate 21:18 UTC run. All five fresh baseline native digests match that older receipt; Calls itself has exactly the same native artifact before and after. Its native median is 6.129 → 5.954 µs (C after 11.450 µs). This is a historical control of a folded result and wrapper/startup overhead, not a fresh paired measurement of recursion. The [control receipt](c-teacher-alpha-2026-11-16-calls-validation.json) records the temporary list change, unchanged tools and exact harness restoration.
Fresh widget medians, microseconds per scenario:
| Widget | Native before | Native after | Improvement | C after | Go after |
| --- | ---: | ---: | ---: | ---: | ---: |
| Button | 8.807 | 6.969 | 20.9% | 2.726 | 4.162 |
| Text | 9.716 | 8.557 | 11.9% | 3.129 | 3.735 |
| Input | 12.882 | 9.963 | 22.7% | 3.924 | 6.610 |
The [before](c-teacher-alpha-2026-11-16-widgets-before.json) and [after](c-teacher-alpha-2026-11-16-widgets-after.json) widget receipts use the same Kryon revision and manifest. They exercise public layout, interaction and paint-command generation with checked batches, excluding pixel rasterization, system fonts and OS I/O. These improvements cover the integrated compiler revisions, including the constructor lane; they are not isolated gains from the learned scalar idioms. The gap to C and Go remains open.
Provenance required a correction: Alpha’s Kryon manifest pins Ziran v0.5, and `--project` selected that cached compiler even when invoked through the current launcher. The site harness’s compiler metadata alone did not establish the selected compiler. Earlier attempts failed safely and restored source/tools. Both accepted stages used an ignored temporary local override:
```toml
[overrides]
ziran = "/home/wao/Projects/ziranlang/ziran"
```
Before each accepted stage, the absolute current `build/bin/ziran pkg path ziran` command from Kryon’s directory resolved to that canonical compiler repository. Generated widget IR was archived and regenerated. The local override and lock bytes were restored afterward. Omega already had the canonical local override, so this discovery does not invalidate its previous widget checkpoint. The parent coordinator and widget lane received the compiler-selection metadata issue for routing a general harness fix.
The [validation receipt](c-teacher-alpha-2026-11-16-validation.json) records eight tool/runtime hashes, aggregate digests over 1,811 baseline and 1,819 after source files (compiler, harness and Kryon inputs), stable hashes during each stage, and exact preservation of `bench/standard` plus `build/standard`. All 336 tracked compiler/stdlib inputs were verified against the pushed target tree. The receipt retains the failed incremental target build and the successful full rebuild recovery; restored archive timestamps had left generated engine files stale. Both accepted compiler epochs use a full forced rebuild.
Exact accepted build/measurement commands, inside Alpha `build-queue`, with `ZIRAN_LEARN=off`, `HARMONY_BUILD_LOCAL=1`, and display variables removed:
```sh
make -B -j2 all
build/bin/ziran run --target=c bench/bench.zi -- wasm-tier --samples 11 --label c-teacher-alpha-before --output bench/results/c-teacher-alpha-before.json
build/bin/ziran run --target=c bench/bench.zi -- library-targets --project /home/wao/Projects/kryonlabs/kryon --manifest /home/wao/Projects/kryonlabs/kryon/tests/widget_benchmarks.json --samples 11
build/bin/ziran run --target=c bench/bench.zi -- c-teacher --output bench/results/c-teacher-alpha-2026-11-16-before.md
make -B -j2 all
build/bin/ziran run --target=c bench/bench.zi -- wasm-tier --samples 11 --label c-teacher-alpha-after --output bench/results/c-teacher-alpha-after.json
build/bin/ziran run --target=c bench/bench.zi -- library-targets --project /home/wao/Projects/kryonlabs/kryon --manifest /home/wao/Projects/kryonlabs/kryon/tests/widget_benchmarks.json --samples 11
build/bin/ziran run --target=c bench/bench.zi -- c-teacher --output bench/results/c-teacher-alpha-2026-11-16-after.md
build/bin/ziran run --target=c bench/bench.zi -- wasm-tier --samples 11 --label c-teacher-alpha-calls-control --output bench/results/c-teacher-alpha-six-after.json
```
All accepted commands returned zero. The completed feature’s Ziran differential tests compare 70,210 C/native output lines across 34 multiply factors, deterministic edge/random inputs and eight integer widths, followed by retained parity. Offline training twice produced byte-identical checked-in table source. Full retained local tests and bootstrap provenance, including concurrent peer changes and the later successful focused site reruns, remain in the [Omega feature summary](c-teacher-omega-2026-11-16-summary.md). No compiler source changed for this report milestone. CI has not been checked for this report. Alpha build tools were updated for measurement; this does not claim an owner launcher installation or a release.
@@ -0,0 +1,195 @@
{
"schema_version": 1,
"host": "alpha",
"virtualization": "none",
"learning": "off",
"checks": false,
"started_unix": 1794863300,
"baseline_revision": "96c23c7de6bc622225a916dfce18bff04486ba2b",
"target_revision": "36e6caf9643d82b58434f11aad507da79f895922",
"commands": [
{
"command": [
"make",
"-B",
"-j2",
"all"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"wasm-tier",
"--samples",
"11",
"--label",
"c-teacher-alpha-before",
"--output",
"bench/results/c-teacher-alpha-before.json"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"library-targets",
"--project",
"/home/wao/Projects/kryonlabs/kryon",
"--manifest",
"/home/wao/Projects/kryonlabs/kryon/tests/widget_benchmarks.json",
"--samples",
"11"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"c-teacher",
"--output",
"bench/results/c-teacher-alpha-2026-11-16-before.md"
],
"code": 0
},
{
"command": [
"git",
"fetch",
"origin",
"master"
],
"code": 0
},
{
"command": [
"make",
"-j2",
"all"
],
"code": 2
},
{
"command": [
"make",
"-B",
"-j2",
"all"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"wasm-tier",
"--samples",
"11",
"--label",
"c-teacher-alpha-after",
"--output",
"bench/results/c-teacher-alpha-after.json"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"library-targets",
"--project",
"/home/wao/Projects/kryonlabs/kryon",
"--manifest",
"/home/wao/Projects/kryonlabs/kryon/tests/widget_benchmarks.json",
"--samples",
"11"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"c-teacher",
"--output",
"bench/results/c-teacher-alpha-2026-11-16-after.md"
],
"code": 0
}
],
"stages": {
"before": {
"revision": "96c23c7de6bc622225a916dfce18bff04486ba2b",
"tools": {
"build/bin/ziran": "dd24f284ee21f1217a245b608a1a33b1632fcdbc0ce8938a963e35dcfa3d4f29",
"build/bin/zi2c": "2e21cbdd222519dc2f54993721c5168719b0340fc00d4271c4ca101dd8300152",
"build/bin/zi2go": "0628df64c2fc17eee1fb64d73e8182906cb559123668a0e648023b8adf1c34d9",
"build/bin/zi2zir": "0bea673e4df7d9d8446e179564e60ebab8be739839b6b1047d9a7a8f56f55bd7",
"build/bin/zi2zx": "eb47203a4eef36585fcca75340e026e86b2fd34895b22c8dda342e127f956c00",
"build/bin/zx2native": "c1cf0932e45b017e8fbc90bb935966c4e67dbd4e700e22ecd52e0346597e1433",
"build/bin/zx2wasm": "f621cdbae99ed4abf839861905eba2c22a18839a7c18c3da3d4f7e41bc05ba75",
"build/libziran.a": "fdc99f231806aeed93dd1079625cb7e15903051beda4a34d040c22a3d01b4344"
},
"tools_unchanged": true,
"source_files": 1811,
"source_epoch_sha256": "e8065511e450ff5bd6cc5c6bc4fc19122d6c2c6de7b3f58fa6d2d57fb3b27297",
"changed_sources": []
},
"after": {
"revision": "36e6caf9643d82b58434f11aad507da79f895922",
"tools": {
"build/bin/ziran": "6f2433eefc3721145be0a6527a77156067b45e78f092d9c8c3e08c40b69c2e39",
"build/bin/zi2c": "2e21cbdd222519dc2f54993721c5168719b0340fc00d4271c4ca101dd8300152",
"build/bin/zi2go": "0628df64c2fc17eee1fb64d73e8182906cb559123668a0e648023b8adf1c34d9",
"build/bin/zi2zir": "0bea673e4df7d9d8446e179564e60ebab8be739839b6b1047d9a7a8f56f55bd7",
"build/bin/zi2zx": "50f84b648068e97d7e7ded2937f8cc4400edf5ba9a9b113f61e280275972777f",
"build/bin/zx2native": "3e4ce36573c6bc0857b3a571e10088c24464093b5d08a1a7369a1af0cc75891f",
"build/bin/zx2wasm": "f621cdbae99ed4abf839861905eba2c22a18839a7c18c3da3d4f7e41bc05ba75",
"build/libziran.a": "9d160e94e3a009ad9881171570ae3aa720e4e5b380bebfc79dfa185831158b4e"
},
"tools_unchanged": true,
"source_files": 1819,
"source_epoch_sha256": "68b334fd8ed3cc79bc3fc23efb0c5d8a448116fa6f5300f310423034b97a22d8",
"changed_sources": []
}
},
"complete": true,
"preparation_retry": "Prior attempts rolled back. Kryon --project selected pinned v0.5 despite current launcher; use temporary ignored local toolchain override and verify selected compiler path. Rebuild baseline completely and regenerate widget IR.",
"standard_before_sha256": "283ab41156a967162e807d9dedd78aec2a1b54f7fc05f6543fb57784fa2db19b",
"widget_selected_toolchain_before": "/home/wao/Projects/ziranlang/ziran",
"verified_compiler_source_files": 336,
"kryon_configuration_restored": true,
"standard_after_sha256": "283ab41156a967162e807d9dedd78aec2a1b54f7fc05f6543fb57784fa2db19b",
"standard_unchanged": true,
"finished_unix": 1794863723,
"recovered_attempts": [
{
"error": "command failed: make",
"rolled_back": true,
"reason": "Restored archive timestamps left generated engine files stale; force a complete target rebuild."
}
],
"recovery_command_start_index": 6,
"widget_selected_toolchain_after": "/home/wao/Projects/ziranlang/ziran"
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,117 @@
{
"schema_version": 1,
"native_sha256": "9978ae84253c8a66826459bd18f3379aa9b73784caf6e1942727fc5bffbfe82e",
"zx_sha256": "5c47cb8218aeed347661abe511c183dca5e1278e852b5791595e3dcbe7f4b75e",
"c_sha256": "c77c158bdc0e61b8c246fb0fb2efd8e62a5f537c6e0ef7fc7e573b897bd6d311",
"compiler": "cc (Debian 14.2.0-19) 14.2.0",
"candidates": [
{
"rule": "x86-multiply-constant",
"function": "tree_input_SecondaryPointerSample",
"factor": 3,
"native": "imul r11,rax,0x3",
"teacher": "lea rdx,[rax+rax*2]",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "tree_TreeRead",
"factor": 65536,
"native": "imul r11,rcx,0x10000",
"teacher": "shl r8,0x10",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "cursor_CursorHoverFrameStart",
"factor": 16,
"native": "imul r11,rax,0x10",
"teacher": "shl rdx,0x4",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "paint_queue_SnapshotTextJoin",
"factor": 512,
"native": "imul r11,rdi,0x200",
"teacher": "shl rax,0x9",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "tree_TreeStoreLabel",
"factor": 65536,
"native": "imul r11,r9,0x10000",
"teacher": "shl rdx,0x10",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "contextmenu_Draw",
"factor": 16,
"native": "imul r11,rax,0x10",
"teacher": "shl rbx,0x4",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "cursor_CursorHoverFrameCommit",
"factor": 16,
"native": "imul r11,rax,0x10",
"teacher": "shl rax,0x4",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "svg_icon_behavior_PaintSvgIcon",
"factor": 5,
"native": "imul r11,r14,0x5",
"teacher": "lea rdx,[r12+r12*4]",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "svg_icon_behavior_SvgIconTexture",
"factor": 5,
"native": "imul r11,rcx,0x5",
"teacher": "lea rcx,[rcx+rcx*4]",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "svg_icon_behavior_SvgIconCells",
"factor": 5,
"native": "imul r11,rcx,0x5",
"teacher": "lea rsi,[rcx+rcx*4]",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "svg_shape_ShapeCoverEdges",
"factor": 16,
"native": "imul r11,rcx,0x10",
"teacher": "shl r12,0x4",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
},
{
"rule": "x86-multiply-constant",
"function": "svg_shape_ShapeAddEdge",
"factor": 16,
"native": "imul r11,rdx,0x10",
"teacher": "shl rdx,0x4",
"precondition": "integer-modulo-width; flags-dead; no-memory",
"verified": false
}
]
}
@@ -0,0 +1,78 @@
{
"started_unix": 1794856923,
"revision": "42dc1b0f41489e8affae19815a52aa3a875ff0d9",
"commands": [
{
"command": [
"make",
"-j1",
"check"
],
"code": 0
},
{
"command": [
"make",
"-j1",
"check-bootstrap"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"wasm-tier",
"--samples",
"11",
"--label",
"c-teacher-final",
"--output",
"bench/results/c-teacher-omega-final.json"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"library-targets",
"--project",
"/mnt/storage/Projects/kryonlabs/kryon",
"--manifest",
"/mnt/storage/Projects/kryonlabs/kryon/tests/widget_benchmarks.json",
"--samples",
"11"
],
"code": 0
},
{
"command": [
"build/bin/ziran",
"run",
"--target=c",
"bench/bench.zi",
"--",
"c-teacher",
"--output",
"bench/results/c-teacher-omega-2026-11-16-final.md"
],
"code": 0
}
],
"changed": [
"cmd/compiler_machine_aggregate.zi",
"tests/machine_place_cases.zi"
],
"finished_unix": 1794857182,
"complete": false,
"source_files": 1056,
"start_epoch_sha256": "d1189e0d940d29b38732e3f6ba42344977b296d1369f10cf5c663f9671082574",
"end_epoch_sha256": "76ce23f6965ad9660265dd485aaf17fee1e3a52457918f76f8b191efcf10fdde"
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,52 @@
{
"schema_version": 1,
"host": "omega",
"learning": "off",
"checks": "manual-safety default; test-specific assertions retained",
"github_ci": "not checked",
"local_tests": [
{
"receipt": "16151a4867e2fa478e3d0afde52731aaa7a0",
"revision": "42dc1b0f41489e8affae19815a52aa3a875ff0d9",
"suite": "make -j1 check",
"code": 0,
"passed": 281,
"total": 281,
"bootstrap_code": 0,
"source_guard": "two concurrent constructor files changed; compiler binaries unchanged"
},
{
"receipt": "34159fa4c599897ee55a627d0b74327deffa",
"suite": "constructor canonical build, check and check-bootstrap",
"build_code": 0,
"bootstrap_code": 0,
"passed": 279,
"total": 281,
"source_guard": "3409 guarded inputs and seven compiler identities unchanged",
"failed": [
"site_pages.sh: missing targets receipt",
"site_targets.sh: Publish one measured host"
]
},
{
"receipt": "8382856e6704249164010f4a322be36d05e9",
"revision": "efefbb1f40dacbd00972b41126bc26ef5349463e",
"command": "env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_LEARN=off HARMONY_BUILD_LOCAL=1 build-queue -- sh -c 'sh tests/site_pages.sh build/bin/ziran && sh tests/site_targets.sh build/bin/ziran'",
"code": 0,
"result": "Both prior publication-data failures resolved; pages, matrices, hashes, samples and independent artifact oracles passed."
}
],
"learning_verification": {
"receipt": "d001bab87cfb730312d572c86d3128929bc9",
"differential_output_lines": 70210,
"retained_zx_parity": "passed"
},
"offline_calibration": {
"receipt": "e5cffefb436f30c04174e17009bdec81bc1a",
"c_optimization": "-O2",
"deterministic_training_repeat": "byte-identical",
"selected_policy": 1,
"leaf_operations": 0,
"same_artifacts": "Both leaf settings produce identical artifacts for all six kernels."
}
}
@@ -0,0 +1,9 @@
{
"schema_version": 1,
"compiler_identity": "d55316e60ab0235601d973b6f8486b4afd56bfb67a91960eccef58bd0f855b34",
"evidence_sha256": "2f53cf40a46149669ee62d3efe39e5fb676b8a629be93fdea7183c78695ccee7",
"fixture_sha256": "4b7385ea2655619107c8356699dc898c908b726dbd5b10d236bc39bbed207062",
"parity_list_sha256": "cdf4b85dba5869f940f5a28a6d0e39a58d2179d41e6c4bedfce6798bf793fd47",
"table_sha256": "6dc93292225b19dff574d79d2e41f43a79f6664dab8e5e0bf76d186746272b4c",
"verified": true
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,207 @@
{
"schema": 1,
"started_unix": 1794851103,
"start": {
"Makefile": "05f3a05a07580c113c3c2e41e122fb2fda564fdbab2406c0daafe3558f0d9919",
"assembly.mk": "35cc7ad2f0897895f8aa498e4cbd6660a4981fe068eb0944897469e4fa5014ba",
"bench/bench.zi": "e725a1f50a8ddb30ba19c5e3e1165a98ba7df0ce2836fa4d7d7e42e51fabbec1",
"bench/c_teacher.zi": "0f302d034bd0abb7a94a04c1052b51d4b147390ae854b43fa5beda3e64ba4ce0",
"bench/c_teacher_assembly.zi": "af71355d406f4a0fae62c90ff7774b3c09af01ceeab8ce96bff366f4ec6ffb2f",
"bench/c_teacher_profile.zi": "8bf97b7a800bb9ae617a1d04eb1877aa419632ff725541b8d57a9eb064b771c7",
"bench/c_teacher_rules.zi": "c8bd719f89b63c69eb68f6e5104893614e42f490997ef7ca56907d715898b2cc",
"bench/wasm_tier.zi": "0e6bdffd2b7dd8b7f6df7b3665393a17d1b840e4b48bb4b88d110d27b84dde91",
"build/bin/zi2c": "549a9b9f3600255c4b8af83947661f92ec8db8a97d80d26392b1674a8bc59f27",
"build/bin/zi2zx": "582853558ec22e178d5e8f4f802802b2c81ffc2607b6e258259bc59dbae00520",
"build/bin/ziran": "5597a16f7fc6cfb32c9e1ac4bdccbda176ca402620e641944f099b270b40988b",
"build/bin/zx2native": "fc7dd7c5f4409c68a26b634888085d39b7fa0592398119bbed7bdb09a9f4867d",
"build/bin/zx2wasm": "9de465c0be09ae7c03d0f4a10ff5ce88c3a4ec473cf7a9a5662a93acd0090637",
"build/libziran.a": "e7c22c683f3711b8f0d2d8203a2ab234d29d2457940296abb552ed20960a721e",
"cmd/compiler_aarch64.zi": "6e6290525bd8ffcd58f5c38c191e7b39090d7af2b5cf1aeabcfc99b676928a75",
"cmd/compiler_abi.zi": "2563e498e4a09e7ff41eb330c1055167ec92828758c5873ab551221214119399",
"cmd/compiler_arm_bytes.zi": "ff30a43a4b0729f0690102b9b1870d8584fe604baf8f659a37edb3c958095552",
"cmd/compiler_armv7.zi": "1e1364169f7b4b679e9db6d8d1e0be0efbc9955d37b1de1f931de1f8a9d0c0fe",
"cmd/compiler_backend_cache.zi": "5a76c6cc76373475ef3f3a9f858abae7970e4fd21f06128749574518d2b47903",
"cmd/compiler_backend_process.zi": "db1452d9aa71a3cfc3b7e1b709ea285e73d52fbcd392a9587a4da3603f836817",
"cmd/compiler_bundle.zi": "b2442aba7e10a91d8ef422f3ae9d42aa3a82873e26d23bf0aefd116819419a92",
"cmd/compiler_declaration.zi": "4b243127fbda612bb75399d35a0e5a62b926b06cd21668ecf4967b0fb44a683b",
"cmd/compiler_enum.zi": "3bb33881dd63ef654f3f3b7b2d0201a82df84e50fbb04f3ebf3f748aeac63214",
"cmd/compiler_exec.zi": "4c7a89ec2854db68ed159b95132177e526e42108c6a120160ebf1e40d431644c",
"cmd/compiler_exec_debug.zi": "aa1b2141fd720cb6541e7b729ffbd0e3f2af15d207ea6ec4367fe51f8f040284",
"cmd/compiler_exec_link.zi": "81643c45850d1651b54589f38746254828e41884c9dc703036af9e84b955dc6d",
"cmd/compiler_exec_serial.zi": "f7057b91f1371862c5f95a6da507ef5ab87564cd8183c8e275b158e93aef21d0",
"cmd/compiler_expression.zi": "ae9ae5bef1606eb6146bd0b44ccbab9a98e18455c76d3feee24e0f1fb28b7e02",
"cmd/compiler_ir.zi": "541000ea6b99130911da25e05e5318f69d4689bf830668a7f2d7a2dd781da946",
"cmd/compiler_law.zi": "ea7a848dbfce6244bd5f576ba2d4808ab4a7439eb488f734ac488d7bc52aba06",
"cmd/compiler_learning_policy.zi": "0664cdd8661832eedfd7bacb4edc53dc72effd4549ef3bc9b3d7d1638c659e57",
"cmd/compiler_link.zi": "34303bb84496bf662f3e1e10ecda6dcbf9d8190c2bbec8d9e21c5d94c04cce02",
"cmd/compiler_lowered_ir.zi": "8ec004a5862e1511edca0de5c9b02f552a53992c3c791a53e909385f318987a4",
"cmd/compiler_lowered_proven.zi": "75f4ea7dc721078b982bb7b3d156ab1c63d4f3b0fe6dfe78cbbd2fc5a7bca7aa",
"cmd/compiler_lowered_verify.zi": "f7051f16f19c4d2ba90e3147285c9f193280bc2d11bdc46117e0185b282ccd8c",
"cmd/compiler_machine_aggregate.zi": "16d5e7ed5f3cfe04ad400edae311caaca4c4e4cee9a5e033f92acbb0b6a075ce",
"cmd/compiler_machine_elf.zi": "4b3388d402a74dd06077bb9de6295fd9af080dde9e7b57d77bb9c9a17c7e1982",
"cmd/compiler_machine_fields.zi": "9f3e21befa992755ae86695bea8245c26aa6530146e8f9adc38c79ec02d8daed",
"cmd/compiler_machine_image.zi": "a9adc6b4e330f4366120719a8fd054ba5721cc7d21c4ab37c4e90ca4af0ad6a6",
"cmd/compiler_machine_ir.zi": "66597bf7c70717f51897af8f705a70912c2e9b6c6eab7a59229dead32cd9a8b1",
"cmd/compiler_machine_lower.zi": "927ecd665617665a7fb0137a2d54f92a79d4e81587ec9ce37f9465e246aa73a9",
"cmd/compiler_machine_pe.zi": "282b2bbf3e9984f605bd5f9c7e78f17434198a065693f6fcdbf5b99dc20de5ea",
"cmd/compiler_machine_pipeline.zi": "873bdd8fb8dde2e9110beb40f538b251cd9ffa3b99c585c43ce99ee046f7b138",
"cmd/compiler_machine_select.zi": "086467c928a6ad77f60388ebe6f65406fd51df8fc595734affca3c9f6ab1bf56",
"cmd/compiler_machine_verify.zi": "e8cf207237a2316649171b95196493b225fad3a4bb0e34864060215ba7901a26",
"cmd/compiler_machine_verify_allocated.zi": "39d018331ce8b54d3d835d77b44200d248a0b36c15af7d39d9ca46158361a69b",
"cmd/compiler_native_cache.zi": "0035b3d5549ca11a77cdf90267bbde11c59443abfaf8e1e9ee3a95e82b2fb290",
"cmd/compiler_native_names.zi": "785afd249f662ccee7618a8047f3a7e4912301802c60a6056b87dbd2d744adde",
"cmd/compiler_opt.zi": "05189b0d37431433cb92c6d3ba8ef93e1c43b20b21a80ef9ae0614c0c1663173",
"cmd/compiler_opt_rotate.zi": "1e0de077d2bb2cd0dd82844eec3b02af76caa23b0e139e4e9dfee4bac68639b8",
"cmd/compiler_opt_ssa.zi": "d48ffcab34672abb811f62e1ec4c6ece48796ca915aa88f737a64ac3a06ba6e0",
"cmd/compiler_parse.zi": "faeff7c000d4dedf9c6172aa7fe191f8051d6d161fef3301871e6d2456476c50",
"cmd/compiler_proof.zi": "b750025110bbf98bd481225d35893503d636167b05c5f8f676d14f1b21c4045a",
"cmd/compiler_proof_kernel.zi": "ef6ef0e45033d412e69f665d0adab88cf7b8447e6b7d2380285256bf8b560657",
"cmd/compiler_regalloc.zi": "c685aa88b55f3818815f647827108b4a430ede7eb23dc068832a843cf7a1ce05",
"cmd/compiler_runtime.zi": "76a03293273f596114419c57ae2d7d90bcbb3601f53ca3bea2aa493fa7c45333",
"cmd/compiler_runtime_emit.zi": "75cac74ccd128c798b138cc8debf12bfe32a73374a59ed38c2da544a5ea5e8c0",
"cmd/compiler_scan.zi": "7a5543ff4d2a948662a73799cef24d5493f6d8f2c00bc8e9c79966bc3e08ebf6",
"cmd/compiler_services.zi": "44e86142a49ca50c93d2ee4549a62d5d910039a26bed8edba9eee6e32ad100c8",
"cmd/compiler_source.zi": "b72e15ebf7db2ca8701443be8665b521550e6365278d0451972b13012749f6a1",
"cmd/compiler_statement.zi": "9cab342dfca003629336188001161db10da1bfffb81c4a72762c7ac825014147",
"cmd/compiler_target.zi": "45aa88ad0735e0728084e298d3384f58dde43552205713eb21ba45a4efdf6996",
"cmd/compiler_text.zi": "6c984ceb501cf4910f1f188a8a194724e1153b2ccf64425d183572c48b3b521b",
"cmd/compiler_type.zi": "c855d452c68ef1143c0b2c0bb5e8124b0c2eb98194357ea20459290099664392",
"cmd/compiler_x86_64.zi": "46f5507aeed0ccb72d1db423f8ad9b5e421d3f5d56e334d0adb0a95aedd1a7b5",
"cmd/compiler_x86_bytes.zi": "e657e4757e6e44f58bdf3c797de83ef4ec9d29cf9cdfb9945e38b5af8ba6add5",
"cmd/compiler_x86_host.zi": "62790138a13faee1421e7ed381d049b31681cdd0215ea23fed86205554f99fab",
"cmd/compiler_x86_image.zi": "002266f04f7ef848df21c7561f42ddffbc23f80fc990a1f9100bdeef8c41dace",
"cmd/compiler_x86_runtime.zi": "c1a5a8cf1a1979052b1e367670a297e68fe772aaf7b0be4cf3bd9a5aa743ff95",
"cmd/compiler_x86_win64.zi": "56579376dde03d3fae4c14a52db835eb30ee9f3ed034bd057af87c8389a011e7",
"cmd/compiler_zir_lower.zi": "5a256120bf827f1973e07db313abc5ebe233bfac27c4bb8b2a1f8ebce8fde83a",
"cmd/diagnostics.zi": "bab7e536840cbfd0bf376586f79dd2aaeced3d7ead8e993f32a916a2a00a2efd",
"cmd/edit.zi": "0b7754a51bfdb9f977502033fc8d0d37e338199c6303b72c6f56068b735a3c1d",
"cmd/format.zi": "1d3a98b9f2bcb8bb4397addbaa79c482a248a4a1c90a65469a43baf3093df49e",
"cmd/format_source.zi": "dab11397691519e67cbf1b6d28a1c56511ab6e9f1a8173495895c301964d2166",
"cmd/package.zi": "d5d7c5943018b0dde1f2e7bea6cc748d00329aa1b3ae09c1dfaf6050b40164e2",
"cmd/package_add.zi": "73d66ff9c67140ec2ea027aa9c6de35c116c0387863c83cd250bf98146cd391c",
"cmd/package_artifact.zi": "4233d6388cd50e361a4bd1dd9cb7406ae8c118466ea07c05e3c971cca7f50c1a",
"cmd/package_bundle_run.zi": "f6e7d9812e441bc7e5c5e11a14c821a31144b18ef49726e5c81ed81e5f9b7a75",
"cmd/package_capabilities.zi": "5d02a368970770d83a2743904c11f96d554fcfed54ef626c120b02b0699b9547",
"cmd/package_common.zi": "d9a532f872397a1d85af3fa9c0e6880c84a4fdd08414d81c42eb092e11a4eaa6",
"cmd/package_compile_commands.zi": "3c89799708f97fb2cb7df2addaa79cab488bfd6cdfb981fa7400911a39f30651",
"cmd/package_entry.zi": "e38f333965caa5a04333ec4bf5049e9c4c8fbec11dc21a564caca9b0128c8457",
"cmd/package_explain.zi": "a66faa839eab24613009572eb26c29103b83f27ead407a5082545cf6821fd51d",
"cmd/package_features.zi": "1558d4bbe5a8bad6980cd0a36618e86af8172ff18ae56563e61991f4bc0cb780",
"cmd/package_guide.zi": "4f37a7e919d9724f422bb0bc31f16cb00f53dd15faefe0951ca2004e80957f66",
"cmd/package_learn.zi": "00a9b8f0cd272cc80cff0fb902424abc2116ba6e2b155e4e54a29918a05fc148",
"cmd/package_lock.zi": "e7ec127c0d5c67062d1bc7bde60fea6c731589ebdfdfa5c49a9a22723e500527",
"cmd/package_manifest.zi": "7c3e09a31e2c6fee8f24332c488d7e47919d231e6807b8ff1a3977f0b19712af",
"cmd/package_map.zi": "f5237bf7644c72fc8fd8215dbea21c11ea5902fab55c94793161e18c922f5662",
"cmd/package_options.zi": "2bbe79bfb722160835c982d467039a503d654177f45ef927af53b9443d4f64f1",
"cmd/package_process.zi": "cacac81d35ccfaeceb65a320844b9d6b067a46dcd9e88310fa1a9e0f42d8abce",
"cmd/package_script.zi": "a424b568ca6c9c7d6c6e000df3fe64768d21d8f3551c5885b1d2920f79099f43",
"cmd/package_source.zi": "d85372881205f92f9e26b3afd1e9f401d324af3958a57af66f6aafec5c98c02a",
"cmd/package_template.zi": "04c681f5b549ed446d0e085f7b2f2aea16dbb0433de774974a80884f09707682",
"cmd/transport.zi": "4b18fa172dc12b15dedabdcfdd2d2dba257b48edccadd08c1ff76cff8977f8af",
"scripts/site_library_targets.py": "09eab054f7b4236ba6db4e0b62fd423d068805636cb3fb9fc9ad9f704390cedf"
},
"command": "env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_LEARN=off ZIRAN_BENCH_HOST=omega build-queue -- build/bin/ziran run --target=c bench/bench.zi -- c-teacher --output bench/results/c-teacher-omega-2026-11-16-stage2.md",
"finished_unix": 1794851136,
"end": {
"Makefile": "05f3a05a07580c113c3c2e41e122fb2fda564fdbab2406c0daafe3558f0d9919",
"assembly.mk": "35cc7ad2f0897895f8aa498e4cbd6660a4981fe068eb0944897469e4fa5014ba",
"bench/bench.zi": "e725a1f50a8ddb30ba19c5e3e1165a98ba7df0ce2836fa4d7d7e42e51fabbec1",
"bench/c_teacher.zi": "0f302d034bd0abb7a94a04c1052b51d4b147390ae854b43fa5beda3e64ba4ce0",
"bench/c_teacher_assembly.zi": "af71355d406f4a0fae62c90ff7774b3c09af01ceeab8ce96bff366f4ec6ffb2f",
"bench/c_teacher_profile.zi": "8bf97b7a800bb9ae617a1d04eb1877aa419632ff725541b8d57a9eb064b771c7",
"bench/c_teacher_rules.zi": "c8bd719f89b63c69eb68f6e5104893614e42f490997ef7ca56907d715898b2cc",
"bench/wasm_tier.zi": "0e6bdffd2b7dd8b7f6df7b3665393a17d1b840e4b48bb4b88d110d27b84dde91",
"build/bin/zi2c": "549a9b9f3600255c4b8af83947661f92ec8db8a97d80d26392b1674a8bc59f27",
"build/bin/zi2zx": "582853558ec22e178d5e8f4f802802b2c81ffc2607b6e258259bc59dbae00520",
"build/bin/ziran": "5597a16f7fc6cfb32c9e1ac4bdccbda176ca402620e641944f099b270b40988b",
"build/bin/zx2native": "fc7dd7c5f4409c68a26b634888085d39b7fa0592398119bbed7bdb09a9f4867d",
"build/bin/zx2wasm": "9de465c0be09ae7c03d0f4a10ff5ce88c3a4ec473cf7a9a5662a93acd0090637",
"build/libziran.a": "e7c22c683f3711b8f0d2d8203a2ab234d29d2457940296abb552ed20960a721e",
"cmd/compiler_aarch64.zi": "6e6290525bd8ffcd58f5c38c191e7b39090d7af2b5cf1aeabcfc99b676928a75",
"cmd/compiler_abi.zi": "2563e498e4a09e7ff41eb330c1055167ec92828758c5873ab551221214119399",
"cmd/compiler_arm_bytes.zi": "ff30a43a4b0729f0690102b9b1870d8584fe604baf8f659a37edb3c958095552",
"cmd/compiler_armv7.zi": "1e1364169f7b4b679e9db6d8d1e0be0efbc9955d37b1de1f931de1f8a9d0c0fe",
"cmd/compiler_backend_cache.zi": "5a76c6cc76373475ef3f3a9f858abae7970e4fd21f06128749574518d2b47903",
"cmd/compiler_backend_process.zi": "db1452d9aa71a3cfc3b7e1b709ea285e73d52fbcd392a9587a4da3603f836817",
"cmd/compiler_bundle.zi": "b2442aba7e10a91d8ef422f3ae9d42aa3a82873e26d23bf0aefd116819419a92",
"cmd/compiler_declaration.zi": "4b243127fbda612bb75399d35a0e5a62b926b06cd21668ecf4967b0fb44a683b",
"cmd/compiler_enum.zi": "3bb33881dd63ef654f3f3b7b2d0201a82df84e50fbb04f3ebf3f748aeac63214",
"cmd/compiler_exec.zi": "4c7a89ec2854db68ed159b95132177e526e42108c6a120160ebf1e40d431644c",
"cmd/compiler_exec_debug.zi": "aa1b2141fd720cb6541e7b729ffbd0e3f2af15d207ea6ec4367fe51f8f040284",
"cmd/compiler_exec_link.zi": "81643c45850d1651b54589f38746254828e41884c9dc703036af9e84b955dc6d",
"cmd/compiler_exec_serial.zi": "f7057b91f1371862c5f95a6da507ef5ab87564cd8183c8e275b158e93aef21d0",
"cmd/compiler_expression.zi": "ae9ae5bef1606eb6146bd0b44ccbab9a98e18455c76d3feee24e0f1fb28b7e02",
"cmd/compiler_ir.zi": "541000ea6b99130911da25e05e5318f69d4689bf830668a7f2d7a2dd781da946",
"cmd/compiler_law.zi": "ea7a848dbfce6244bd5f576ba2d4808ab4a7439eb488f734ac488d7bc52aba06",
"cmd/compiler_learning_policy.zi": "0664cdd8661832eedfd7bacb4edc53dc72effd4549ef3bc9b3d7d1638c659e57",
"cmd/compiler_link.zi": "34303bb84496bf662f3e1e10ecda6dcbf9d8190c2bbec8d9e21c5d94c04cce02",
"cmd/compiler_lowered_ir.zi": "8ec004a5862e1511edca0de5c9b02f552a53992c3c791a53e909385f318987a4",
"cmd/compiler_lowered_proven.zi": "75f4ea7dc721078b982bb7b3d156ab1c63d4f3b0fe6dfe78cbbd2fc5a7bca7aa",
"cmd/compiler_lowered_verify.zi": "f7051f16f19c4d2ba90e3147285c9f193280bc2d11bdc46117e0185b282ccd8c",
"cmd/compiler_machine_aggregate.zi": "16d5e7ed5f3cfe04ad400edae311caaca4c4e4cee9a5e033f92acbb0b6a075ce",
"cmd/compiler_machine_elf.zi": "4b3388d402a74dd06077bb9de6295fd9af080dde9e7b57d77bb9c9a17c7e1982",
"cmd/compiler_machine_fields.zi": "9f3e21befa992755ae86695bea8245c26aa6530146e8f9adc38c79ec02d8daed",
"cmd/compiler_machine_image.zi": "a9adc6b4e330f4366120719a8fd054ba5721cc7d21c4ab37c4e90ca4af0ad6a6",
"cmd/compiler_machine_ir.zi": "66597bf7c70717f51897af8f705a70912c2e9b6c6eab7a59229dead32cd9a8b1",
"cmd/compiler_machine_lower.zi": "927ecd665617665a7fb0137a2d54f92a79d4e81587ec9ce37f9465e246aa73a9",
"cmd/compiler_machine_pe.zi": "282b2bbf3e9984f605bd5f9c7e78f17434198a065693f6fcdbf5b99dc20de5ea",
"cmd/compiler_machine_pipeline.zi": "873bdd8fb8dde2e9110beb40f538b251cd9ffa3b99c585c43ce99ee046f7b138",
"cmd/compiler_machine_select.zi": "086467c928a6ad77f60388ebe6f65406fd51df8fc595734affca3c9f6ab1bf56",
"cmd/compiler_machine_verify.zi": "e8cf207237a2316649171b95196493b225fad3a4bb0e34864060215ba7901a26",
"cmd/compiler_machine_verify_allocated.zi": "39d018331ce8b54d3d835d77b44200d248a0b36c15af7d39d9ca46158361a69b",
"cmd/compiler_native_cache.zi": "0035b3d5549ca11a77cdf90267bbde11c59443abfaf8e1e9ee3a95e82b2fb290",
"cmd/compiler_native_names.zi": "785afd249f662ccee7618a8047f3a7e4912301802c60a6056b87dbd2d744adde",
"cmd/compiler_opt.zi": "05189b0d37431433cb92c6d3ba8ef93e1c43b20b21a80ef9ae0614c0c1663173",
"cmd/compiler_opt_rotate.zi": "1e0de077d2bb2cd0dd82844eec3b02af76caa23b0e139e4e9dfee4bac68639b8",
"cmd/compiler_opt_ssa.zi": "d48ffcab34672abb811f62e1ec4c6ece48796ca915aa88f737a64ac3a06ba6e0",
"cmd/compiler_parse.zi": "faeff7c000d4dedf9c6172aa7fe191f8051d6d161fef3301871e6d2456476c50",
"cmd/compiler_proof.zi": "b750025110bbf98bd481225d35893503d636167b05c5f8f676d14f1b21c4045a",
"cmd/compiler_proof_kernel.zi": "ef6ef0e45033d412e69f665d0adab88cf7b8447e6b7d2380285256bf8b560657",
"cmd/compiler_regalloc.zi": "c685aa88b55f3818815f647827108b4a430ede7eb23dc068832a843cf7a1ce05",
"cmd/compiler_runtime.zi": "76a03293273f596114419c57ae2d7d90bcbb3601f53ca3bea2aa493fa7c45333",
"cmd/compiler_runtime_emit.zi": "75cac74ccd128c798b138cc8debf12bfe32a73374a59ed38c2da544a5ea5e8c0",
"cmd/compiler_scan.zi": "7a5543ff4d2a948662a73799cef24d5493f6d8f2c00bc8e9c79966bc3e08ebf6",
"cmd/compiler_services.zi": "44e86142a49ca50c93d2ee4549a62d5d910039a26bed8edba9eee6e32ad100c8",
"cmd/compiler_source.zi": "b72e15ebf7db2ca8701443be8665b521550e6365278d0451972b13012749f6a1",
"cmd/compiler_statement.zi": "9cab342dfca003629336188001161db10da1bfffb81c4a72762c7ac825014147",
"cmd/compiler_target.zi": "45aa88ad0735e0728084e298d3384f58dde43552205713eb21ba45a4efdf6996",
"cmd/compiler_text.zi": "6c984ceb501cf4910f1f188a8a194724e1153b2ccf64425d183572c48b3b521b",
"cmd/compiler_type.zi": "c855d452c68ef1143c0b2c0bb5e8124b0c2eb98194357ea20459290099664392",
"cmd/compiler_x86_64.zi": "46f5507aeed0ccb72d1db423f8ad9b5e421d3f5d56e334d0adb0a95aedd1a7b5",
"cmd/compiler_x86_bytes.zi": "e657e4757e6e44f58bdf3c797de83ef4ec9d29cf9cdfb9945e38b5af8ba6add5",
"cmd/compiler_x86_host.zi": "62790138a13faee1421e7ed381d049b31681cdd0215ea23fed86205554f99fab",
"cmd/compiler_x86_image.zi": "002266f04f7ef848df21c7561f42ddffbc23f80fc990a1f9100bdeef8c41dace",
"cmd/compiler_x86_runtime.zi": "c1a5a8cf1a1979052b1e367670a297e68fe772aaf7b0be4cf3bd9a5aa743ff95",
"cmd/compiler_x86_win64.zi": "56579376dde03d3fae4c14a52db835eb30ee9f3ed034bd057af87c8389a011e7",
"cmd/compiler_zir_lower.zi": "5a256120bf827f1973e07db313abc5ebe233bfac27c4bb8b2a1f8ebce8fde83a",
"cmd/diagnostics.zi": "bab7e536840cbfd0bf376586f79dd2aaeced3d7ead8e993f32a916a2a00a2efd",
"cmd/edit.zi": "0b7754a51bfdb9f977502033fc8d0d37e338199c6303b72c6f56068b735a3c1d",
"cmd/format.zi": "1d3a98b9f2bcb8bb4397addbaa79c482a248a4a1c90a65469a43baf3093df49e",
"cmd/format_source.zi": "dab11397691519e67cbf1b6d28a1c56511ab6e9f1a8173495895c301964d2166",
"cmd/package.zi": "d5d7c5943018b0dde1f2e7bea6cc748d00329aa1b3ae09c1dfaf6050b40164e2",
"cmd/package_add.zi": "73d66ff9c67140ec2ea027aa9c6de35c116c0387863c83cd250bf98146cd391c",
"cmd/package_artifact.zi": "4233d6388cd50e361a4bd1dd9cb7406ae8c118466ea07c05e3c971cca7f50c1a",
"cmd/package_bundle_run.zi": "f6e7d9812e441bc7e5c5e11a14c821a31144b18ef49726e5c81ed81e5f9b7a75",
"cmd/package_capabilities.zi": "5d02a368970770d83a2743904c11f96d554fcfed54ef626c120b02b0699b9547",
"cmd/package_common.zi": "d9a532f872397a1d85af3fa9c0e6880c84a4fdd08414d81c42eb092e11a4eaa6",
"cmd/package_compile_commands.zi": "3c89799708f97fb2cb7df2addaa79cab488bfd6cdfb981fa7400911a39f30651",
"cmd/package_entry.zi": "e38f333965caa5a04333ec4bf5049e9c4c8fbec11dc21a564caca9b0128c8457",
"cmd/package_explain.zi": "a66faa839eab24613009572eb26c29103b83f27ead407a5082545cf6821fd51d",
"cmd/package_features.zi": "1558d4bbe5a8bad6980cd0a36618e86af8172ff18ae56563e61991f4bc0cb780",
"cmd/package_guide.zi": "4f37a7e919d9724f422bb0bc31f16cb00f53dd15faefe0951ca2004e80957f66",
"cmd/package_learn.zi": "00a9b8f0cd272cc80cff0fb902424abc2116ba6e2b155e4e54a29918a05fc148",
"cmd/package_lock.zi": "e7ec127c0d5c67062d1bc7bde60fea6c731589ebdfdfa5c49a9a22723e500527",
"cmd/package_manifest.zi": "7c3e09a31e2c6fee8f24332c488d7e47919d231e6807b8ff1a3977f0b19712af",
"cmd/package_map.zi": "f5237bf7644c72fc8fd8215dbea21c11ea5902fab55c94793161e18c922f5662",
"cmd/package_options.zi": "2bbe79bfb722160835c982d467039a503d654177f45ef927af53b9443d4f64f1",
"cmd/package_process.zi": "cacac81d35ccfaeceb65a320844b9d6b067a46dcd9e88310fa1a9e0f42d8abce",
"cmd/package_script.zi": "a424b568ca6c9c7d6c6e000df3fe64768d21d8f3551c5885b1d2920f79099f43",
"cmd/package_source.zi": "d85372881205f92f9e26b3afd1e9f401d324af3958a57af66f6aafec5c98c02a",
"cmd/package_template.zi": "04c681f5b549ed446d0e085f7b2f2aea16dbb0433de774974a80884f09707682",
"cmd/transport.zi": "4b18fa172dc12b15dedabdcfdd2d2dba257b48edccadd08c1ff76cff8977f8af",
"scripts/site_library_targets.py": "09eab054f7b4236ba6db4e0b62fd423d068805636cb3fb9fc9ad9f704390cedf"
},
"changed": [],
"exit_code": 0,
"complete": true
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,160 @@
# C teacher: Omega findings and validation
The final comparison covers Sieve, Records, Hash, Vectors, Calls, Printing,
Button, Text, Input and hello against GCC 14.2 and Clang 19.1.7 at `-O2`.
All ten workloads completed: 1,539 ranked function comparisons and zero failed
workloads. The compiler binaries remained unchanged throughout the run.
See [the final ranked report](c-teacher-omega-2026-11-16-final.md).
These measurements ran on physical Omega under the task's original explicit
host instruction. The parent's later instruction moves all future benchmarks
to physical Alpha, serialized through its build queue; builds and local tests
remain on Omega. No Alpha result is claimed here.
| Rank against GCC | Function | Native / C instructions | Sampled function CPU share | Main findings / owner |
| --- | --- | ---: | ---: | --- |
| 1 | Records | 407 / 70 | 73 / 73 | 4 stack reads and 260 writes versus zero; aggregate/regalloc and SSA lanes |
| 2 | Sieve | 90 / 34 | 120 / 120 | 22 branches versus six; surrounding loop layout and address folding |
| 3 | Hash | 62 / 26 | 149 / 149 | 18 branches versus two; loop layout and invariant candidates |
| 4 | Vectors | 149 / 101 | 133 / 153 | stack traffic, value induction, scalar reduction and loop structure |
The earlier [stable stage-two report](c-teacher-omega-2026-11-16-stage2.md)
counted 929 native Records instructions, 260 stack reads and 520 writes;
the integrated aggregate work reduced these static counts to 407, 4 and 260.
That work belongs to its owning lane. The teacher's report measures the
resulting assembly; it does not establish a causal runtime speedup.
Static back-edge envelopes contain branches and cold paths, so their size is
not an executed instruction count per iteration. In Sieve, the sampled native
envelope spans 40 static instructions, but its marking loop at text offsets
`0x1ce..0x1dc` executes four instructions: byte store, add induction value,
compare and branch. GCC's corresponding loop also executes four. The remaining
Sieve gap is in its surrounding loops, including a separate load/compare where
C uses a memory compare, joins, trampolines and repeated values.
Vectors has more direct gaps. The capacity-available native push path executes
28 instructions, with five stack reloads, five stack writes and one element
store; GCC executes 17 with no stack traffic and one element store. Native
recomputes the element value with multiply, while GCC carries it with add.
The native reduction executes eight instructions per element, including an
accumulator stack reload/write. GCC uses five per two elements with a 16-byte
load and packed addition, with an end pointer computed outside the loop.
These are manually followed paths in the exact disassemblies named by the
report, not counts inferred from its back-edge union.
The loop lane received these concrete paths and now owns LICM, induction and
strength reduction alongside SSA and rotation. The records lane owns vector
push and aggregate/allocation work; the vectorizer lane owns SIMD reduction.
Widget/host findings went to the widget
lane. Startup samples sometimes rank `SessionIndex` and theme creation highly;
these do not replace warm scenario measurements. Missing C symbols remain
unknown inlining/dead-code/name information. Stack operands include locals and
saved registers, vector-register uses include scalar floating point, loop
constants are candidates rather than proven invariants, and zero timer samples
remain unknown. Weighted instruction excess predicts neither cycles nor speedup.
This lane implemented shorter immediate-IMUL encoding, value-only LEA/shift
selection when flags are dead, and a bounded, separately tested integer leaf
inliner. An immediate in `[-128,127]` uses the one-byte immediate encoding,
saving three bytes per matching instruction. Positive scaled-add factors use
LEA; in-place powers of two use a shift after verification. No runtime speedup
is attributed to these changes by the measurements below.
`ziran learn verify` checks closed mined multiply proposals using 34 factors,
17 boundary inputs plus 2,048 deterministic random inputs, eight signed and
unsigned widths, exact C/native output agreement (70,210 lines), then the
retained ZX parity suite. Unknown semantics or any disagreement leave the
existing table unchanged. Repeated verification generated the same table.
See the [candidate evidence](c-teacher-omega-2026-11-16-candidates.json) and
[base-table verification certificate](c-teacher-omega-2026-11-16-rules-verification.json).
`ziran learn train` joins timing observations to current-format corpus records
by input, ZX, native ELF, map and compiler identities. It requires equal
checksums, learning off, manual safety, one host and one source epoch. It keeps
integer raw timings and symmetric inclusive-quartile 1.5×IQR exclusions,
compares complete workload cohorts and breaks ties by size then policy ID.
Identical ELF artifacts share one timing experiment so noise cannot select a
policy. Unsupported unroll/allocation strategies are rejected.
The real six-kernel calibration compared leaf thresholds zero and one against
C compiled at `-O2`, with eleven paired samples per observation. All six emitted
identical native artifacts and had zero eligible one-operation leaf calls.
The selected table therefore keeps leaf inlining off, block layout on, unroll
one and allocation zero. The [raw calibration](c-teacher-omega-2026-11-16-tuning.json)
and [deterministic selection receipt](c-teacher-omega-2026-11-16-tuning-selection.json)
retain all samples, exclusions and the final table digest. Training twice
produced byte-identical source. The rule certificate covers the base table;
the selection receipt binds the policy-only update to the final table.
Ordinary compilation reads only that checked-in, versioned Ziran table: no
corpus, clock or online training. Recording remains on by default outside
benchmarks; `ZIRAN_LEARN=off` disables it.
Kernel times below are microseconds per call, with eleven samples, learning off
and symmetric 1.5×IQR filtering. Five of six initial/stage-one native artifact
digests were identical, so those timing differences cannot be attributed to an
optimization. The final run includes other lanes' compiler changes and a busy
host (load average about 36); native samples also amortize one process startup
across 32 calls. These are observations, not isolated teacher speedups.
| Kernel | Initial native | Stage-one native | Final native | Initial C | Final C |
| --- | ---: | ---: | ---: | ---: | ---: |
| Sieve | 71.173 | 26.469 | 27.606 | 15.677 | 11.398 |
| Records | 46.891 | 20.442 | 19.234 | 12.972 | 9.290 |
| Hash | 31.488 | 35.585 | 33.365 | 25.037 | 22.550 |
| Vectors | 34.826 | 34.875 | 41.559 | 16.930 | 13.331 |
| Calls | 8.112 | 9.050 | 7.678 | 5.157 | 5.285 |
| Printing | 9.054 | 8.827 | 5.967 | 8.003 | 4.347 |
Raw values, exclusions and identities remain in the
[initial](c-teacher-omega-before.json),
[stage-one](c-teacher-omega-stage1-after.json) and
[final kernel receipts](c-teacher-omega-final.json).
The final warm native widget results below exercise public layout, interaction
and paint-command generation; every batch verifies its result. They exclude
pixel rasterization, system fonts and OS I/O. The earlier receipt from the
widget lane uses an older compiler and is contextual evidence, not a controlled
before/after experiment for this lane.
| Widget | Earlier native µs | Final native µs | Final C µs | Final Go µs |
| --- | ---: | ---: | ---: | ---: |
| Button | 612.345 | 3.696 | 1.966 | 3.165 |
| Text | 478.862 | 4.392 | 2.140 | 2.503 |
| Input | 791.135 | 5.543 | 2.765 | 4.885 |
See [the widget lane's earlier receipt](widget-omega-2026-11-16-after.json) and
[the final warm-widget receipt](c-teacher-omega-2026-11-16-widgets-final.json).
The gap to C and Go remains open.
Exact final commands, all through `build-queue` with learning and displays off:
```sh
make -j1 check
make -j1 check-bootstrap
build/bin/ziran run --target=c bench/bench.zi -- wasm-tier --samples 11 --label c-teacher-final --output bench/results/c-teacher-omega-final.json
build/bin/ziran run --target=c bench/bench.zi -- library-targets --project /mnt/storage/Projects/kryonlabs/kryon --manifest /mnt/storage/Projects/kryonlabs/kryon/tests/widget_benchmarks.json --samples 11
build/bin/ziran run --target=c bench/bench.zi -- c-teacher --output bench/results/c-teacher-omega-2026-11-16-final.md
```
All five commands returned zero: 281/281 local tests, bootstrap passing, six
kernels, three widgets and the ten-workload teacher report. The broader source
guard detected concurrent changes to `cmd/compiler_machine_aggregate.zi` and
`tests/machine_place_cases.zi`, so the combined
[validation receipt](c-teacher-omega-2026-11-16-final-validation.json) correctly
records `complete: false`. Compiler binaries were unchanged, but this run does
not validate that lane's newest constructor source; its next canonical
checkpoint owns that validation. The earlier stage-two guard covered 97 inputs
with no changes. No GitHub CI result or installation is claimed.
A subsequent canonical constructor checkpoint rebuilt successfully, passed
bootstrap and held all 3,409 guarded source/map inputs plus seven compiler
fingerprints unchanged. Its full suite passed 279/281: only `site_targets`
("Publish one measured host") and `site_pages` (a missing targets receipt)
failed. Those publication-data failures were resolved by the targets lane's
completed cohort and successful retained site tests. No compiler or constructor
test failed. A separate final site-test repeat records the integration verdict.
Final retained site repeat passed with exit zero:
`env -u DISPLAY -u WAYLAND_DISPLAY ZIRAN_LEARN=off HARMONY_BUILD_LOCAL=1 build-queue -- sh -c 'sh tests/site_pages.sh build/bin/ziran && sh tests/site_targets.sh build/bin/ziran'`.
The [integration receipt](c-teacher-omega-2026-11-16-integration-validation.json)
keeps the earlier full-suite and later canonical/rerun results distinct.
@@ -0,0 +1,171 @@
{
"schema_version": 1,
"selected_policy": 1,
"measurements_sha256": "33dd0c8bc432d50c22f02c3b21245a85ea59c0cbe3c8bc06563ebc165c3876c7",
"table_sha256": "a4cae8ab1d24b99da61655f0e9f75a4590a0a32ab4c4bffafcbc2c2ede9acb96",
"method": "symmetric inclusive-quartile 1.5 IQR; equal artifacts share lowest-policy timings; ties by bytes then policy ID",
"observations": [
{
"workload": "Sieve",
"native_sha256": "81468f46fa5939aeec5abd2c18b72fb884295ee84ea0190e788663fed0d10ae9",
"native_ns": {
"median_twice": 39545946,
"excluded_indices": []
},
"c_ns": {
"median_twice": 24655152,
"excluded_indices": [
4,
8
]
}
},
{
"workload": "Sieve",
"native_sha256": "81468f46fa5939aeec5abd2c18b72fb884295ee84ea0190e788663fed0d10ae9",
"native_ns": {
"median_twice": 39633286,
"excluded_indices": [
5
]
},
"c_ns": {
"median_twice": 25287510,
"excluded_indices": []
}
},
{
"workload": "Records",
"native_sha256": "6653d136d7d21aaafb92a9255befdf5d125e49adebec03b7965a551c76753db8",
"native_ns": {
"median_twice": 30094488,
"excluded_indices": []
},
"c_ns": {
"median_twice": 19479634,
"excluded_indices": []
}
},
{
"workload": "Records",
"native_sha256": "6653d136d7d21aaafb92a9255befdf5d125e49adebec03b7965a551c76753db8",
"native_ns": {
"median_twice": 29809390,
"excluded_indices": []
},
"c_ns": {
"median_twice": 19531824,
"excluded_indices": [
9
]
}
},
{
"workload": "Hash",
"native_sha256": "4875728741b927cad36d216942e1dc4bfeb809d2d05daf6ad7539f792b89798c",
"native_ns": {
"median_twice": 47833720,
"excluded_indices": [
3
]
},
"c_ns": {
"median_twice": 48473046,
"excluded_indices": []
}
},
{
"workload": "Hash",
"native_sha256": "4875728741b927cad36d216942e1dc4bfeb809d2d05daf6ad7539f792b89798c",
"native_ns": {
"median_twice": 48218448,
"excluded_indices": []
},
"c_ns": {
"median_twice": 48523308,
"excluded_indices": []
}
},
{
"workload": "Vectors",
"native_sha256": "533cfc39d0908267889f1c8501bfe4cb4d3f850aa08cbaaf69c17104b6b3a1a6",
"native_ns": {
"median_twice": 58869962,
"excluded_indices": [
1
]
},
"c_ns": {
"median_twice": 28103656,
"excluded_indices": [
6,
7
]
}
},
{
"workload": "Vectors",
"native_sha256": "533cfc39d0908267889f1c8501bfe4cb4d3f850aa08cbaaf69c17104b6b3a1a6",
"native_ns": {
"median_twice": 56032874,
"excluded_indices": []
},
"c_ns": {
"median_twice": 28565534,
"excluded_indices": []
}
},
{
"workload": "Calls",
"native_sha256": "c5a6038ad354524756fc02ba8750c8bee956f625548574f176e01eda8d9a88b9",
"native_ns": {
"median_twice": 413148,
"excluded_indices": [
2
]
},
"c_ns": {
"median_twice": 12276466,
"excluded_indices": []
}
},
{
"workload": "Calls",
"native_sha256": "c5a6038ad354524756fc02ba8750c8bee956f625548574f176e01eda8d9a88b9",
"native_ns": {
"median_twice": 391418,
"excluded_indices": []
},
"c_ns": {
"median_twice": 12022737,
"excluded_indices": [
8
]
}
},
{
"workload": "Printing",
"native_sha256": "99f953bd85ed52e718ff319f8e0bcf118b3257dba3a5949bc12020526d3aff4b",
"native_ns": {
"median_twice": 3686464,
"excluded_indices": []
},
"c_ns": {
"median_twice": 10149236,
"excluded_indices": []
}
},
{
"workload": "Printing",
"native_sha256": "99f953bd85ed52e718ff319f8e0bcf118b3257dba3a5949bc12020526d3aff4b",
"native_ns": {
"median_twice": 3805102,
"excluded_indices": []
},
"c_ns": {
"median_twice": 10331054,
"excluded_indices": []
}
}
]
}
@@ -0,0 +1,527 @@
{
"schema_version": 1,
"checks": false,
"target": "x86_64-linux",
"learning": "off",
"host": "omega",
"source_epoch_sha256": "ecb2dd640a110ffc21c0e655cb8f0fb65cdc98e74adf0b73bfad4fd221a8d1cd",
"method": "paired process wall time; 1024 checksum-checked kernel calls; includes startup; 11 samples",
"measurements": [
{
"workload": "Sieve",
"input_sha256": "f1fccf1c68dab477a2d0e35a94d9fda6ed8c9873d34deb24c4de73e88f22d92e",
"zx_sha256": "f1fccf1c68dab477a2d0e35a94d9fda6ed8c9873d34deb24c4de73e88f22d92e",
"native_sha256": "81468f46fa5939aeec5abd2c18b72fb884295ee84ea0190e788663fed0d10ae9",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/f1fccf1c68dab477a2d0e35a94d9fda6ed8c9873d34deb24c4de73e88f22d92e/x86_64-81468f46fa5939aeec5abd2c18b72fb884295ee84ea0190e788663fed0d10ae9.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 928,
"policy": {
"leaf_operations": 0,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
20867869,
18254550,
22190842,
25413449,
17126374,
17709972,
19211226,
19772973,
22190052,
22695430,
18717818
],
"c_ns": [
12485855,
12297866,
12327576,
11976347,
14679756,
11797518,
11769858,
12596135,
13603501,
12638594,
12624895
]
},
{
"workload": "Sieve",
"input_sha256": "f1fccf1c68dab477a2d0e35a94d9fda6ed8c9873d34deb24c4de73e88f22d92e",
"zx_sha256": "f1fccf1c68dab477a2d0e35a94d9fda6ed8c9873d34deb24c4de73e88f22d92e",
"native_sha256": "81468f46fa5939aeec5abd2c18b72fb884295ee84ea0190e788663fed0d10ae9",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/f1fccf1c68dab477a2d0e35a94d9fda6ed8c9873d34deb24c4de73e88f22d92e/x86_64-81468f46fa5939aeec5abd2c18b72fb884295ee84ea0190e788663fed0d10ae9.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 928,
"policy": {
"leaf_operations": 1,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
20999377,
19884662,
17851882,
22994789,
20456060,
24408072,
18467699,
18384260,
21003638,
19748624,
19605413
],
"c_ns": [
12486225,
12191667,
12878123,
13559331,
12835844,
12029308,
12814034,
12440965,
13339812,
11879617,
12643755
]
},
{
"workload": "Records",
"input_sha256": "4dc39f678013ae78a3783b0dc2cf95aa0cd66f3c79ed5b88250f42f8d9d3ea45",
"zx_sha256": "4dc39f678013ae78a3783b0dc2cf95aa0cd66f3c79ed5b88250f42f8d9d3ea45",
"native_sha256": "6653d136d7d21aaafb92a9255befdf5d125e49adebec03b7965a551c76753db8",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/4dc39f678013ae78a3783b0dc2cf95aa0cd66f3c79ed5b88250f42f8d9d3ea45/x86_64-6653d136d7d21aaafb92a9255befdf5d125e49adebec03b7965a551c76753db8.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 2816,
"policy": {
"leaf_operations": 0,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
14462317,
16515978,
13225751,
14065619,
15305102,
15092884,
15731771,
14513127,
16387748,
13496971,
15047244
],
"c_ns": [
10074795,
10539854,
9831067,
9739817,
9375789,
9834007,
10387754,
8980270,
9317879,
9488338,
9608837
]
},
{
"workload": "Records",
"input_sha256": "4dc39f678013ae78a3783b0dc2cf95aa0cd66f3c79ed5b88250f42f8d9d3ea45",
"zx_sha256": "4dc39f678013ae78a3783b0dc2cf95aa0cd66f3c79ed5b88250f42f8d9d3ea45",
"native_sha256": "6653d136d7d21aaafb92a9255befdf5d125e49adebec03b7965a551c76753db8",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/4dc39f678013ae78a3783b0dc2cf95aa0cd66f3c79ed5b88250f42f8d9d3ea45/x86_64-6653d136d7d21aaafb92a9255befdf5d125e49adebec03b7965a551c76753db8.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 2816,
"policy": {
"leaf_operations": 1,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
16420928,
15917500,
15161824,
16250438,
14737855,
13867479,
14299717,
13939998,
17311484,
14904695,
13922058
],
"c_ns": [
10043136,
9910006,
9412558,
9941177,
10889212,
9621818,
9339349,
9021011,
10286935,
12788914,
9532118
]
},
{
"workload": "Hash",
"input_sha256": "41e6991d1c84b4fec12fe82b4ad9275c6394ed284ae862572e2ee2ea7f65f4b2",
"zx_sha256": "41e6991d1c84b4fec12fe82b4ad9275c6394ed284ae862572e2ee2ea7f65f4b2",
"native_sha256": "4875728741b927cad36d216942e1dc4bfeb809d2d05daf6ad7539f792b89798c",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/41e6991d1c84b4fec12fe82b4ad9275c6394ed284ae862572e2ee2ea7f65f4b2/x86_64-4875728741b927cad36d216942e1dc4bfeb809d2d05daf6ad7539f792b89798c.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 704,
"policy": {
"leaf_operations": 0,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
23778495,
24370513,
24052204,
25592958,
23571896,
24515242,
24071235,
23719886,
23781516,
24465373,
23692396
],
"c_ns": [
23859285,
24482703,
23914385,
24310353,
23914565,
24805761,
24741011,
24269803,
24236523,
23927435,
23590197
]
},
{
"workload": "Hash",
"input_sha256": "41e6991d1c84b4fec12fe82b4ad9275c6394ed284ae862572e2ee2ea7f65f4b2",
"zx_sha256": "41e6991d1c84b4fec12fe82b4ad9275c6394ed284ae862572e2ee2ea7f65f4b2",
"native_sha256": "4875728741b927cad36d216942e1dc4bfeb809d2d05daf6ad7539f792b89798c",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/41e6991d1c84b4fec12fe82b4ad9275c6394ed284ae862572e2ee2ea7f65f4b2/x86_64-4875728741b927cad36d216942e1dc4bfeb809d2d05daf6ad7539f792b89798c.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 704,
"policy": {
"leaf_operations": 1,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
23691446,
23581766,
24109224,
24533572,
23658496,
24126864,
24617702,
23831145,
24376133,
25027880,
24066295
],
"c_ns": [
23864855,
24728732,
23749216,
23839975,
24261654,
24777631,
23927775,
24275583,
25036220,
25237799,
23623006
]
},
{
"workload": "Vectors",
"input_sha256": "541c0b8413f48e82b2b148136f15a8f226ee7f9e6b4a82413f0df09fc64630d2",
"zx_sha256": "541c0b8413f48e82b2b148136f15a8f226ee7f9e6b4a82413f0df09fc64630d2",
"native_sha256": "533cfc39d0908267889f1c8501bfe4cb4d3f850aa08cbaaf69c17104b6b3a1a6",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/541c0b8413f48e82b2b148136f15a8f226ee7f9e6b4a82413f0df09fc64630d2/x86_64-533cfc39d0908267889f1c8501bfe4cb4d3f850aa08cbaaf69c17104b6b3a1a6.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 1792,
"policy": {
"leaf_operations": 0,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
29929688,
33329353,
28847073,
31372233,
28824763,
29442571,
28753763,
30010728,
27477479,
29427391,
29534601
],
"c_ns": [
13348252,
13889649,
13295732,
14243767,
14127988,
14051828,
15859901,
15669851,
13824970,
14743255,
14409756
]
},
{
"workload": "Vectors",
"input_sha256": "541c0b8413f48e82b2b148136f15a8f226ee7f9e6b4a82413f0df09fc64630d2",
"zx_sha256": "541c0b8413f48e82b2b148136f15a8f226ee7f9e6b4a82413f0df09fc64630d2",
"native_sha256": "533cfc39d0908267889f1c8501bfe4cb4d3f850aa08cbaaf69c17104b6b3a1a6",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/541c0b8413f48e82b2b148136f15a8f226ee7f9e6b4a82413f0df09fc64630d2/x86_64-533cfc39d0908267889f1c8501bfe4cb4d3f850aa08cbaaf69c17104b6b3a1a6.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 1792,
"policy": {
"leaf_operations": 1,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
29218002,
28792154,
25840686,
24514012,
28731574,
25602317,
26241535,
29797079,
28016437,
27044931,
31460342
],
"c_ns": [
15497072,
15546411,
14649856,
14115088,
13444071,
13510161,
13438841,
12655644,
14282767,
14376077,
14370237
]
},
{
"workload": "Calls",
"input_sha256": "b55d21c3a286aa61d33a3f7eab3eca09121875b0c839f806192bb1c6c9ef011f",
"zx_sha256": "b55d21c3a286aa61d33a3f7eab3eca09121875b0c839f806192bb1c6c9ef011f",
"native_sha256": "c5a6038ad354524756fc02ba8750c8bee956f625548574f176e01eda8d9a88b9",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/b55d21c3a286aa61d33a3f7eab3eca09121875b0c839f806192bb1c6c9ef011f/x86_64-c5a6038ad354524756fc02ba8750c8bee956f625548574f176e01eda8d9a88b9.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 448,
"policy": {
"leaf_operations": 0,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
203649,
181800,
275028,
219999,
196589,
188029,
155009,
215059,
210679,
221669,
209499
],
"c_ns": [
6215543,
6238912,
5602646,
6426082,
6138233,
5903684,
5623696,
5917704,
6224322,
6235133,
6008554
]
},
{
"workload": "Calls",
"input_sha256": "b55d21c3a286aa61d33a3f7eab3eca09121875b0c839f806192bb1c6c9ef011f",
"zx_sha256": "b55d21c3a286aa61d33a3f7eab3eca09121875b0c839f806192bb1c6c9ef011f",
"native_sha256": "c5a6038ad354524756fc02ba8750c8bee956f625548574f176e01eda8d9a88b9",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/b55d21c3a286aa61d33a3f7eab3eca09121875b0c839f806192bb1c6c9ef011f/x86_64-c5a6038ad354524756fc02ba8750c8bee956f625548574f176e01eda8d9a88b9.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 448,
"policy": {
"leaf_operations": 1,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
223699,
195709,
161219,
184239,
184749,
241108,
197600,
163969,
205879,
244499,
182000
],
"c_ns": [
5986924,
5953174,
6022574,
6396762,
6234373,
5954164,
6000163,
6023344,
6723341,
5937463,
6306132
]
},
{
"workload": "Printing",
"input_sha256": "b10e5d3d72ba8ccea623fd45c8fbceb20787a7d8bccd47512eb7bbef246d8d9a",
"zx_sha256": "b10e5d3d72ba8ccea623fd45c8fbceb20787a7d8bccd47512eb7bbef246d8d9a",
"native_sha256": "99f953bd85ed52e718ff319f8e0bcf118b3257dba3a5949bc12020526d3aff4b",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/b10e5d3d72ba8ccea623fd45c8fbceb20787a7d8bccd47512eb7bbef246d8d9a/x86_64-99f953bd85ed52e718ff319f8e0bcf118b3257dba3a5949bc12020526d3aff4b.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 1088,
"policy": {
"leaf_operations": 0,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
1843232,
1887841,
1876532,
1743973,
1724652,
1751162,
1934542,
2020811,
1699852,
1936131,
1773913
],
"c_ns": [
5074618,
5024658,
4710789,
4770989,
5551996,
4928228,
4798509,
5886204,
5865335,
5853474,
5301256
]
},
{
"workload": "Printing",
"input_sha256": "b10e5d3d72ba8ccea623fd45c8fbceb20787a7d8bccd47512eb7bbef246d8d9a",
"zx_sha256": "b10e5d3d72ba8ccea623fd45c8fbceb20787a7d8bccd47512eb7bbef246d8d9a",
"native_sha256": "99f953bd85ed52e718ff319f8e0bcf118b3257dba3a5949bc12020526d3aff4b",
"compiler_sha256": "786d749f18e22326435e450341e67ccd563c007656245c5cfcdfa16bb17f24c2",
"corpus_record": "zx28-lir4/b10e5d3d72ba8ccea623fd45c8fbceb20787a7d8bccd47512eb7bbef246d8d9a/x86_64-99f953bd85ed52e718ff319f8e0bcf118b3257dba3a5949bc12020526d3aff4b.record.json",
"checksum": "42",
"c_checksum": "42",
"code_bytes": 1088,
"policy": {
"leaf_operations": 1,
"unroll_factor": 1,
"block_layout": 1,
"allocation": 0
},
"native_ns": [
1769923,
1774792,
2139061,
1765763,
1902551,
1812652,
1932871,
2031621,
1974651,
1787052,
2312930
],
"c_ns": [
4933298,
5210677,
5165527,
4956148,
4950259,
4955699,
5620876,
5906544,
5761195,
5169107,
4775529
]
}
]
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+95
View File
@@ -0,0 +1,95 @@
# Rejected call-load forwarding experiment
The experimental shared optimizer pass did not improve the widget geometric
mean. It was removed; no compiler change from this experiment is retained.
Five shuffled, alternating rounds on physical Alpha found native performance
unchanged overall (after/before geometric mean 1.00018) and Wasm 1.55% slower
(1.01555), while increasing generated code size. Every timed batch verified
its paint output. An initial apparent Wasm Input speedup did not reproduce.
## Matched widget results
Microseconds per two-frame scenario; each value is the median of five run
medians, each calculated from 11 samples with the repository's symmetric
1.5×IQR filtering. The host gate rejected jobs with unstable clocks or a busy
hyperthread sibling. Raw samples, excluded indices, rejected attempts and
artifact hashes are in [the matched report](call-borrow-widgets-matched.json).
| Scenario | Native before | Native candidate | Wasm before | Wasm candidate |
|---|---:|---:|---:|---:|
| Button | 4.061 | 3.972 | 2.296 | 2.348 |
| Text | 5.479 | 5.411 | 3.479 | 3.519 |
| Input | 5.827 | 6.036 | 3.317 | 3.360 |
Native Input was slower in all five paired rounds. Wasm Button was slower
in all five. Small improvements in native Button and Text did not compensate.
The restored baseline's widget bundles, Wasm modules and native runtime
were byte-identical to the original baseline. Its Wasm Input time changed
from 5.494 µs in the first isolated measurement to 3.317 µs in the alternating
comparison. Consequently, the initial candidate's 3.472 µs result is not
evidence of a speedup.
| Scenario | ZX bytes before | ZX candidate | Wasm bytes before | Wasm candidate |
|---|---:|---:|---:|---:|
| Button | 1,379,565 | 1,407,565 | 2,244,279 | 2,250,232 |
| Text | 1,151,529 | 1,180,161 | 2,092,196 | 2,099,171 |
| Input | 1,991,098 | 2,026,274 | 2,333,124 | 2,340,130 |
## What was tried
For an unchecked direct call, the pass found a single-use record or array
load in the same block, with no intervening effect, check or possibly trapping
operation. It replaced the by-value argument with the load's source pointer
and made a bounded, shared callee variant with an entry snapshot load.
Backend view analysis could then avoid copies when safe, while retaining the
snapshot when another alias writes the source. Other calls and function
addresses kept the original callee.
This moved a snapshot across the call boundary; it did not establish a
general interprocedural read-only/no-alias contract or remove all callee
parameter storage. Remaining paint-path calls include source pointers received
as parameters and callees with writes and host calls. Eliminating their
snapshots needs a stronger alias proof. This result rejects this prototype,
not every possible implementation of read-only parameter borrowing.
The prototype's focused tests covered snapshot preservation across alias
writes, intervening effects, multiple uses, checked code, work/memory/function
limits and fuel parity. An end-to-end recursive alias case agreed across C,
the interpreter, native code and Wasm. The candidate passed all 271 local tests
and bootstrap before removal.
## Standard suite and kernels
The 29-workload standard suite passed every independent C result comparison.
All five generated artifacts (`c`, `go`, `native`, `suite.zx`, `suite.wasm`)
were byte-identical before and after. Their timing differences therefore do
not demonstrate any code improvement or regression from this pass.
The five kernels also verified every result. Records contains no call that
this pass could change: its isolated native measurements were 31.108 and
31.944 µs; Wasm was 40.985 and 41.868 µs. This experiment does not address the
Records gap relative to C.
Raw retained runs:
- [Standard before](standard/call-borrow-before.json) and
[candidate](standard/call-borrow-after.json).
- [Kernels before](call-borrow-kernels-before.json) and
[candidate](call-borrow-kernels-after.json).
- [Widgets initial baseline](call-borrow-widgets-before.json),
[candidate](call-borrow-widgets-after.json), and
[restored baseline](call-borrow-widgets-restored.json).
Benchmark compilation and timing ran only on physical Alpha, one suite at a
time through its build queue, with learning disabled. The baseline source
revision and exact tool, runtime, workload and generated artifact hashes are
retained in the JSON reports. The candidate was an uncommitted experiment.
Published site artifacts were restored after the trial.
After removing the prototype, the restored checkout passed all 271 local
tests again, with none reused, and `make check-bootstrap`. The restored
current-tree toolchain was installed on Omega and the original Alpha
toolchain was reinstalled; all 11 installed binaries matched their respective
build outputs. No website deployment was made for this experiment.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,8 +0,0 @@
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 160, in <module>
run([cxx, '-std=c++17', '-O2', '-I'+str(repo/'include'), '-I'+str(out), out/'body.o', cpp_host, '-o', out/'cpp-probe'])
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 21, in run
assert result.returncode == answer, (command, result.returncode, result.stdout, result.stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: (['/home/wao/.local/bin/c++', '-std=c++17', '-O2', '-I/mnt/storage/Projects/ziranlang/ziran/include', '-I/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.cDs97s6kGj/wide/c-source', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.cDs97s6kGj/wide/c-source/body.o'), PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.cDs97s6kGj/wide/host.cpp'), '-o', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.cDs97s6kGj/wide/c-source/cpp-probe')], 1, '', "/usr/bin/ld: /mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/ccwMwApA.o: in function `main':\nhost.cpp:(.text.startup+0x5): undefined reference to `Probe()'\ncollect2: error: ld returned 1 exit status\n")
@@ -1,11 +0,0 @@
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 38, in <module>
actual = run(ziran, 'run', bundle).stdout
~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 30, in run
return subprocess.run(list(map(str, args)), check=True, capture_output=True, text=True, **kwargs)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/mnt/storage/Projects/ziranlang/ziran/build/bin/ziran', 'run', '/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.3DZZbzRppk/true-source.zx']' returned non-zero exit status 1.
@@ -1,5 +0,0 @@
/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.zLgp1ZOaG4/keyword_main.c: In function ‘main’:
/mnt/storage/Projects/ziranlang/ziran/build/scratch/rebuild-validation/tmp.zLgp1ZOaG4/keyword_main.c:4:45: error: implicit declaration of function ‘ziran_keyword_class_0’; did you mean ‘ziran_keyword_switch_0’? [-Wimplicit-function-declaration]
4 | ziran_keyword_switch_0() == 1 && ziran_keyword_class_0() == 2
| ^~~~~~~~~~~~~~~~~~~~~
| ziran_keyword_switch_0
@@ -1 +0,0 @@
Website browser local tests: edited programs, diagnostics, cancellation, live diagrams, all target commands, 25 matrix cells, actual output and IR inspection, five WebAssembly runs, three measured platforms, file and metric controls, keyboard navigation, shared links, six widths, eleven routes, both themes and no-JavaScript fallbacks passed
@@ -1,831 +0,0 @@
mkdir -p build/
/usr/bin/make --no-print-directory BOOTSTRAP=1 BUILD_DIR=build/bootstrap \
CC='cc' AR=ar OBJCOPY='objcopy' CFLAGS='-O0' \
SANITIZE_FLAGS= WASM_PRIVATE_HEADERS= build/bootstrap/bin/zi2c
mkdir -p build/bootstrap/
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir-c/main.o cmd/zir-c/main.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir-c/zir_c_build.o cmd/zir-c/zir_c_build.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir-c/zir_c_cache.o cmd/zir-c/zir_c_cache.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir-c/zir_c_lower.o cmd/zir-c/zir_c_lower.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_bundle.o cmd/zir/zir_bundle.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_bundle_assets.o cmd/zir/zir_bundle_assets.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-bundle.o bootstrap/compiler_bundle/compiler_bundle.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_overlay.o cmd/zir/zir_overlay.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_semantic.o cmd/zir/zir_semantic.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_document.o cmd/zir/zir_document.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_sha256.o cmd/zir/zir_sha256.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_context.o cmd/zir/zir_context.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_memory.o cmd/zir/zir_memory.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_storage.o cmd/zir/zir_storage.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir.o cmd/zir/zir.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_asm.o cmd/zir/zir_asm.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_enum.o cmd/zir/zir_enum.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_type.o cmd/zir/zir_type.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_text.o cmd/zir/zir_text.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_native.o cmd/zir/zir_native.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_simd.o cmd/zir/zir_simd.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_body.o cmd/zir/zir_body.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_token.o cmd/zir/zir_token.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_cleanup.o cmd/zir/zir_cleanup.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_expr.o cmd/zir/zir_expr.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_borrow.o cmd/zir/zir_borrow.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_law.o cmd/zir/zir_law.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_serial.o cmd/zir/zir_serial.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -DZIRAN_STD_DIR='"/mnt/storage/Projects/ziranlang/ziran/std"' -DZIRAN_INCLUDE_DIR='"/mnt/storage/Projects/ziranlang/ziran/include"' -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_load.o cmd/zir/zir_load.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_packages.o cmd/zir/zir_packages.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_diagnostic.o cmd/zir/zir_diagnostic.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_profile.o cmd/zir/zir_profile.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_files.o cmd/zir/zir_files.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_services.o cmd/zir/zir_services.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-scan.o bootstrap/compiler_scan/compiler_scan.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-text.o bootstrap/compiler_text/compiler_text.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-source.o bootstrap/compiler_source/compiler_source.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-declaration.o bootstrap/compiler_declaration/compiler_declaration.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-enum.o bootstrap/compiler_enum/compiler_enum.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-type.o bootstrap/compiler_type/compiler_type.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-expression.o bootstrap/compiler_expression/compiler_expression.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-statement.o bootstrap/compiler_statement/compiler_statement.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-proof-kernel.o bootstrap/compiler_proof_kernel/compiler_proof_kernel.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-proof.o bootstrap/compiler_proof/compiler_proof.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-ir.o bootstrap/compiler_ir/compiler_ir.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-law.o bootstrap/compiler_law/compiler_law.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-services.o bootstrap/compiler_services/compiler_services.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-link.o bootstrap/compiler_link/compiler_link.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check.o cmd/zir/zir_check.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_value.o cmd/zir/zir_check_value.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_expr.o cmd/zir/zir_check_expr.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_statement.o cmd/zir/zir_check_statement.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_function.o cmd/zir/zir_check_function.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_link.o cmd/zir/zir_check_link.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_program.o cmd/zir/zir_check_program.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_simd.o cmd/zir/zir_check_simd.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_check_text.o cmd/zir/zir_check_text.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse.o cmd/zir/zir_parse.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse_declaration.o cmd/zir/zir_parse_declaration.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse_eval.o cmd/zir/zir_parse_eval.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse_typed.o cmd/zir/zir_parse_typed.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse_condition.o cmd/zir/zir_parse_condition.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse_source.o cmd/zir/zir_parse_source.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_parse_discover.o cmd/zir/zir_parse_discover.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit.o cmd/zir/zir_emit.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_value.o cmd/zir/zir_emit_value.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_call.o cmd/zir/zir_emit_call.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_expr.o cmd/zir/zir_emit_expr.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_statement.o cmd/zir/zir_emit_statement.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_gpu.o cmd/zir/zir_emit_gpu.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_range.o cmd/zir/zir_emit_range.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_simd.o cmd/zir/zir_emit_simd.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_emit_simd_go.o cmd/zir/zir_emit_simd_go.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/compiler-parse.o bootstrap/compiler_parse/compiler_parse.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/bootstrap/obj/cmd/zir/zir_runtime.o cmd/zir/zir_runtime.c
nice -n 10 cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -MMD -MP -c -o build/bootstrap/obj/runtime_headers.o build/bootstrap/runtime_headers.c
cc -r -nostdlib -o build/bootstrap/obj/check.o build/bootstrap/obj/cmd/zir/zir_check.o build/bootstrap/obj/cmd/zir/zir_check_value.o build/bootstrap/obj/cmd/zir/zir_check_expr.o build/bootstrap/obj/cmd/zir/zir_check_statement.o build/bootstrap/obj/cmd/zir/zir_check_function.o build/bootstrap/obj/cmd/zir/zir_check_link.o build/bootstrap/obj/cmd/zir/zir_check_program.o build/bootstrap/obj/cmd/zir/zir_check_simd.o build/bootstrap/obj/cmd/zir/zir_check_text.o && objcopy --localize-hidden build/bootstrap/obj/check.o
cc -r -nostdlib -o build/bootstrap/obj/parse.o build/bootstrap/obj/cmd/zir/zir_parse.o build/bootstrap/obj/cmd/zir/zir_parse_declaration.o build/bootstrap/obj/cmd/zir/zir_parse_eval.o build/bootstrap/obj/cmd/zir/zir_parse_typed.o build/bootstrap/obj/cmd/zir/zir_parse_condition.o build/bootstrap/obj/cmd/zir/zir_parse_discover.o build/bootstrap/obj/cmd/zir/zir_parse_source.o && objcopy --localize-hidden build/bootstrap/obj/parse.o
cc -r -nostdlib -o build/bootstrap/obj/emit.o build/bootstrap/obj/cmd/zir/zir_emit.o build/bootstrap/obj/cmd/zir/zir_emit_value.o build/bootstrap/obj/cmd/zir/zir_emit_call.o build/bootstrap/obj/cmd/zir/zir_emit_expr.o build/bootstrap/obj/cmd/zir/zir_emit_statement.o build/bootstrap/obj/cmd/zir/zir_emit_gpu.o build/bootstrap/obj/cmd/zir/zir_emit_range.o build/bootstrap/obj/cmd/zir/zir_emit_simd.o build/bootstrap/obj/cmd/zir/zir_emit_simd_go.o && objcopy --localize-hidden build/bootstrap/obj/emit.o
cc -O0 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -o build/bootstrap/bin/zi2c build/bootstrap/obj/cmd/zir-c/main.o build/bootstrap/obj/cmd/zir-c/zir_c_build.o build/bootstrap/obj/cmd/zir-c/zir_c_cache.o build/bootstrap/obj/cmd/zir-c/zir_c_lower.o build/bootstrap/obj/cmd/zir/zir_bundle.o build/bootstrap/obj/cmd/zir/zir_bundle_assets.o build/bootstrap/obj/compiler-bundle.o build/bootstrap/obj/cmd/zir/zir_overlay.o build/bootstrap/obj/cmd/zir/zir_semantic.o build/bootstrap/obj/cmd/zir/zir_document.o build/bootstrap/obj/cmd/zir/zir_sha256.o build/bootstrap/obj/cmd/zir/zir_context.o build/bootstrap/obj/cmd/zir/zir_memory.o build/bootstrap/obj/cmd/zir/zir_storage.o build/bootstrap/obj/cmd/zir/zir.o build/bootstrap/obj/cmd/zir/zir_asm.o build/bootstrap/obj/cmd/zir/zir_enum.o build/bootstrap/obj/cmd/zir/zir_type.o build/bootstrap/obj/cmd/zir/zir_text.o build/bootstrap/obj/cmd/zir/zir_native.o build/bootstrap/obj/cmd/zir/zir_simd.o build/bootstrap/obj/cmd/zir/zir_body.o build/bootstrap/obj/cmd/zir/zir_token.o build/bootstrap/obj/cmd/zir/zir_cleanup.o build/bootstrap/obj/cmd/zir/zir_expr.o build/bootstrap/obj/cmd/zir/zir_borrow.o build/bootstrap/obj/cmd/zir/zir_law.o build/bootstrap/obj/cmd/zir/zir_serial.o build/bootstrap/obj/cmd/zir/zir_load.o build/bootstrap/obj/cmd/zir/zir_packages.o build/bootstrap/obj/cmd/zir/zir_diagnostic.o build/bootstrap/obj/cmd/zir/zir_profile.o build/bootstrap/obj/cmd/zir/zir_files.o build/bootstrap/obj/cmd/zir/zir_services.o build/bootstrap/obj/compiler-scan.o build/bootstrap/obj/compiler-text.o build/bootstrap/obj/compiler-source.o build/bootstrap/obj/compiler-declaration.o build/bootstrap/obj/compiler-enum.o build/bootstrap/obj/compiler-type.o build/bootstrap/obj/compiler-expression.o build/bootstrap/obj/compiler-statement.o build/bootstrap/obj/compiler-proof-kernel.o build/bootstrap/obj/compiler-proof.o build/bootstrap/obj/compiler-ir.o build/bootstrap/obj/compiler-law.o build/bootstrap/obj/compiler-services.o build/bootstrap/obj/compiler-link.o build/bootstrap/obj/check.o build/bootstrap/obj/parse.o build/bootstrap/obj/emit.o build/bootstrap/obj/compiler-parse.o build/bootstrap/obj/cmd/zir/zir_runtime.o build/bootstrap/obj/runtime_headers.o -lm
chmod 755 build/bootstrap/bin/zi2c
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-ir cmd/compiler_ir.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-bundle cmd/compiler_bundle.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-type cmd/compiler_type.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-enum cmd/compiler_enum.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-text cmd/compiler_text.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-scan cmd/compiler_scan.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-statement cmd/compiler_statement.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-expression cmd/compiler_expression.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-parse cmd/compiler_parse.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-source cmd/compiler_source.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-declaration cmd/compiler_declaration.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-proof-kernel cmd/compiler_proof_kernel.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-proof cmd/compiler_proof.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-services cmd/compiler_services.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-law cmd/compiler_law.zi
env -u DISPLAY -u WAYLAND_DISPLAY build/bootstrap/bin/zi2c --no-main --root cmd \
-o build/compiler-link cmd/compiler_link.zi
touch build/compiler-ir/.generated
touch build/compiler-scan/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-c/main.o cmd/zir-c/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-c/zir_c_build.o cmd/zir-c/zir_c_build.c
touch build/compiler-services/.generated
touch build/compiler-enum/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-c/zir_c_cache.o cmd/zir-c/zir_c_cache.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-c/zir_c_lower.o cmd/zir-c/zir_c_lower.c
touch build/compiler-text/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_overlay.o cmd/zir/zir_overlay.c
touch build/compiler-law/.generated
touch build/compiler-bundle/.generated
touch build/compiler-proof-kernel/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_semantic.o cmd/zir/zir_semantic.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_document.o cmd/zir/zir_document.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_sha256.o cmd/zir/zir_sha256.c
touch build/compiler-expression/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_context.o cmd/zir/zir_context.c
touch build/compiler-source/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_memory.o cmd/zir/zir_memory.c
touch build/compiler-link/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_storage.o cmd/zir/zir_storage.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_asm.o cmd/zir/zir_asm.c
touch build/compiler-type/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_enum.o cmd/zir/zir_enum.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_type.o cmd/zir/zir_type.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_text.o cmd/zir/zir_text.c
touch build/compiler-statement/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_native.o cmd/zir/zir_native.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_simd.o cmd/zir/zir_simd.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_body.o cmd/zir/zir_body.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_token.o cmd/zir/zir_token.c
touch build/compiler-parse/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_cleanup.o cmd/zir/zir_cleanup.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_expr.o cmd/zir/zir_expr.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_borrow.o cmd/zir/zir_borrow.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_law.o cmd/zir/zir_law.c
touch build/compiler-proof/.generated
touch build/compiler-declaration/.generated
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_serial.o cmd/zir/zir_serial.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -DZIRAN_STD_DIR='"/mnt/storage/Projects/ziranlang/ziran/std"' -DZIRAN_INCLUDE_DIR='"/mnt/storage/Projects/ziranlang/ziran/include"' -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_load.o cmd/zir/zir_load.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_packages.o cmd/zir/zir_packages.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_diagnostic.o cmd/zir/zir_diagnostic.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_profile.o cmd/zir/zir_profile.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_files.o cmd/zir/zir_files.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_services.o cmd/zir/zir_services.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-scan.o build/compiler-scan/compiler_scan.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-text.o build/compiler-text/compiler_text.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-source.o build/compiler-source/compiler_source.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-declaration.o build/compiler-declaration/compiler_declaration.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-enum.o build/compiler-enum/compiler_enum.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-type.o build/compiler-type/compiler_type.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-expression.o build/compiler-expression/compiler_expression.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-statement.o build/compiler-statement/compiler_statement.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-proof-kernel.o build/compiler-proof-kernel/compiler_proof_kernel.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-proof.o build/compiler-proof/compiler_proof.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-ir.o build/compiler-ir/compiler_ir.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-law.o build/compiler-law/compiler_law.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-services.o build/compiler-services/compiler_services.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-link.o build/compiler-link/compiler_link.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_value.o cmd/zir/zir_check_value.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check.o cmd/zir/zir_check.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_expr.o cmd/zir/zir_check_expr.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_statement.o cmd/zir/zir_check_statement.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_function.o cmd/zir/zir_check_function.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_link.o cmd/zir/zir_check_link.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_program.o cmd/zir/zir_check_program.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_simd.o cmd/zir/zir_check_simd.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_check_text.o cmd/zir/zir_check_text.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse.o cmd/zir/zir_parse.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse_declaration.o cmd/zir/zir_parse_declaration.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse_eval.o cmd/zir/zir_parse_eval.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse_typed.o cmd/zir/zir_parse_typed.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse_condition.o cmd/zir/zir_parse_condition.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse_discover.o cmd/zir/zir_parse_discover.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_parse_source.o cmd/zir/zir_parse_source.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit.o cmd/zir/zir_emit.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_value.o cmd/zir/zir_emit_value.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_call.o cmd/zir/zir_emit_call.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_expr.o cmd/zir/zir_emit_expr.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_statement.o cmd/zir/zir_emit_statement.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_gpu.o cmd/zir/zir_emit_gpu.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_range.o cmd/zir/zir_emit_range.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_simd.o cmd/zir/zir_emit_simd.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_emit_simd_go.o cmd/zir/zir_emit_simd_go.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-parse.o build/compiler-parse/compiler_parse.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_runtime.o cmd/zir/zir_runtime.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -MMD -MP -c -o build/obj/runtime_headers.o build/runtime_headers.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-ir/main.o cmd/zir-ir/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-api/main.o cmd/zir-api/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-inspect/main.o cmd/zir-inspect/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-go/main.o cmd/zir-go/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-go/zir_go_lower.o cmd/zir-go/zir_go_lower.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-go/zir_go_asm.o cmd/zir-go/zir_go_asm.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-go/zir_go_amd64.o cmd/zir-go/zir_go_amd64.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -DZIRAN_NATIVE_ZX -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-zx/main.o cmd/zir-zx/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -DZIRAN_NATIVE_ZX -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_host.o cmd/zir/zir_host.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_vm.o cmd/zir/zir_vm.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_vm_verify.o cmd/zir/zir_vm_verify.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_vm_eval.o cmd/zir/zir_vm_eval.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_vm_run.o cmd/zir/zir_vm_run.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_vm_simd.o cmd/zir/zir_vm_simd.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_zx_wasm.o cmd/zir/zir_zx_wasm.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_zx_wasm_web.o cmd/zir/zir_zx_wasm_web.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-wasm/zir_wasm_lower.o cmd/zir-wasm/zir_wasm_lower.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Ithird_party/tinycc -DZX_NATIVE_IDENTITY=\"a7c95582845ce3073740d9b03250a618\" -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_zx_native.o cmd/zir/zir_zx_native.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_zx_native_run.o cmd/zir/zir_zx_native_run.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_zx_native_lower.o cmd/zir/zir_zx_native_lower.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_zx_host.o cmd/zir/zir_zx_host.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -MMD -MP -c -o build/obj/zx_native_headers.o build/zx_native_headers.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir-wasm/main.o cmd/zir-wasm/main.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/zir_host_vm.o cmd/zir/zir_host.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/tests/bundle_link_test.o tests/bundle_link_test.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_bundle.o cmd/zir/zir_bundle.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir_bundle_assets.o cmd/zir/zir_bundle_assets.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/compiler-bundle.o build/compiler-bundle/compiler_bundle.c
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/cmd/zir/zir.o cmd/zir/zir.c
cc -r -nostdlib -o build/obj/check.o build/obj/cmd/zir/zir_check.o build/obj/cmd/zir/zir_check_value.o build/obj/cmd/zir/zir_check_expr.o build/obj/cmd/zir/zir_check_statement.o build/obj/cmd/zir/zir_check_function.o build/obj/cmd/zir/zir_check_link.o build/obj/cmd/zir/zir_check_program.o build/obj/cmd/zir/zir_check_simd.o build/obj/cmd/zir/zir_check_text.o && objcopy --localize-hidden build/obj/check.o
cc -r -nostdlib -o build/obj/emit.o build/obj/cmd/zir/zir_emit.o build/obj/cmd/zir/zir_emit_value.o build/obj/cmd/zir/zir_emit_call.o build/obj/cmd/zir/zir_emit_expr.o build/obj/cmd/zir/zir_emit_statement.o build/obj/cmd/zir/zir_emit_gpu.o build/obj/cmd/zir/zir_emit_range.o build/obj/cmd/zir/zir_emit_simd.o build/obj/cmd/zir/zir_emit_simd_go.o && objcopy --localize-hidden build/obj/emit.o
cc -r -nostdlib -o build/obj/parse.o build/obj/cmd/zir/zir_parse.o build/obj/cmd/zir/zir_parse_declaration.o build/obj/cmd/zir/zir_parse_eval.o build/obj/cmd/zir/zir_parse_typed.o build/obj/cmd/zir/zir_parse_condition.o build/obj/cmd/zir/zir_parse_discover.o build/obj/cmd/zir/zir_parse_source.o && objcopy --localize-hidden build/obj/parse.o
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi-api build/obj/cmd/zir-api/main.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o -lm
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi2c build/obj/cmd/zir-c/main.o build/obj/cmd/zir-c/zir_c_build.o build/obj/cmd/zir-c/zir_c_cache.o build/obj/cmd/zir-c/zir_c_lower.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/compiler-bundle.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o build/obj/cmd/zir/zir_runtime.o build/obj/runtime_headers.o -lm
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi2zir build/obj/cmd/zir-ir/main.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/compiler-bundle.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o -lm
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi-inspect build/obj/cmd/zir-inspect/main.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/compiler-bundle.o -lm
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi2go build/obj/cmd/zir-go/main.o build/obj/cmd/zir-go/zir_go_lower.o build/obj/cmd/zir-go/zir_go_asm.o build/obj/cmd/zir-go/zir_go_amd64.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/compiler-bundle.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o -lm
chmod 755 build/bin/zi2c
chmod 755 build/bin/zi2zir
build/bin/zi2c --entry edit:main --root cmd --module-path std -o build/edit-c cmd/edit.zi
rm -rf build/package-c.next
build/bin/zi2c --entry format:main --root cmd --module-path std \
-o build/format-c cmd/format.zi
mkdir -p build/package-source
printf 'Version :: "%s";\n' '0.4.0' > build/package-source/version.zi
build/bin/zi2c --no-main --root cmd --module-path std \
--module-path build/package-source -o build/package-c.next cmd/package_entry.zi
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Ibuild/format-c -o build/bin/zi-fmt build/format-c/*.c -lm
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Ibuild/edit-c -o build/bin/zi-edit build/edit-c/*.c cmd/zir/zir_edit.c build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o -lm
cc -r -nostdlib -o build/obj/vm.o build/obj/cmd/zir/zir_vm.o build/obj/cmd/zir/zir_vm_verify.o build/obj/cmd/zir/zir_vm_eval.o build/obj/cmd/zir/zir_vm_run.o build/obj/cmd/zir/zir_vm_simd.o && objcopy --localize-hidden build/obj/vm.o
rm -f build/libziran.a
ar rcs build/libziran.a build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/cmd/zir/zir_host.o build/obj/compiler-bundle.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/vm.o build/obj/cmd/zir/zir_zx_wasm.o build/obj/cmd/zir/zir_zx_wasm_web.o build/obj/cmd/zir-wasm/zir_wasm_lower.o build/obj/compiler-parse.o build/obj/cmd/zir/zir_zx_native.o build/obj/cmd/zir/zir_zx_native_run.o build/obj/cmd/zir/zir_zx_native_lower.o build/obj/cmd/zir/zir_zx_host.o build/obj/cmd/zir-c/zir_c_lower.o build/obj/cmd/zir-c/zir_c_build.o build/obj/cmd/zir-c/zir_c_cache.o build/obj/cmd/zir/zir_runtime.o build/obj/runtime_headers.o build/obj/zx_native_headers.o build/obj/tinycc.o
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/bundle-link-test build/obj/tests/bundle_link_test.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/compiler-bundle.o build/obj/vm.o -lm -pthread -ldl
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi2zx build/obj/cmd/zir-zx/main.o build/libziran.a -lm -pthread -ldl
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/zi2wasm build/obj/cmd/zir-wasm/main.o build/obj/cmd/zir-wasm/zir_wasm_lower.o build/libziran.a -lm -pthread -ldl
mkdir -p build/package-c
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/host-capability-test tests/host_capability_test.c build/libziran.a -lm -pthread -ldl
for f in build/package-c.next/*; do \
cmp -s "$f" "build/package-c/${f##*/}" || cp "$f" build/package-c/; done
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/record-host-test tests/record_host_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/record-fields-by-name-test tests/record_fields_by_name_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/array-host-test tests/host_array_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/slice-host-test tests/host_slice_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/process-host-test tests/process_host_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/startup-graph-test \
tests/startup_graph_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/vm-vec-scope-test \
tests/vm_vec_scope_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/vm-locale-test \
tests/vm_locale_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/zx-wasm-engine-test \
tests/zx_wasm_engine_test.c build/libziran-vm.a -lm -pthread -ldl
chmod 755 build/bin/zi2zx
for f in build/package-c/*; do \
[ -e "build/package-c.next/${f##*/}" ] || rm -f "$f"; done
rm -rf build/package-c.next
touch build/package-c/.generated
/usr/bin/make --no-print-directory package-link
bootstrap matches: scan text source declaration enum type expression statement proof_kernel proof bundle ir law services link parse
rm -f build/bin/zi2py build/bin/zi2zib build/bin/zi2cpp build/bin/zi2rust build/bin/zi2zx-vm
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/startup-graph-test
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/zx-wasm-engine-test
scalar.zi:2:1: the wasm provider rejected the lowered module
zx-wasm-engine-test: seam, provider handoff and fallback verified
python3 tests/run_check.py --bin-dir build/bin --jobs 16 \
Running 522 checks with 16 jobs (0 reused)
PASS bundle-link-test (0.0s)
PASS api_discovery.sh (0.1s)
PASS zx_native_perf_regression.sh (0.2s)
PASS aggregate_view_lifetime.sh (0.2s)
PASS artifact_consumer.sh (0.3s)
PASS asm_tinycc_encoding.sh (0.1s)
PASS as_conversion.sh (0.8s)
PASS array_result_in_place.sh (0.9s)
PASS aggregate_vec_safety.sh (0.9s)
PASS atomic_cli_link.sh (0.2s)
PASS asm_routines.sh (0.9s)
PASS body_eligibility.sh (0.1s)
PASS borrow_import_graph.sh (0.1s)
PASS benchmark_harness.sh (0.4s)
PASS assembly.sh (1.7s)
PASS build_playground.sh (0.7s)
PASS builtin_type_names.sh (0.2s)
PASS bundle_assets.sh (0.3s)
PASS bundle_component.sh (0.3s)
PASS bit_builtins.sh (1.5s)
PASS bundle_global_reachability.sh (0.2s)
PASS bundle_host_query.sh (0.3s)
PASS borrowed_view_return.sh (1.5s)
PASS bundle_owned_field.sh (0.1s)
PASS bundle_libraries.sh (0.3s)
PASS asm_dct8.sh (3.0s)
PASS bundle_memory_host.sh (0.3s)
PASS bundle_host_review_abi.sh (0.7s)
PASS bundle_verification.sh (0.2s)
PASS bundle_step_limit.sh (0.3s)
PASS assembly_blocks.sh (3.0s)
PASS c_exe_link.sh (0.1s)
PASS bundle_runtime_provider.sh (0.5s)
PASS c_call.sh (0.4s)
PASS c_reexport_type_header.sh (0.3s)
PASS float_integer_casts.sh (3.8s)
PASS bundle_partial_modules.sh (1.0s)
PASS assembly_features.sh (3.5s)
PASS c_reexport_alias.sh (0.4s)
PASS c_warning_free_logic.sh (0.1s)
PASS c_module_init.sh (0.5s)
PASS c99_target.sh (0.7s)
PASS callback_record_layout.sh (0.1s)
PASS c_spelling.sh (0.3s)
PASS callback_array_parameters.sh (0.1s)
PASS callback_table_layout.sh (0.1s)
PASS call_site_inlining.sh (0.3s)
PASS capabilities.sh (0.2s)
PASS callback_type_order.sh (0.3s)
PASS call_order.sh (0.5s)
PASS c_warnings.sh (1.0s)
PASS caller_location.sh (0.9s)
PASS cli_defines.sh (0.9s)
PASS compile_commands.sh (0.1s)
PASS calendar.sh (1.8s)
PASS cli_help.sh (1.0s)
PASS char.sh (1.7s)
PASS compact_branches.sh (1.0s)
PASS checked_integer_ops.sh (1.8s)
PASS compile_ifx.sh (0.5s)
PASS check_runner.sh (2.0s)
PASS compile_run_text.sh (0.5s)
PASS compile_time.sh (0.8s)
PASS call_ranges.sh (3.1s)
PASS compile_values.sh (1.0s)
PASS compiler_profile.sh (0.1s)
PASS compiler_enum.sh (1.9s)
PASS compiler_bundle.sh (2.3s)
PASS compile_if_syntax.sh (3.1s)
PASS compiler_expression.sh (2.1s)
PASS compiler_scan.sh (1.4s)
PASS compiler_proof_kernel.sh (2.4s)
PASS authoring_workflows.sh (9.7s)
PASS compiler_declaration.sh (5.8s)
PASS compound_order.sh (0.6s)
PASS compiler_source.sh (4.0s)
PASS compiler_statement.sh (3.0s)
PASS constant_time.sh (0.1s)
PASS compiler_text.sh (2.8s)
PASS compiler_type.sh (2.8s)
FAIL cross_module_inline.sh (0.5s, exit 1)
PASS cross_target_ui_shapes.sh (0.9s)
PASS date_time.sh (0.1s)
PASS constant_names.sh (1.9s)
PASS deep_nesting.sh (0.8s)
PASS constant_tables.sh (2.5s)
PASS date_parse.sh (2.3s)
PASS default_bounds.sh (0.6s)
PASS data_scope_using.sh (2.4s)
PASS large_array_literals.sh (16.6s)
PASS defined_predicate.sh (1.0s)
PASS defer_block.sh (1.1s)
PASS date_time_linux.sh (2.5s)
PASS default_arguments.sh (1.6s)
PASS diagnostic_android.sh (0.4s)
PASS diagnostic_bounds.sh (0.1s)
PASS diagnostic_details.sh (0.1s)
PASS diagnostic_metadata.sh (0.1s)
PASS diagnostic_format.sh (0.4s)
PASS empty_aggregate_lifetime.sh (0.8s)
PASS division.sh (0.9s)
PASS entry_dead_code.sh (0.7s)
PASS enum_cast.sh (0.3s)
PASS environment_native.sh (0.3s)
PASS enum_zero_arrays.sh (0.7s)
PASS directory_entry.sh (2.0s)
PASS explain.sh (0.3s)
PASS exe_build.sh (0.5s)
PASS emit_changed_module.sh (2.3s)
PASS definite_initialization.sh (3.5s)
PASS ffi_header_import.sh (0.1s)
PASS compile_run.sh (14.1s)
PASS enum_flags.sh (2.2s)
PASS file_new.sh (0.6s)
PASS file_portable.sh (0.5s)
PASS file_copy_new.sh (1.4s)
PASS features.sh (1.6s)
PASS file_read_into.sh (0.9s)
PASS file_link.sh (2.0s)
PASS foreign_keywords.sh (0.4s)
PASS field_guard_ranges.sh (2.8s)
PASS for_range.sh (1.3s)
PASS foreign_value_names.sh (0.7s)
PASS foreign_reads.sh (1.1s)
PASS for_collection.sh (2.1s)
PASS formatter_parallel.sh (0.1s)
PASS file_scope.sh (2.6s)
PASS format_builder.sh (1.8s)
PASS fuzz_regressions.sh (0.1s)
PASS forward_load_conditions.sh (1.7s)
PASS forward_import_conditions.sh (1.8s)
PASS compiler_files_portable.sh (17.8s)
PASS forward_type_conditions.sh (2.0s)
PASS formatter.sh (2.5s)
PASS generic_parameters.sh (1.2s)
PASS file_type_of.sh (5.2s)
PASS generic_record.sh (0.9s)
PASS compiler_profile_portable.sh (19.1s)
PASS generic_procedure.sh (1.2s)
PASS examples.sh (8.7s)
PASS global_string_output.sh (0.1s)
PASS global_owned_storage.sh (1.8s)
PASS generic_slice_parameter.sh (2.1s)
PASS global_names.sh (2.2s)
PASS global_slots.sh (2.6s)
PASS generic_record_imports.sh (3.0s)
PASS go_anonymous_records.sh (2.2s)
PASS generic_array_parameter.sh (5.2s)
PASS generic_multiple_results.sh (5.6s)
PASS go_conditional_widening.sh (0.7s)
PASS go_constant_strings.sh (0.7s)
PASS go_assert_spawn.sh (4.2s)
PASS go_callback_type_owners.sh (3.2s)
PASS go_export_roots.sh (0.7s)
PASS go_auth_primitives.sh (5.0s)
PASS go_bind.sh (4.7s)
PASS go_field_tags.sh (1.3s)
PASS go_defer.sh (4.7s)
PASS go_fields.sh (2.1s)
PASS compiler_runtime_windows.sh (27.3s)
PASS go_foreign_types.sh (1.1s)
PASS go_error_values.sh (3.5s)
PASS go_c_headers.sh (7.7s)
PASS go_direct_assembly.sh (5.8s)
PASS go_maps.sh (1.1s)
PASS go_file_json.sh (3.6s)
PASS go_output_stream.sh (0.8s)
PASS go_package.sh (0.5s)
PASS go_http_client.sh (4.1s)
PASS go_many_parameters.sh (3.6s)
PASS go_methods.sh (3.1s)
PASS go_http_io.sh (4.3s)
PASS go_native_values.sh (3.1s)
PASS generic_assembly.sh (15.6s)
PASS go_string_pointers.sh (0.7s)
PASS go_results.sh (2.1s)
PASS go_variadic.sh (1.1s)
PASS go_pointer_arrays.sh (3.0s)
PASS gpu.sh (0.9s)
PASS go_assembly.sh (14.4s)
PASS go_method_exports.sh (6.6s)
PASS guide.sh (0.0s)
PASS go_package_init.sh (4.0s)
PASS hash_comments.sh (0.2s)
PASS go_slice_nil.sh (3.1s)
PASS go_select.sh (3.1s)
PASS gzip.sh (0.6s)
PASS host_capability.sh (0.1s)
PASS heap_new.sh (0.8s)
PASS host_export_link.sh (0.1s)
PASS go_sql_time.sh (3.3s)
PASS hmac_sha256_go.sh (0.7s)
PASS host_bindings.sh (0.7s)
PASS host_arrays.sh (0.8s)
PASS std_unicode_normalization.sh (43.8s)
PASS host_module_binding.sh (0.8s)
PASS hash_map.sh (2.5s)
PASS implicit_widening.sh (1.3s)
PASS gpu_offload.sh (3.1s)
PASS host_ziran_binding.sh (1.7s)
PASS import_string.sh (1.3s)
PASS imported_callback_cast.sh (0.3s)
PASS if_then.sh (2.1s)
PASS imported_global_type_owner.sh (0.1s)
PASS guarded_index_ranges.sh (3.8s)
PASS zx_web_lifecycle.sh (46.3s)
PASS imported_constant_names.sh (1.3s)
PASS imported_enum_names.sh (1.3s)
PASS imported_field_type_alias.sh (1.4s)
PASS imported_native_types.sh (0.3s)
PASS imported_global_names.sh (1.4s)
PASS go_named_exports.sh (9.9s)
PASS indexed_field_read.sh (0.2s)
PASS host_slices.sh (3.8s)
PASS imported_map_slices.sh (0.8s)
PASS input_in_module_path.sh (0.2s)
PASS imported_value_names.sh (1.1s)
PASS inferred_int.sh (1.0s)
PASS imported_type_names.sh (1.6s)
PASS inferred_record.sh (1.0s)
PASS install_user.sh (1.2s)
PASS imported_typed_constants.sh (1.8s)
PASS kept_text.sh (0.1s)
PASS integer_literal_spellings.sh (0.8s)
PASS jai_syntax.sh (1.5s)
PASS json_array_reuse.sh (1.6s)
PASS json_string_value.sh (1.3s)
PASS large_record.sh (0.1s)
PASS law_cases.sh (0.0s)
PASS law_floats.sh (0.1s)
PASS language_contract.sh (1.5s)
PASS json_scan.sh (2.2s)
PASS large_enums.sh (0.7s)
PASS lint_casts.sh (0.0s)
PASS lint_characters.sh (0.0s)
PASS lint_flags.sh (0.0s)
PASS law_records.sh (0.2s)
PASS law_integers.sh (0.5s)
PASS laws.sh (0.8s)
PASS local_owned_fields.sh (1.0s)
PASS local_shadows_import.sh (0.4s)
PASS local_procedures.sh (0.9s)
PASS large_constant_globals.sh (2.4s)
PASS long_string_constants.sh (0.4s)
PASS imported_host_slices.sh (5.9s)
PASS macro_temporaries.sh (0.2s)
PASS mapped_file_linux.sh (0.2s)
PASS imported_aggregate_constants.sh (7.5s)
PASS long_literals.sh (1.1s)
PASS math_float64.sh (0.6s)
PASS imported_globals.sh (7.5s)
PASS image_resize_fallible.sh (9.7s)
PASS module_symlink.sh (0.2s)
PASS many_functions.sh (2.0s)
PASS module_root_capacity.sh (1.2s)
PASS multiline_param_targets.sh (0.8s)
PASS match.sh (2.5s)
PASS loop_guard_ranges.sh (3.2s)
PASS must_use.sh (0.4s)
PASS indirect_record_types.sh (8.1s)
PASS mutex_linux.sh (0.4s)
PASS module_paths.sh (2.5s)
PASS multiple_results.sh (1.2s)
PASS named_module_paths.sh (0.4s)
PASS named_arguments.sh (1.1s)
PASS named_imports.sh (1.0s)
PASS module_symbol_names.sh (2.6s)
PASS named_generic_dependencies.sh (1.7s)
PASS llm_authoring.sh (6.5s)
PASS native_function_value_names.sh (0.9s)
PASS module_import_identity.sh (4.6s)
PASS native_loops.sh (0.5s)
PASS native_c_ffi.sh (2.2s)
PASS native_release.sh (0.5s)
PASS lanczos_isa_bitexact.sh (9.0s)
PASS native_nil.sh (0.9s)
PASS native_operand_order.sh (1.1s)
PASS native_object_reuse.sh (1.2s)
PASS native_switch.sh (0.6s)
PASS native_threads.sh (0.6s)
PASS negative_real_constants.sh (0.2s)
PASS native_run.sh (1.3s)
PASS nested_array_assign.sh (0.9s)
PASS multiline_strings.sh (5.4s)
PASS native_type_value_names.sh (1.4s)
PASS nested_comments.sh (1.5s)
PASS nested_constant_tables.sh (1.1s)
PASS nested_lazy_call.sh (0.9s)
PASS opaque_text_lifetime.sh (0.1s)
PASS native_entry.sh (4.2s)
PASS numeric_semantics.sh (1.6s)
PASS overloads.sh (1.1s)
PASS operators.sh (1.1s)
PASS numeric_width_matrix.sh (1.5s)
PASS host_strings.sh (31.2s)
PASS package_darwin.sh (13.3s)
PASS package_relative_imports.sh (2.2s)
PASS package_process.sh (2.5s)
PASS native_commands.sh (21.3s)
PASS parallel_captures.sh (0.2s)
PASS owned_text_results.sh (16.2s)
PASS parallel_linux.sh (0.5s)
PASS paren_record_literal.sh (0.1s)
PASS owned_text.sh (17.6s)
PASS parallel.sh (1.2s)
PASS pointer_cast_nested_array.sh (0.1s)
PASS parser_recovery.sh (0.6s)
PASS parallel_results.sh (1.2s)
PASS pointer_field_text_lifetime.sh (0.3s)
PASS parallel_slices.sh (1.2s)
PASS pointer_to_array.sh (0.0s)
PASS pointer_subscript.sh (0.2s)
PASS pointer_slot_params.sh (0.3s)
PASS portable_collection.sh (0.1s)
PASS native_runtime_headers.sh (21.3s)
PASS portable_format.sh (0.2s)
PASS package_checkout_concurrency.sh (17.7s)
PASS path.sh (1.3s)
PASS nested_vec_elements.sh (19.7s)
PASS portable_imported_record_slices.sh (0.1s)
PASS portable_long_runs.sh (0.2s)
PASS portable_s64.sh (0.1s)
PASS portable_limits.sh (0.4s)
PASS pointer_member_check.sh (1.7s)
PASS portable_arrays.sh (1.5s)
PASS primitive_types.sh (0.1s)
PASS package_map_concurrency.sh (18.8s)
PASS portable_pointers.sh (1.4s)
PASS private_field_type_header.sh (0.2s)
PASS portable_strings.sh (1.4s)
PASS portable_entry.sh (2.1s)
PASS portable_globals.sh (1.9s)
PASS portable_host_records.sh (1.9s)
PASS native_build_cache.sh (25.8s)
PASS private_type_application.sh (0.2s)
PASS private_type_application_load.sh (0.2s)
PASS process.sh (0.6s)
PASS private_module_imports.sh (0.8s)
PASS print_enums.sh (1.4s)
PASS portable_slices.sh (2.3s)
PASS print.sh (1.6s)
PASS print_records.sh (1.6s)
PASS queue.sh (0.1s)
PASS qualified_slot_record_types.sh (0.3s)
PASS random_linux.sh (0.2s)
PASS proofs.sh (0.6s)
PASS process_channel_linux.sh (1.1s)
PASS range_loop_one_exit.sh (0.3s)
PASS record_fields_by_name.sh (0.1s)
PASS record_abi_metadata.sh (0.1s)
PASS record_slice_header.sh (0.0s)
PASS procedure_inlining.sh (1.5s)
PASS record_pointer_layout.sh (0.2s)
PASS rejection_helper.sh (0.1s)
PASS program_export.sh (1.1s)
PASS record_update_stack.sh (0.5s)
PASS range_types.sh (0.9s)
PASS procedure_result_reachability.sh (2.1s)
PASS native_build_parallel.sh (27.9s)
PASS recursive_slice_records.sh (0.8s)
PASS saved_ir_call_argument_cast.sh (0.0s)
PASS qualified_pointer_import.sh (1.6s)
PASS process_channel_wait_linux.sh (2.3s)
PASS return_paths.sh (0.9s)
PASS resizable_arrays.sh (0.9s)
PASS saved_ir_blocks.sh (0.4s)
PASS runtime_local_names.sh (0.8s)
PASS safe_inference.sh (0.8s)
PASS signature_spacing.sh (0.0s)
PASS proven_index_ranges.sh (2.3s)
PASS semantic_edit.sh (0.8s)
PASS shared_foreign_bindings.sh (0.5s)
PASS sequence_header.sh (0.6s)
PASS sha256.sh (0.7s)
PASS shadowed_binding_reads_outer.sh (0.8s)
PASS semicolon_statements.sh (1.4s)
PASS runtime_globals.sh (1.8s)
PASS shared_type_application.sh (1.1s)
PASS reexport_import.sh (2.8s)
PASS site_targets.sh (0.6s)
PASS slot_field_values.sh (0.1s)
PASS native_workers_windows.sh (27.2s)
PASS slot_type_collision.sh (0.1s)
PASS size_of.sh (0.8s)
PASS socket_linux.sh (0.3s)
PASS sort.sh (0.8s)
PASS slice_field_bound.sh (1.3s)
PASS slots.sh (1.1s)
PASS stale_output.sh (0.3s)
PASS standalone_std.sh (0.3s)
PASS simd_run_ranges.sh (3.0s)
PASS std_binary.sh (0.6s)
PASS std_file_tree_wasm32.sh (0.0s)
PASS std_file_darwin.sh (0.6s)
PASS source_line.sh (1.6s)
PASS std_foreign_size_types.sh (0.1s)
PASS simd_go.sh (3.9s)
PASS std_image_composite_at.sh (0.8s)
PASS std_file_tree_linux.sh (1.8s)
PASS std_image_transpose.sh (0.6s)
PASS std_image_linux.sh (1.4s)
PASS std_import_spelling_identity.sh (0.6s)
PASS std_native_linux.sh (0.4s)
PASS std_number_text.sh (0.1s)
PASS std_text.sh (0.0s)
PASS simd_std_imports.sh (6.1s)
PASS std_tools_linux.sh (0.6s)
PASS std_utf8.sh (1.5s)
PASS standalone.sh (6.0s)
PASS stored_type_diagnostic.sh (0.0s)
PASS std_grapheme.sh (5.2s)
PASS string_ranges.sh (0.4s)
PASS structure_first_error.sh (0.1s)
PASS stored_slots.sh (0.8s)
PASS std_text_results.sh (4.2s)
PASS symbol_lookup.sh (0.8s)
PASS string_storage.sh (1.9s)
PASS target_diagnostics.sh (1.4s)
PASS text_call_mutation.sh (0.7s)
PASS text_condition_arms.sh (1.0s)
PASS text_hex_decode.sh (0.3s)
PASS text_procedure_type_reads.sh (0.6s)
PASS text_reads_field_paths.sh (0.7s)
PASS text_reassigned_local.sh (0.7s)
PASS text_format_arguments.sh (1.2s)
PASS std_file_windows.sh (8.6s)
PASS text_stream.sh (0.3s)
PASS text_view.sh (1.0s)
PASS text_string_arrays.sh (1.2s)
PASS text_view_mutation.sh (0.5s)
PASS std_unicode.sh (97.5s)
PASS thread_android.sh (0.0s)
PASS text_scoped_arguments.sh (2.6s)
PASS text_scoped_producers.sh (2.2s)
PASS timer_linux.sh (0.2s)
PASS text_without_vec_import.sh (1.0s)
PASS thread_linux.sh (0.6s)
PASS this.sh (0.9s)
PASS tool_diagnostics.sh (0.4s)
PASS unchanged_outputs.sh (0.1s)
PASS transport_view.sh (0.3s)
PASS unary_precedence.sh (0.8s)
PASS union.sh (1.2s)
PASS unterminated_declarations.sh (0.1s)
PASS unicode_data.sh (1.3s)
PASS unreachable.sh (0.9s)
PASS update.sh (0.6s)
PASS text_std_module_path.sh (5.1s)
PASS using.sh (1.1s)
PASS using_import.sh (1.0s)
PASS using_modifiers.sh (0.9s)
PASS using_pointer.sh (0.7s)
PASS unused_enum_call.sh (2.1s)
PASS variadic_foreigns.sh (0.1s)
PASS utf8_copy_valid.sh (0.6s)
PASS std_json_document.sh (13.3s)
PASS toml_document.sh (4.3s)
PASS std_time_windows.sh (12.7s)
PASS using_struct.sh (0.8s)
PASS vec_move_expression.sh (0.2s)
PASS version.sh (0.0s)
PASS vec_resize_stack.sh (0.3s)
PASS vec_slice_global.sh (0.3s)
PASS vec_auto_drop.sh (0.8s)
PASS vm_builtin_dispatch.sh (0.6s)
PASS vm_call_metadata.sh (0.6s)
PASS vec.sh (1.3s)
PASS vec_field_loops.sh (1.9s)
PASS vm_binary_dispatch.sh (1.8s)
PASS vm_deep_marking.sh (1.6s)
PASS simd_native.sh (21.6s)
PASS vm_locale.sh (0.1s)
PASS vm_local_reads.sh (1.1s)
PASS vm_concurrent_instances.sh (3.5s)
PASS vm_nested_collection.sh (0.5s)
PASS vm_profile.sh (0.2s)
PASS vm_inline_records.sh (3.5s)
PASS vm_leaf_eval.sh (2.8s)
PASS vm_literal_cache.sh (2.8s)
PASS vm_function_plans.sh (4.1s)
PASS vm_return_storage.sh (0.6s)
PASS simd.sh (24.4s)
PASS vm_packed_arrays.sh (2.0s)
PASS vm_metadata_cache.sh (2.6s)
PASS vm_record_layout.sh (1.8s)
PASS vm_storage_reads.sh (0.9s)
PASS vm_vec_scope.sh (0.1s)
PASS wasm_cc.sh (0.0s)
PASS vm_retirement.sh (1.9s)
PASS wasm_slices.sh (0.2s)
PASS vm_scalar_coercion.sh (1.8s)
PASS vm_scalar_plans.sh (1.7s)
PASS vm_u64_enums.sh (0.9s)
PASS thread_windows.sh (12.1s)
PASS vorbis_linux.sh (1.5s)
PASS vm_value_payloads.sh (1.8s)
PASS wide_comparisons.sh (1.3s)
PASS vm_vec_type_cache.sh (1.9s)
PASS wide_constants.sh (1.5s)
PASS zip_file_linux.sh (0.5s)
PASS zip.sh (0.7s)
PASS zx_native_asm.sh (0.1s)
PASS zir_api.sh (0.6s)
PASS widening_cast.sh (1.7s)
PASS zx_native_cache.sh (0.2s)
PASS vec_capacity.sh (8.9s)
PASS zx_native_parallel.sh (0.3s)
PASS zx_native_invocation_regression.sh (0.4s)
PASS zx_portable_write.sh (0.2s)
PASS web_bridge.sh (2.2s)
PASS wasm_enums.sh (2.7s)
PASS zero_arrays.sh (2.3s)
PASS zx_wasm.sh (1.6s)
PASS zx_wasm_web.sh (2.7s)
PASS zstd_go.sh (5.9s)
PASS simd_target.sh (32.6s)
PASS packages.sh (118.4s)
PASS zx_linked_web.sh (15.1s)
PASS simd_tier_units.sh (44.7s)
PASS std_float_text.sh (132.6s)
PASS site_pages.sh (170.0s)
PASS compiler_kernel_benchmarks.sh (282.8s)
=== FAIL cross_module_inline.sh (exit 1)
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/api.h:#ifdef __cplusplus
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/api.h:extern "C" {
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/api.h:#ifdef __cplusplus
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/app.h:#ifdef __cplusplus
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/app.h:extern "C" {
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/app.h:#ifdef __cplusplus
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/lib.h:#ifdef __cplusplus
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/lib.h:extern "C" {
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/lib.h:#if !defined(__cplusplus) && !defined(ZIRAN_LIB_H_SOURCE) && !defined(ZIRAN_NO_HEADER_INLINE)
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.jr8rpi_0/cross_module_inline.sh.dfm61mfz/tmp.g8tpKXWxEM/c-source/lib.h:#ifdef __cplusplus
C++ scaffolding survived in C target output
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/cross_module_inline.sh.log
521/522 passed in 282.8s (522 executed, 0 reused): failed cross_module_inline.sh
make: *** [Makefile:643: check] Error 1
@@ -1,11 +0,0 @@
mkdir -p build/
rm -f build/bin/zi2py build/bin/zi2zib build/bin/zi2cpp build/bin/zi2rust build/bin/zi2zx-vm
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/startup-graph-test
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/zx-wasm-engine-test
scalar.zi:2:1: the wasm provider rejected the lowered module
zx-wasm-engine-test: seam, provider handoff and fallback verified
python3 tests/run_check.py --bin-dir build/bin --jobs 16 \
--filter cross_module_inline
Running 1 checks with 1 jobs (0 reused)
PASS cross_module_inline.sh (1.1s)
1/1 passed in 1.1s (1 executed, 0 reused)
@@ -1 +0,0 @@
Playground runtime: examples, imports, 64-bit integers, compile-time values, UTF-8, floats, diagnostics, execution limits, and recovery passed
@@ -1,2 +0,0 @@
Web BuildBundle: 273 roots and inputs, last-root/last-input resolution, first-root ordering, empty separators, diagnostics, stale-output removal, repeated error recovery passed
Browser bundle compiler: named imports, deterministic output, diagnostics, 64-bit values, UTF-8, stale-output removal, and recovery passed
@@ -1,8 +0,0 @@
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 160, in <module>
run([cxx, '-std=c++17', '-O2', '-I'+str(repo/'include'), '-I'+str(out), out/'body.o', cpp_host, '-o', out/'cpp-probe'])
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 21, in run
assert result.returncode == answer, (command, result.returncode, result.stdout, result.stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: (['/home/wao/.local/bin/c++', '-std=c++17', '-O2', '-I/mnt/storage/Projects/ziranlang/ziran/include', '-I/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/c-source', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/c-source/body.o'), PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/host.cpp'), '-o', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/c-source/cpp-probe')], 1, '', "/usr/bin/ld: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/cc4WMTdr.o: in function `main':\nhost.cpp:(.text.startup+0x5): undefined reference to `Probe()'\ncollect2: error: ld returned 1 exit status\n")
@@ -1,11 +0,0 @@
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 38, in <module>
actual = run(ziran, 'run', bundle).stdout
~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 30, in run
return subprocess.run(list(map(str, args)), check=True, capture_output=True, text=True, **kwargs)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/mnt/storage/Projects/ziranlang/ziran/build/bin/ziran', 'run', '/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/portable_entry.sh.earuot3y/tmp.qlAt6rh4Nf/true-source.zx']' returned non-zero exit status 1.
@@ -1,5 +0,0 @@
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/program_export.sh.onmy05o9/tmp.S8X2dAAbB9/keyword_main.c: In function ‘main’:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/program_export.sh.onmy05o9/tmp.S8X2dAAbB9/keyword_main.c:4:45: error: implicit declaration of function ‘ziran_keyword_class_0’; did you mean ‘ziran_keyword_switch_0’? [-Wimplicit-function-declaration]
4 | ziran_keyword_switch_0() == 1 && ziran_keyword_class_0() == 2
| ^~~~~~~~~~~~~~~~~~~~~
| ziran_keyword_switch_0
@@ -1,987 +0,0 @@
mkdir -p build/
rm -f build/bin/zi2py build/bin/zi2zib build/bin/zi2cpp build/bin/zi2rust build/bin/zi2zx-vm
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/host-capability-test tests/host_capability_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/record-host-test tests/record_host_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/record-fields-by-name-test tests/record_fields_by_name_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/array-host-test tests/host_array_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/slice-host-test tests/host_slice_test.c build/libziran.a -lm -pthread -ldl
nice -n 10 cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -Werror=frame-larger-than=16384 -MMD -MP -c -o build/obj/tests/bundle_link_test.o tests/bundle_link_test.c
cc -D_GNU_SOURCE -std=c11 -Iinclude -o build/bin/process-host-test tests/process_host_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/startup-graph-test \
tests/startup_graph_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/vm-vec-scope-test \
tests/vm_vec_scope_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/vm-locale-test \
tests/vm_locale_test.c build/libziran.a -lm -pthread -ldl
cc -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Ibuild/compiler-ir -o build/bin/zx-wasm-engine-test \
tests/zx_wasm_engine_test.c build/libziran-vm.a -lm -pthread -ldl
cc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibuild/compiler-scan -Ibuild/compiler-text -Ibuild/compiler-source -Ibuild/compiler-declaration -Ibuild/compiler-enum -Ibuild/compiler-type -Ibuild/compiler-expression -Ibuild/compiler-statement -Ibuild/compiler-proof-kernel -Ibuild/compiler-proof -Ibuild/compiler-bundle -Ibuild/compiler-ir -Ibuild/compiler-law -Ibuild/compiler-services -Ibuild/compiler-link -Ibuild/compiler-parse -o build/bin/bundle-link-test build/obj/tests/bundle_link_test.o build/obj/cmd/zir/zir_overlay.o build/obj/cmd/zir/zir_semantic.o build/obj/cmd/zir/zir_document.o build/obj/cmd/zir/zir_sha256.o build/obj/cmd/zir/zir_context.o build/obj/cmd/zir/zir_memory.o build/obj/cmd/zir/zir_storage.o build/obj/cmd/zir/zir.o build/obj/cmd/zir/zir_asm.o build/obj/cmd/zir/zir_enum.o build/obj/cmd/zir/zir_type.o build/obj/cmd/zir/zir_text.o build/obj/cmd/zir/zir_native.o build/obj/cmd/zir/zir_simd.o build/obj/cmd/zir/zir_body.o build/obj/cmd/zir/zir_token.o build/obj/cmd/zir/zir_cleanup.o build/obj/cmd/zir/zir_expr.o build/obj/cmd/zir/zir_borrow.o build/obj/cmd/zir/zir_law.o build/obj/cmd/zir/zir_serial.o build/obj/cmd/zir/zir_load.o build/obj/cmd/zir/zir_packages.o build/obj/cmd/zir/zir_diagnostic.o build/obj/cmd/zir/zir_profile.o build/obj/cmd/zir/zir_files.o build/obj/cmd/zir/zir_services.o build/obj/compiler-scan.o build/obj/compiler-text.o build/obj/compiler-source.o build/obj/compiler-declaration.o build/obj/compiler-enum.o build/obj/compiler-type.o build/obj/compiler-expression.o build/obj/compiler-statement.o build/obj/compiler-proof-kernel.o build/obj/compiler-proof.o build/obj/compiler-ir.o build/obj/compiler-law.o build/obj/compiler-services.o build/obj/compiler-link.o build/obj/check.o build/obj/parse.o build/obj/emit.o build/obj/compiler-parse.o build/obj/cmd/zir/zir_bundle.o build/obj/cmd/zir/zir_bundle_assets.o build/obj/compiler-bundle.o build/obj/vm.o -lm -pthread -ldl
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/startup-graph-test
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/zx-wasm-engine-test
scalar.zi:2:1: the wasm provider rejected the lowered module
zx-wasm-engine-test: seam, provider handoff and fallback verified
python3 tests/run_check.py --bin-dir build/bin --jobs 16 \
Running 522 checks with 16 jobs (0 reused)
PASS bundle-link-test (0.0s)
PASS api_discovery.sh (0.1s)
PASS zx_native_perf_regression.sh (0.2s)
PASS aggregate_view_lifetime.sh (0.3s)
PASS asm_tinycc_encoding.sh (0.2s)
PASS artifact_consumer.sh (0.5s)
bootstrap matches: scan text source declaration enum type expression statement proof_kernel proof bundle ir law services link parse
PASS aggregate_vec_safety.sh (1.0s)
PASS as_conversion.sh (1.1s)
PASS atomic_cli_link.sh (0.2s)
PASS array_result_in_place.sh (1.2s)
PASS asm_routines.sh (1.1s)
PASS body_eligibility.sh (0.1s)
PASS borrow_import_graph.sh (0.1s)
PASS benchmark_harness.sh (0.4s)
PASS assembly.sh (1.6s)
PASS builtin_type_names.sh (0.1s)
PASS build_playground.sh (0.6s)
PASS bundle_assets.sh (0.3s)
PASS bit_builtins.sh (1.2s)
PASS bundle_component.sh (0.2s)
PASS bundle_global_reachability.sh (0.2s)
PASS bundle_host_query.sh (0.2s)
PASS bundle_libraries.sh (0.2s)
PASS borrowed_view_return.sh (1.3s)
PASS bundle_owned_field.sh (0.0s)
FAIL bundle_host_review_abi.sh (0.4s, exit 1)
PASS bundle_memory_host.sh (0.2s)
PASS bundle_verification.sh (0.1s)
PASS assembly_blocks.sh (2.6s)
PASS bundle_step_limit.sh (0.2s)
PASS c_exe_link.sh (0.1s)
PASS bundle_runtime_provider.sh (0.4s)
PASS asm_dct8.sh (3.1s)
PASS c_call.sh (0.3s)
PASS c_reexport_type_header.sh (0.3s)
PASS bundle_partial_modules.sh (0.7s)
PASS c_reexport_alias.sh (0.3s)
PASS c99_target.sh (0.5s)
PASS c_warning_free_logic.sh (0.1s)
PASS assembly_features.sh (3.0s)
PASS c_module_init.sh (0.4s)
PASS c_spelling.sh (0.3s)
PASS callback_record_layout.sh (0.1s)
PASS callback_array_parameters.sh (0.1s)
PASS call_site_inlining.sh (0.2s)
PASS callback_table_layout.sh (0.1s)
PASS callback_type_order.sh (0.2s)
PASS capabilities.sh (0.2s)
PASS call_order.sh (0.4s)
PASS float_integer_casts.sh (4.1s)
PASS c_warnings.sh (1.0s)
PASS caller_location.sh (0.8s)
PASS cli_defines.sh (0.8s)
PASS compile_commands.sh (0.1s)
PASS calendar.sh (1.7s)
PASS char.sh (1.3s)
PASS cli_help.sh (0.9s)
PASS compact_branches.sh (0.9s)
PASS checked_integer_ops.sh (1.6s)
PASS compile_ifx.sh (0.5s)
PASS compile_run_text.sh (0.4s)
PASS check_runner.sh (1.9s)
PASS compile_time.sh (0.7s)
PASS compile_values.sh (0.8s)
PASS call_ranges.sh (2.9s)
PASS compiler_profile.sh (0.1s)
FAIL compiler_profile_portable.sh (1.0s, exit 1)
PASS compiler_enum.sh (1.8s)
PASS compile_if_syntax.sh (2.9s)
FAIL compiler_files_portable.sh (1.5s, exit 1)
PASS compiler_bundle.sh (2.4s)
PASS compiler_expression.sh (2.0s)
PASS authoring_workflows.sh (7.1s)
PASS compiler_scan.sh (1.6s)
PASS compound_order.sh (0.6s)
PASS compiler_proof_kernel.sh (2.6s)
PASS compiler_type.sh (2.2s)
PASS constant_time.sh (0.0s)
PASS compiler_text.sh (2.2s)
PASS compiler_statement.sh (2.7s)
PASS cross_target_ui_shapes.sh (0.5s)
PASS constant_names.sh (1.1s)
PASS date_time.sh (0.1s)
PASS compiler_source.sh (4.0s)
PASS cross_module_inline.sh (1.4s)
PASS compiler_declaration.sh (6.2s)
PASS constant_tables.sh (2.0s)
PASS default_bounds.sh (0.3s)
PASS deep_nesting.sh (0.5s)
PASS data_scope_using.sh (1.5s)
FAIL date_time_linux.sh (1.5s, exit 1)
PASS date_parse.sh (1.6s)
PASS diagnostic_android.sh (0.3s)
PASS diagnostic_details.sh (0.1s)
PASS diagnostic_bounds.sh (0.1s)
PASS diagnostic_metadata.sh (0.1s)
PASS defined_predicate.sh (0.6s)
PASS defer_block.sh (0.7s)
PASS diagnostic_format.sh (0.4s)
PASS default_arguments.sh (1.2s)
PASS enum_cast.sh (0.3s)
PASS empty_aggregate_lifetime.sh (0.8s)
PASS division.sh (1.0s)
PASS entry_dead_code.sh (0.7s)
PASS environment_native.sh (0.3s)
PASS enum_zero_arrays.sh (0.7s)
PASS exe_build.sh (0.3s)
PASS explain.sh (0.2s)
PASS ffi_header_import.sh (0.0s)
PASS directory_entry.sh (2.1s)
PASS emit_changed_module.sh (2.0s)
PASS enum_flags.sh (1.8s)
PASS features.sh (1.1s)
PASS definite_initialization.sh (3.2s)
FAIL compiler_kernel_benchmarks.sh (15.5s, exit 1)
PASS large_array_literals.sh (15.6s)
PASS file_new.sh (0.4s)
PASS file_copy_new.sh (0.9s)
PASS file_portable.sh (0.4s)
PASS foreign_keywords.sh (0.2s)
PASS file_read_into.sh (0.7s)
PASS file_link.sh (1.4s)
PASS for_range.sh (0.9s)
PASS field_guard_ranges.sh (2.1s)
PASS foreign_value_names.sh (0.5s)
PASS formatter_parallel.sh (0.1s)
PASS foreign_reads.sh (0.9s)
PASS for_collection.sh (1.5s)
PASS fuzz_regressions.sh (0.1s)
PASS format_builder.sh (1.2s)
PASS file_scope.sh (1.8s)
FAIL zx_web_lifecycle.sh (17.5s, exit 1)
PASS forward_load_conditions.sh (1.2s)
PASS forward_import_conditions.sh (1.2s)
PASS forward_type_conditions.sh (1.4s)
PASS generic_parameters.sh (0.7s)
PASS compile_run.sh (13.1s)
PASS generic_record.sh (0.7s)
PASS formatter.sh (2.0s)
PASS generic_procedure.sh (0.9s)
PASS global_string_output.sh (0.0s)
PASS generic_slice_parameter.sh (1.1s)
PASS file_type_of.sh (3.8s)
PASS global_owned_storage.sh (0.9s)
PASS global_names.sh (1.3s)
PASS go_anonymous_records.sh (0.9s)
PASS generic_record_imports.sh (1.6s)
PASS global_slots.sh (1.4s)
PASS examples.sh (6.4s)
PASS generic_array_parameter.sh (3.1s)
PASS go_conditional_widening.sh (0.3s)
PASS generic_multiple_results.sh (3.0s)
PASS go_constant_strings.sh (0.3s)
PASS go_export_roots.sh (0.3s)
PASS go_field_tags.sh (0.6s)
FAIL compiler_runtime_windows.sh (14.5s, exit 1)
PASS go_callback_type_owners.sh (2.6s)
PASS go_fields.sh (1.1s)
PASS go_assert_spawn.sh (3.1s)
PASS go_bind.sh (3.5s)
PASS go_foreign_types.sh (0.7s)
PASS go_error_values.sh (2.8s)
PASS go_auth_primitives.sh (3.8s)
PASS go_defer.sh (3.4s)
PASS go_maps.sh (0.6s)
PASS go_direct_assembly.sh (4.2s)
PASS go_file_json.sh (2.7s)
PASS go_c_headers.sh (5.2s)
PASS go_output_stream.sh (0.5s)
PASS go_package.sh (0.3s)
PASS go_http_client.sh (3.3s)
PASS go_http_io.sh (3.2s)
PASS generic_assembly.sh (8.5s)
PASS go_methods.sh (2.7s)
PASS go_many_parameters.sh (2.9s)
PASS go_results.sh (1.1s)
PASS go_native_values.sh (2.6s)
PASS go_string_pointers.sh (0.5s)
PASS go_variadic.sh (0.6s)
PASS guide.sh (0.0s)
PASS gpu.sh (0.4s)
PASS hash_comments.sh (0.1s)
PASS gzip.sh (0.3s)
PASS heap_new.sh (0.4s)
PASS go_pointer_arrays.sh (2.5s)
FAIL go_package_init.sh (2.8s, exit 1)
PASS gpu_offload.sh (1.5s)
PASS hmac_sha256_go.sh (0.4s)
PASS host_export_link.sh (0.1s)
PASS host_capability.sh (0.1s)
PASS guarded_index_ranges.sh (1.5s)
PASS host_arrays.sh (0.4s)
PASS hash_map.sh (1.2s)
PASS host_module_binding.sh (0.3s)
PASS go_slice_nil.sh (2.5s)
PASS go_select.sh (2.7s)
PASS host_bindings.sh (0.7s)
PASS host_ziran_binding.sh (0.5s)
PASS imported_callback_cast.sh (0.1s)
PASS go_sql_time.sh (2.7s)
PASS go_method_exports.sh (5.5s)
PASS if_then.sh (0.7s)
PASS implicit_widening.sh (0.5s)
PASS imported_global_type_owner.sh (0.1s)
PASS import_string.sh (0.6s)
PASS imported_constant_names.sh (0.6s)
PASS imported_enum_names.sh (0.6s)
PASS imported_global_names.sh (0.6s)
PASS imported_field_type_alias.sh (0.7s)
PASS imported_native_types.sh (0.2s)
PASS imported_map_slices.sh (0.4s)
PASS indexed_field_read.sh (0.1s)
PASS host_slices.sh (1.8s)
PASS imported_value_names.sh (0.5s)
PASS go_named_exports.sh (6.3s)
PASS imported_type_names.sh (0.7s)
PASS input_in_module_path.sh (0.1s)
PASS imported_typed_constants.sh (0.9s)
PASS inferred_int.sh (0.5s)
PASS inferred_record.sh (0.5s)
PASS install_user.sh (0.5s)
PASS integer_literal_spellings.sh (0.5s)
PASS kept_text.sh (0.1s)
PASS jai_syntax.sh (0.8s)
PASS json_array_reuse.sh (1.1s)
PASS json_string_value.sh (0.9s)
PASS json_scan.sh (1.5s)
PASS large_enums.sh (0.5s)
PASS large_record.sh (0.1s)
PASS language_contract.sh (1.0s)
PASS law_cases.sh (0.0s)
PASS law_floats.sh (0.0s)
PASS law_records.sh (0.1s)
PASS lint_casts.sh (0.0s)
PASS lint_characters.sh (0.0s)
PASS lint_flags.sh (0.0s)
PASS law_integers.sh (0.3s)
PASS laws.sh (0.5s)
PASS imported_aggregate_constants.sh (4.0s)
PASS local_shadows_import.sh (0.2s)
PASS local_owned_fields.sh (0.5s)
PASS local_procedures.sh (0.4s)
PASS long_string_constants.sh (0.2s)
PASS large_constant_globals.sh (1.7s)
PASS macro_temporaries.sh (0.1s)
PASS imported_globals.sh (4.4s)
PASS mapped_file_linux.sh (0.2s)
PASS long_literals.sh (0.7s)
PASS go_assembly.sh (14.1s)
PASS math_float64.sh (0.3s)
PASS imported_host_slices.sh (5.0s)
FAIL image_resize_fallible.sh (5.9s, exit 1)
PASS module_symlink.sh (0.1s)
PASS many_functions.sh (1.2s)
PASS module_root_capacity.sh (0.8s)
PASS indirect_record_types.sh (5.1s)
PASS match.sh (1.6s)
PASS module_paths.sh (1.5s)
PASS multiline_param_targets.sh (0.6s)
PASS must_use.sh (0.2s)
PASS mutex_linux.sh (0.2s)
PASS multiple_results.sh (0.6s)
PASS loop_guard_ranges.sh (2.3s)
PASS named_module_paths.sh (0.3s)
PASS named_arguments.sh (0.6s)
PASS named_imports.sh (0.6s)
PASS module_symbol_names.sh (1.7s)
PASS llm_authoring.sh (3.8s)
FAIL native_entry.sh (0.3s, exit 1)
PASS named_generic_dependencies.sh (1.1s)
PASS native_function_value_names.sh (0.7s)
PASS native_loops.sh (0.4s)
PASS module_import_identity.sh (3.0s)
PASS native_nil.sh (0.6s)
PASS native_release.sh (0.4s)
PASS native_object_reuse.sh (0.8s)
PASS native_c_ffi.sh (1.6s)
PASS native_switch.sh (0.4s)
PASS native_operand_order.sh (0.8s)
PASS negative_real_constants.sh (0.2s)
PASS native_threads.sh (0.5s)
PASS native_run.sh (1.0s)
PASS nested_array_assign.sh (0.6s)
FAIL native_workers_windows.sh (0.8s, exit 1)
PASS native_type_value_names.sh (1.1s)
PASS lanczos_isa_bitexact.sh (7.5s)
PASS nested_constant_tables.sh (0.8s)
PASS opaque_text_lifetime.sh (0.1s)
PASS multiline_strings.sh (4.0s)
PASS nested_comments.sh (1.0s)
PASS std_unicode_normalization.sh (38.5s)
PASS nested_lazy_call.sh (0.7s)
PASS operators.sh (0.8s)
PASS overloads.sh (0.8s)
PASS numeric_semantics.sh (1.2s)
PASS numeric_width_matrix.sh (1.1s)
FAIL owned_text.sh (1.0s, exit 1)
PASS package_relative_imports.sh (0.4s)
PASS package_process.sh (0.5s)
PASS parallel_captures.sh (0.1s)
FAIL nested_vec_elements.sh (1.9s, exit 1)
PASS parallel.sh (0.6s)
PASS paren_record_literal.sh (0.0s)
PASS parallel_linux.sh (0.3s)
PASS parser_recovery.sh (0.2s)
PASS owned_text_results.sh (1.6s)
PASS pointer_cast_nested_array.sh (0.1s)
PASS pointer_field_text_lifetime.sh (0.2s)
PASS parallel_results.sh (0.7s)
PASS parallel_slices.sh (0.7s)
PASS pointer_to_array.sh (0.0s)
PASS pointer_subscript.sh (0.1s)
PASS pointer_slot_params.sh (0.1s)
PASS portable_collection.sh (0.0s)
PASS portable_format.sh (0.1s)
PASS package_checkout_concurrency.sh (2.2s)
PASS path.sh (0.8s)
PASS portable_imported_record_slices.sh (0.0s)
PASS native_commands.sh (5.4s)
PASS portable_long_runs.sh (0.1s)
PASS package_darwin.sh (2.1s)
PASS portable_limits.sh (0.3s)
PASS portable_s64.sh (0.0s)
PASS portable_arrays.sh (0.8s)
PASS primitive_types.sh (0.0s)
PASS pointer_member_check.sh (1.2s)
PASS portable_pointers.sh (0.7s)
PASS portable_strings.sh (0.7s)
PASS portable_globals.sh (1.2s)
PASS portable_host_records.sh (1.2s)
PASS private_field_type_header.sh (0.1s)
PASS private_type_application.sh (0.1s)
PASS private_type_application_load.sh (0.2s)
FAIL portable_entry.sh (1.6s, exit 1)
PASS package_map_concurrency.sh (3.0s)
PASS print.sh (0.9s)
PASS print_enums.sh (0.9s)
PASS private_module_imports.sh (0.5s)
PASS native_build_cache.sh (7.2s)
PASS portable_slices.sh (1.3s)
FAIL process_channel_linux.sh (0.3s, exit 2)
PASS process.sh (0.3s)
PASS native_runtime_headers.sh (5.9s)
PASS queue.sh (0.1s)
PASS random_linux.sh (0.1s)
PASS qualified_slot_record_types.sh (0.2s)
PASS proofs.sh (0.4s)
PASS print_records.sh (1.0s)
PASS record_fields_by_name.sh (0.0s)
PASS record_slice_header.sh (0.0s)
PASS record_abi_metadata.sh (0.1s)
PASS range_loop_one_exit.sh (0.3s)
PASS record_pointer_layout.sh (0.2s)
PASS rejection_helper.sh (0.0s)
FAIL program_export.sh (0.7s, exit 1)
PASS procedure_inlining.sh (1.2s)
PASS record_update_stack.sh (0.5s)
PASS recursive_slice_records.sh (0.7s)
PASS range_types.sh (0.8s)
PASS resizable_arrays.sh (0.9s)
PASS qualified_pointer_import.sh (1.3s)
PASS return_paths.sh (0.8s)
PASS saved_ir_call_argument_cast.sh (0.1s)
PASS saved_ir_blocks.sh (0.4s)
PASS procedure_result_reachability.sh (1.8s)
PASS runtime_local_names.sh (0.9s)
PASS safe_inference.sh (0.8s)
PASS sequence_header.sh (0.5s)
PASS signature_spacing.sh (0.0s)
PASS semantic_edit.sh (0.6s)
PASS native_build_parallel.sh (9.2s)
PASS process_channel_wait_linux.sh (2.2s)
PASS shared_foreign_bindings.sh (0.4s)
PASS sha256.sh (0.6s)
PASS proven_index_ranges.sh (2.2s)
PASS shadowed_binding_reads_outer.sh (0.7s)
PASS runtime_globals.sh (1.5s)
FAIL site_targets.sh (0.1s, exit 1)
PASS semicolon_statements.sh (1.1s)
PASS shared_type_application.sh (0.7s)
PASS reexport_import.sh (2.2s)
PASS slot_field_values.sh (0.1s)
PASS slot_type_collision.sh (0.1s)
FAIL socket_linux.sh (0.1s, exit 1)
PASS size_of.sh (0.5s)
PASS slots.sh (0.6s)
PASS sort.sh (0.6s)
PASS stale_output.sh (0.2s)
PASS slice_field_bound.sh (0.9s)
PASS standalone_std.sh (0.1s)
PASS std_binary.sh (0.5s)
PASS source_line.sh (1.1s)
PASS std_file_tree_wasm32.sh (0.0s)
PASS std_file_darwin.sh (0.5s)
PASS simd_run_ranges.sh (2.1s)
PASS std_foreign_size_types.sh (0.1s)
FAIL std_file_windows.sh (0.3s, exit 159)
FAIL site_pages.sh (2.2s, exit 1)
PASS std_image_composite_at.sh (0.4s)
FAIL std_import_spelling_identity.sh (0.2s, exit 2)
PASS std_image_transpose.sh (0.4s)
PASS simd_go.sh (2.9s)
PASS std_number_text.sh (0.0s)
PASS std_file_tree_linux.sh (1.0s)
PASS std_text.sh (0.0s)
PASS std_native_linux.sh (0.2s)
PASS std_image_linux.sh (0.9s)
PASS std_tools_linux.sh (0.5s)
PASS stored_slots.sh (0.5s)
PASS stored_type_diagnostic.sh (0.0s)
FAIL std_time_windows.sh (1.1s, exit 159)
PASS string_ranges.sh (0.3s)
PASS structure_first_error.sh (0.0s)
PASS simd_std_imports.sh (4.4s)
PASS std_utf8.sh (1.4s)
PASS symbol_lookup.sh (0.5s)
PASS text_call_mutation.sh (0.3s)
PASS target_diagnostics.sh (0.7s)
PASS string_storage.sh (1.3s)
PASS text_condition_arms.sh (0.6s)
PASS text_hex_decode.sh (0.4s)
PASS standalone.sh (4.4s)
PASS text_procedure_type_reads.sh (0.5s)
PASS text_format_arguments.sh (1.1s)
PASS std_grapheme.sh (4.1s)
PASS text_reassigned_local.sh (0.6s)
PASS text_reads_field_paths.sh (0.7s)
PASS std_text_results.sh (3.3s)
PASS text_stream.sh (0.2s)
PASS text_view_mutation.sh (0.2s)
PASS text_view.sh (0.5s)
PASS thread_android.sh (0.0s)
PASS text_string_arrays.sh (0.6s)
PASS text_without_vec_import.sh (0.6s)
PASS timer_linux.sh (0.1s)
PASS this.sh (0.5s)
PASS thread_linux.sh (0.3s)
PASS tool_diagnostics.sh (0.2s)
PASS transport_view.sh (0.2s)
PASS text_scoped_producers.sh (1.3s)
PASS text_scoped_arguments.sh (1.7s)
PASS unchanged_outputs.sh (0.0s)
FAIL std_json_document.sh (4.8s, exit 1)
PASS unterminated_declarations.sh (0.0s)
PASS unreachable.sh (0.6s)
PASS unary_precedence.sh (0.6s)
PASS union.sh (0.8s)
PASS update.sh (0.4s)
PASS unicode_data.sh (1.0s)
PASS using.sh (0.7s)
PASS using_import.sh (0.8s)
PASS using_pointer.sh (0.6s)
PASS variadic_foreigns.sh (0.1s)
PASS using_modifiers.sh (0.7s)
PASS unused_enum_call.sh (1.5s)
PASS using_struct.sh (0.7s)
FAIL thread_windows.sh (2.5s, exit 1)
PASS utf8_copy_valid.sh (0.5s)
PASS vec_move_expression.sh (0.1s)
PASS vec_resize_stack.sh (0.1s)
PASS version.sh (0.0s)
PASS vec_auto_drop.sh (0.5s)
PASS vec_slice_global.sh (0.2s)
FAIL vec_field_loops.sh (0.5s, exit 1)
PASS vec.sh (0.9s)
PASS vm_call_metadata.sh (0.4s)
PASS vm_builtin_dispatch.sh (0.5s)
PASS text_std_module_path.sh (4.1s)
PASS toml_document.sh (3.4s)
PASS vm_binary_dispatch.sh (1.3s)
PASS vm_deep_marking.sh (1.3s)
PASS vm_locale.sh (0.1s)
FAIL vec_capacity.sh (2.1s, exit 1)
PASS host_strings.sh (27.8s)
PASS vm_local_reads.sh (0.6s)
PASS vm_profile.sh (0.1s)
PASS vm_nested_collection.sh (0.3s)
PASS vm_leaf_eval.sh (1.9s)
PASS vm_concurrent_instances.sh (2.3s)
PASS vm_return_storage.sh (0.3s)
PASS vm_inline_records.sh (2.3s)
PASS vm_literal_cache.sh (2.1s)
PASS vm_packed_arrays.sh (1.3s)
PASS vm_record_layout.sh (1.2s)
PASS vm_vec_scope.sh (0.0s)
PASS vm_retirement.sh (1.3s)
PASS vm_function_plans.sh (2.9s)
PASS wasm_cc.sh (0.0s)
PASS vm_u64_enums.sh (0.5s)
PASS vm_storage_reads.sh (0.6s)
PASS wasm_slices.sh (0.1s)
PASS vm_metadata_cache.sh (2.0s)
PASS vm_scalar_coercion.sh (1.3s)
PASS vm_scalar_plans.sh (1.3s)
PASS vm_value_payloads.sh (1.2s)
PASS wide_comparisons.sh (0.9s)
PASS vm_vec_type_cache.sh (1.4s)
PASS vorbis_linux.sh (1.3s)
PASS wide_constants.sh (1.1s)
PASS zip.sh (0.5s)
PASS zip_file_linux.sh (0.4s)
PASS zx_native_asm.sh (0.0s)
PASS widening_cast.sh (1.1s)
PASS zir_api.sh (0.4s)
PASS zx_native_cache.sh (0.1s)
PASS zx_native_parallel.sh (0.2s)
PASS zx_native_invocation_regression.sh (0.3s)
PASS zx_portable_write.sh (0.2s)
PASS wasm_enums.sh (1.8s)
PASS web_bridge.sh (1.8s)
PASS zero_arrays.sh (1.6s)
PASS zx_wasm.sh (1.1s)
PASS simd_native.sh (16.3s)
PASS simd.sh (17.8s)
PASS zstd_go.sh (4.9s)
PASS simd_target.sh (20.3s)
PASS packages.sh (65.0s)
FAIL zx_wasm_web.sh (9.4s, exit 1)
FAIL zx_linked_web.sh (10.1s, exit 1)
PASS std_unicode.sh (69.3s)
PASS simd_tier_units.sh (28.2s)
PASS std_float_text.sh (107.3s)
=== FAIL bundle_host_review_abi.sh (exit 1)
Bundle host ABI layout, calls and narrowing passed (64-bit size_t)
Traceback (most recent call last):
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 630, in <module>
sys.exit(main(sys.argv))
~~~~^^^^^^^^^^
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 377, in main
return link.run(linker_args)
~~~~~~~~^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 3209, in run
js_info = get_js_sym_info()
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 245, in get_js_sym_info
file_content = emscripten.get_cached_file('symbol_lists', f'{content_hash}.json', generate_json, cache_limit=500)
File "/mnt/storage/emsdk/upstream/emscripten/tools/emscripten.py", line 317, in get_cached_file
with filelock.FileLock(cache_file + '.lock'):
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 330, in __enter__
self.acquire()
~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 278, in acquire
self._acquire()
~~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 391, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 30] Read-only file system: '/mnt/storage/emsdk/upstream/emscripten/cache/symbol_lists/a3d7372b73ace2ebeff271a101bbdcc27ce1661f.json.lock'
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/bundle_host_review_abi.sh.log
=== FAIL compiler_files_portable.sh (exit 1)
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/compiler_files_portable.sh.log
=== FAIL compiler_kernel_benchmarks.sh (exit 1)
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/bench/codec_kernels.py", line 808, in <module>
main()
~~~~^^
File "/mnt/storage/Projects/ziranlang/ziran/bench/codec_kernels.py", line 601, in main
raise AssertionError(f'{form} {target}32 native field access or size_of failed: {diagnostic}')
AssertionError: source go32 native field access or size_of failed:
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/compiler_kernel_benchmarks.sh.log
=== FAIL compiler_profile_portable.sh (exit 1)
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/compiler_profile_portable.sh.log
=== FAIL compiler_runtime_windows.sh (exit 1)
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_simd.o cmd/zir/zir_emit_simd.c
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_simd_go.o cmd/zir/zir_emit_simd_go.c
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm.o cmd/zir/zir_vm.c
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_verify.o cmd/zir/zir_vm_verify.c
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_eval.o cmd/zir/zir_vm_eval.c
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_run.o cmd/zir/zir_vm_run.c
nice -n 10 x86_64-w64-mingw32-gcc -O2 -fPIC -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=discarded-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_simd.o cmd/zir/zir_vm_simd.c
x86_64-w64-mingw32-gcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/check.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_value.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_expr.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_statement.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_function.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_link.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_program.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_simd.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_check_text.o && x86_64-w64-mingw32-objcopy --localize-hidden --localize-symbols=/mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/private-symbols/check.txt /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/check.o
x86_64-w64-mingw32-gcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/parse.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse_declaration.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse_eval.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse_typed.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse_condition.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse_discover.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_parse_source.o && x86_64-w64-mingw32-objcopy --localize-hidden --localize-symbols=/mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/private-symbols/parse.txt /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/parse.o
x86_64-w64-mingw32-gcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/emit.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_value.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_call.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_expr.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_statement.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_gpu.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_range.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_simd.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_emit_simd_go.o && x86_64-w64-mingw32-objcopy --localize-hidden --localize-symbols=/mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/private-symbols/emit.txt /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/emit.o
x86_64-w64-mingw32-gcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/vm.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_verify.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_eval.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_run.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_vm_simd.o && x86_64-w64-mingw32-objcopy --localize-hidden --localize-symbols=/mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/private-symbols/vm.txt /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/vm.o
rm -f /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/libziran.a
x86_64-w64-mingw32-ar rcs /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/libziran.a /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_overlay.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_semantic.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_document.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_sha256.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_context.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_memory.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_storage.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_asm.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_enum.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_type.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_text.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_native.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_simd.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_body.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_token.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_cleanup.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_expr.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_borrow.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_law.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_serial.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_load.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_packages.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_diagnostic.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_profile.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_files.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_services.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_bundle.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_bundle_assets.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/cmd/zir/zir_host.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-bundle.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-scan.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-text.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-source.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-declaration.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-enum.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-type.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-expression.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-statement.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-proof-kernel.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-proof.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-ir.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-law.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-services.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/compiler-link.o /mnt/storage/Projects/ziranlang/ziran/build/compiler-runtime-windows.JkAgxo/build/obj/check.o /mnt/storage/ProjectsLine truncated
make[1]: Leaving directory '/mnt/storage/Projects/ziranlang/ziran'
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/compiler_runtime_windows.sh.log
=== FAIL date_time_linux.sh (exit 1)
Traceback (most recent call last):
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 630, in <module>
sys.exit(main(sys.argv))
~~~~^^^^^^^^^^
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 377, in main
return link.run(linker_args)
~~~~~~~~^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 3209, in run
js_info = get_js_sym_info()
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 245, in get_js_sym_info
file_content = emscripten.get_cached_file('symbol_lists', f'{content_hash}.json', generate_json, cache_limit=500)
File "/mnt/storage/emsdk/upstream/emscripten/tools/emscripten.py", line 317, in get_cached_file
with filelock.FileLock(cache_file + '.lock'):
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 330, in __enter__
self.acquire()
~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 278, in acquire
self._acquire()
~~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 391, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 30] Read-only file system: '/mnt/storage/emsdk/upstream/emscripten/cache/symbol_lists/3d5f1458c4efbf54d49618ba415e02d7d3f6ef44.json.lock'
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/date_time_linux.sh.log
=== FAIL go_package_init.sh (exit 1)
fatal: not a git repository (or any of the parent directories): .git
# runtime/race
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/cgo
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/race
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/race
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# runtime/race
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
calls.go:4:8: open /home/wao/.cache/go-build/6e/6efed2f7f396ba5350a28be37cba22853f55ce9535714d85a77a5154f9ee916d-d: read-only file system
main.go:2:8: open /home/wao/.cache/go-build/54/54bf3ba3f07a237b85dc69de475a1613c1eacf01080abd3e9c2c99c3f348c39e-a: read-only file system
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/go_package_init.sh.log
=== FAIL image_resize_fallible.sh (exit 1)
bicubic native: 1000 repeated resizes, 29 allocation faults + immediate recovery; live=0 bytes=0 peak=18464
bicubic native: 1000 repeated resizes, 29 allocation faults + immediate recovery; live=0 bytes=0 peak=18464
==112878==LeakSanitizer has encountered a fatal error.
==112878==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==112878==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/image_resize_fallible.sh.log
=== FAIL native_entry.sh (exit 1)
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 143, in <module>
run([web, *flags, '-sENVIRONMENT=node', '-sWASM_ASYNC_COMPILATION=0',
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'-sEXIT_RUNTIME=1', generated, '-o', out/'web.js'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 21, in run
assert result.returncode == answer, (command, result.returncode, result.stdout, result.stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: (['/home/wao/emsdk/upstream/emscripten/emcc', '-std=c11', '-O2', '-Werror=main', '-Werror=incompatible-pointer-types', '-I/mnt/storage/Projects/ziranlang/ziran/include', '-I/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/native_entry.sh.cf1e3_4q/tmp.076OCM1q3N/unsigned/c-source', '-sENVIRONMENT=node', '-sWASM_ASYNC_COMPILATION=0', '-sEXIT_RUNTIME=1', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/native_entry.sh.cf1e3_4q/tmp.076OCM1q3N/unsigned/c-source/unsigned.c'), '-o', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/native_entry.sh.cf1e3_4q/tmp.076OCM1q3N/unsigned/c-source/web.js')], 1, '', 'Traceback (most recent call last):\n File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 630, in <module>\n sys.exit(main(sys.argv))\n ~~~~^^^^^^^^^^\n File "/usr/lib/python3.13/contextlib.py", line 85, in inner\n return func(*args, **kwds)\n File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 377, in main\n return link.run(linker_args)\n ~~~~~~~~^^^^^^^^^^^^^\n File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 3209, in run\n js_info = get_js_sym_info()\n File "/usr/lib/python3.13/contextlib.py", line 85, in inner\n return func(*args, **kwds)\n File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 245, in get_js_sym_info\n file_content = emscripten.get_cached_file(\'symbol_lists\', f\'{content_hash}.json\', generate_json, cache_limit=500)\n File "/mnt/storage/emsdk/upstream/emscripten/tools/emscripten.py", line 317, in get_cached_file\n with filelock.FileLock(cache_file + \'.lock\'):\n ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^\n File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 330, in __enter__\n self.acquire()\n ~~~~~~~~~~~~^^\n File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 278, in acquire\n self._acquire()\n ~~~~~~~~~~~~~^^\n File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 391, in _acquire\n fd = os.open(self._lock_file, open_mode)\nOSError: [Errno 30] Read-only file system: \'/mnt/storage/emsdk/upstream/emscripten/cache/symbol_lists/6c772545e32335e730dc13333c49f3647aa03b33.json.lock\'\n')
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/native_entry.sh.log
=== FAIL native_workers_windows.sh (exit 1)
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/native_workers_windows.sh.log
=== FAIL nested_vec_elements.sh (exit 1)
==129886==LeakSanitizer has encountered a fatal error.
==129886==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==129886==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/nested_vec_elements.sh.log
=== FAIL owned_text.sh (exit 1)
==128755==LeakSanitizer has encountered a fatal error.
==128755==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==128755==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/owned_text.sh.log
=== FAIL portable_entry.sh (exit 1)
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 38, in <module>
actual = run(ziran, 'run', bundle).stdout
~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 30, in run
return subprocess.run(list(map(str, args)), check=True, capture_output=True, text=True, **kwargs)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/mnt/storage/Projects/ziranlang/ziran/build/bin/ziran', 'run', '/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/portable_entry.sh.kajtprm7/tmp.y6kVY0zHyX/true-source.zx']' returned non-zero exit status 1.
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/portable_entry.sh.log
=== FAIL process_channel_linux.sh (exit 2)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/process_channel_linux.sh.log
=== FAIL program_export.sh (exit 1)
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/program_export.sh.pw7im5eq/tmp.swxhKXVwoH/keyword_main.c: In function ‘main’:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/program_export.sh.pw7im5eq/tmp.swxhKXVwoH/keyword_main.c:4:45: error: implicit declaration of function ‘ziran_keyword_class_0’; did you mean ‘ziran_keyword_switch_0’? [-Wimplicit-function-declaration]
4 | ziran_keyword_switch_0() == 1 && ziran_keyword_class_0() == 2
| ^~~~~~~~~~~~~~~~~~~~~
| ziran_keyword_switch_0
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/program_export.sh.log
=== FAIL site_pages.sh (exit 1)
cannot tell whether https://github.com/ziranlang/audio is public: <urlopen error [Errno -3] Temporary failure in name resolution>
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/site_pages.sh.log
=== FAIL site_targets.sh (exit 1)
Stale harness: scripts/site_targets.py
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/site_targets.sh.log
=== FAIL socket_linux.sh (exit 1)
loopback test server did not start
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/socket_linux.sh.log
=== FAIL std_file_windows.sh (exit 159)
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/std_file_windows.sh.log
=== FAIL std_import_spelling_identity.sh (exit 2)
ziran: cannot create the script output directory
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/std_import_spelling_identity.sh.log
=== FAIL std_json_document.sh (exit 1)
==160774==LeakSanitizer has encountered a fatal error.
==160774==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==160774==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/std_json_document.sh.log
=== FAIL std_time_windows.sh (exit 159)
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/std_time_windows.sh.log
=== FAIL thread_windows.sh (exit 1)
In file included from /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_linux_test.h:7,
from /mnt/storage/Projects/ziranlang/ziran/tests/thread_windows_completion_test.c:7:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_windows.h:61:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadClose’ defined but not used [-Wunused-function]
61 | zir_f_a88db981e69f240f_WindowsThreadClose(void* handle)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_windows.h:48:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadWait’ defined but not used [-Wunused-function]
48 | zir_f_a88db981e69f240f_WindowsThreadWait(void* handle, uint32_t milliseconds)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_windows.h:34:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadCreate’ defined but not used [-Wunused-function]
34 | zir_f_a88db981e69f240f_WindowsThreadCreate(void* security, uint32_t stack_size, WindowsThreadEntry entry, void* argument, uint32_t flags, uint32_t* id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_linux_test.h:7,
from /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_linux_test.c:5:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_windows.h:61:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadClose’ defined but not used [-Wunused-function]
61 | zir_f_a88db981e69f240f_WindowsThreadClose(void* handle)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_windows.h:48:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadWait’ defined but not used [-Wunused-function]
48 | zir_f_a88db981e69f240f_WindowsThreadWait(void* handle, uint32_t milliseconds)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/source-c/thread_windows.h:34:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadCreate’ defined but not used [-Wunused-function]
34 | zir_f_a88db981e69f240f_WindowsThreadCreate(void* security, uint32_t stack_size, WindowsThreadEntry entry, void* argument, uint32_t flags, uint32_t* id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_linux_test.h:7,
from /mnt/storage/Projects/ziranlang/ziran/tests/thread_windows_completion_test.c:7:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_windows.h:61:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadClose’ defined but not used [-Wunused-function]
61 | zir_f_a88db981e69f240f_WindowsThreadClose(void* handle)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_windows.h:48:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadWait’ defined but not used [-Wunused-function]
48 | zir_f_a88db981e69f240f_WindowsThreadWait(void* handle, uint32_t milliseconds)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_windows.h:34:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadCreate’ defined but not used [-Wunused-function]
34 | zir_f_a88db981e69f240f_WindowsThreadCreate(void* security, uint32_t stack_size, WindowsThreadEntry entry, void* argument, uint32_t flags, uint32_t* id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_linux_test.h:7,
from /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_linux_test.c:5:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_windows.h:61:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadClose’ defined but not used [-Wunused-function]
61 | zir_f_a88db981e69f240f_WindowsThreadClose(void* handle)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_windows.h:48:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadWait’ defined but not used [-Wunused-function]
48 | zir_f_a88db981e69f240f_WindowsThreadWait(void* handle, uint32_t milliseconds)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.kdv27vee/thread_windows.sh.81hk5zi9/tmp.AGpM9RhG14/saved-c/thread_windows.h:34:1: warning: ‘zir_f_a88db981e69f240f_WindowsThreadCreate’ defined but not used [-Wunused-function]
34 | zir_f_a88db981e69f240f_WindowsThreadCreate(void* security, uint32_t stack_size, WindowsThreadEntry entry, void* argument, uint32_t flags, uint32_t* id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bad system call
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/thread_windows.sh.log
=== FAIL vec_capacity.sh (exit 1)
C 32-bit unavailable: missing bits/libc-header-start.h: No such file or directory
==167662==LeakSanitizer has encountered a fatal error.
==167662==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==167662==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/vec_capacity.sh.log
=== FAIL vec_field_loops.sh (exit 1)
1000 rounds: 0 allocations left
==166511==LeakSanitizer has encountered a fatal error.
==166511==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==166511==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/vec_field_loops.sh.log
=== FAIL zx_linked_web.sh (exit 1)
Traceback (most recent call last):
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 630, in <module>
sys.exit(main(sys.argv))
~~~~^^^^^^^^^^
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 377, in main
return link.run(linker_args)
~~~~~~~~^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 3209, in run
js_info = get_js_sym_info()
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 245, in get_js_sym_info
file_content = emscripten.get_cached_file('symbol_lists', f'{content_hash}.json', generate_json, cache_limit=500)
File "/mnt/storage/emsdk/upstream/emscripten/tools/emscripten.py", line 317, in get_cached_file
with filelock.FileLock(cache_file + '.lock'):
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 330, in __enter__
self.acquire()
~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 278, in acquire
self._acquire()
~~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 391, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 30] Read-only file system: '/mnt/storage/emsdk/upstream/emscripten/cache/symbol_lists/7137318cfd36b814ff16b8252b77959d4b56ab1f.json.lock'
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/zx_linked_web.sh.log
=== FAIL zx_wasm_web.sh (exit 1)
| ^~~~~~~~~~~~~~~~~~~~
/mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/private/emit.h:40:16: note: expanded from macro 'format'
40 | #define format private_emit_format
| ^
1 warning generated.
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -include /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/private/vm.h -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm.o cmd/zir/zir_vm.c
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -include /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/private/vm.h -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_verify.o cmd/zir/zir_vm_verify.c
4 warnings generated.
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -include /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/private/vm.h -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_eval.o cmd/zir/zir_vm_eval.c
cmd/zir/zir_vm_verify.c:357:17: warning: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
357 | size > INT64_MAX) {
| ~~~~ ^ ~~~~~~~~~
cmd/zir/zir_vm_eval.c:1288:17: warning: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
1288 | size > INT64_MAX) {
| ~~~~ ^ ~~~~~~~~~
1 warning generated.
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -include /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/private/vm.h -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_run.o cmd/zir/zir_vm_run.c
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -include /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/private/vm.h -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_simd.o cmd/zir/zir_vm_simd.c
1 warning generated.
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_zx_wasm.o cmd/zir/zir_zx_wasm.c
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_zx_wasm_web.o cmd/zir/zir_zx_wasm_web.c
cmd/zir/zir_zx_wasm_web.c:29:15: warning: empty character constant [-Winvalid-pp-token]
29 | let key = '';
| ^
1 warning generated.
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir-wasm/zir_wasm_lower.o cmd/zir-wasm/zir_wasm_lower.c
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/compiler-parse.o bootstrap/compiler_parse/compiler_parse.c
nice -n 10 /home/wao/emsdk/upstream/emscripten/emcc -O2 -D_GNU_SOURCE -std=c11 -Iinclude -Icmd/zir -Werror=incompatible-pointer-types-discards-qualifiers -Ibootstrap/compiler_scan -Ibootstrap/compiler_text -Ibootstrap/compiler_source -Ibootstrap/compiler_declaration -Ibootstrap/compiler_enum -Ibootstrap/compiler_type -Ibootstrap/compiler_expression -Ibootstrap/compiler_statement -Ibootstrap/compiler_proof_kernel -Ibootstrap/compiler_proof -Ibootstrap/compiler_bundle -Ibootstrap/compiler_ir -Ibootstrap/compiler_law -Ibootstrap/compiler_services -Ibootstrap/compiler_link -Ibootstrap/compiler_parse -Wframe-larger-than=16384 -MMD -MP -c -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/zir_host_vm.o cmd/zir/zir_host.c
/home/wao/emsdk/upstream/emscripten/emcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/check.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_value.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_expr.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_statement.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_function.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_link.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_program.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_simd.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_check_text.o && true --localize-hidden /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/check.o
/home/wao/emsdk/upstream/emscripten/emcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/parse.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse_declaration.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse_eval.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse_typed.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse_condition.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse_discover.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_parse_source.o && true --localize-hidden /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/parse.o
/home/wao/emsdk/upstream/emscripten/emcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/emit.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_value.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_call.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_expr.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_statement.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_gpu.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_range.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_simd.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_emit_simd_go.o && true --localize-hidden /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/emit.o
/home/wao/emsdk/upstream/emscripten/emcc -r -nostdlib -o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/vm.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_verify.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_eval.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_run.o /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/cmd/zir/zir_vm_simd.o && true --localize-hidden /mnt/storage/Projects/ziranlang/ziran/build/tests/zx-wasm-web/lib/obj/vm.o
make[1]: Leaving directory '/mnt/storage/Projects/ziranlang/ziran'
Traceback (most recent call last):
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 630, in <module>
sys.exit(main(sys.argv))
~~~~^^^^^^^^^^
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 377, in main
return link.run(linker_args)
~~~~~~~~^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 3209, in run
js_info = get_js_sym_info()
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 245, in get_js_sym_info
file_content = emscripten.get_cached_file('symbol_lists', f'{content_hash}.json', generate_json, cache_limit=500)
File "/mnt/storage/emsdk/upstream/emscripten/tools/emscripten.py", line 317, in get_cached_file
with filelock.FileLock(cache_file + '.lock'):
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 330, in __enter__
self.acquire()
~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 278, in acquire
self._acquire()
~~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 391, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 30] Read-only file system: '/mnt/storage/emsdk/upstream/emscripten/cache/symbol_lists/948957a91d6ceb367b7c233346e002f8659119a6.json.lock'
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/zx_wasm_web.sh.log
=== FAIL zx_web_lifecycle.sh (exit 1)
Traceback (most recent call last):
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 630, in <module>
sys.exit(main(sys.argv))
~~~~^^^^^^^^^^
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/home/wao/emsdk/upstream/emscripten/emcc.py", line 377, in main
return link.run(linker_args)
~~~~~~~~^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 3209, in run
js_info = get_js_sym_info()
File "/usr/lib/python3.13/contextlib.py", line 85, in inner
return func(*args, **kwds)
File "/mnt/storage/emsdk/upstream/emscripten/tools/link.py", line 245, in get_js_sym_info
file_content = emscripten.get_cached_file('symbol_lists', f'{content_hash}.json', generate_json, cache_limit=500)
File "/mnt/storage/emsdk/upstream/emscripten/tools/emscripten.py", line 317, in get_cached_file
with filelock.FileLock(cache_file + '.lock'):
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 330, in __enter__
self.acquire()
~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 278, in acquire
self._acquire()
~~~~~~~~~~~~~^^
File "/mnt/storage/emsdk/upstream/emscripten/tools/filelock.py", line 391, in _acquire
fd = os.open(self._lock_file, open_mode)
OSError: [Errno 30] Read-only file system: '/mnt/storage/emsdk/upstream/emscripten/cache/symbol_lists/dda21b7a7f71939bbf18fdc6cb2ed4dc3982ddd5.json.lock'
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/zx_web_lifecycle.sh.log
494/522 passed in 107.3s (522 executed, 0 reused): failed bundle_host_review_abi.sh, compiler_files_portable.sh, compiler_kernel_benchmarks.sh, compiler_profile_portable.sh, compiler_runtime_windows.sh, date_time_linux.sh, go_package_init.sh, image_resize_fallible.sh, native_entry.sh, native_workers_windows.sh, nested_vec_elements.sh, owned_text.sh, portable_entry.sh, process_channel_linux.sh, program_export.sh, site_pages.sh, site_targets.sh, socket_linux.sh, std_file_windows.sh, std_import_spelling_identity.sh, std_json_document.sh, std_time_windows.sh, thread_windows.sh, vec_capacity.sh, vec_field_loops.sh, zx_linked_web.sh, zx_wasm_web.sh, zx_web_lifecycle.sh
make: *** [Makefile:643: check] Error 1
-567
View File
@@ -1,567 +0,0 @@
mkdir -p build/
rm -f build/bin/zi2py build/bin/zi2zib build/bin/zi2cpp build/bin/zi2rust build/bin/zi2zx-vm
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/startup-graph-test
env -u DISPLAY -u WAYLAND_DISPLAY build/bin/zx-wasm-engine-test
scalar.zi:2:1: the wasm provider rejected the lowered module
zx-wasm-engine-test: seam, provider handoff and fallback verified
python3 tests/run_check.py --bin-dir build/bin --jobs 16 \
bootstrap matches: scan text source declaration enum type expression statement proof_kernel proof bundle ir law services link parse
Running 522 checks with 16 jobs (0 reused)
PASS bundle-link-test (0.0s)
PASS api_discovery.sh (0.1s)
PASS zx_native_perf_regression.sh (0.2s)
PASS aggregate_view_lifetime.sh (0.2s)
PASS asm_tinycc_encoding.sh (0.1s)
PASS artifact_consumer.sh (0.3s)
PASS as_conversion.sh (0.7s)
PASS aggregate_vec_safety.sh (0.8s)
PASS atomic_cli_link.sh (0.2s)
PASS array_result_in_place.sh (0.9s)
PASS asm_routines.sh (0.9s)
PASS body_eligibility.sh (0.2s)
PASS borrow_import_graph.sh (0.1s)
PASS benchmark_harness.sh (0.5s)
PASS assembly.sh (1.7s)
PASS builtin_type_names.sh (0.1s)
PASS build_playground.sh (0.8s)
PASS bundle_assets.sh (0.4s)
PASS bundle_component.sh (0.2s)
PASS bit_builtins.sh (1.5s)
PASS bundle_global_reachability.sh (0.2s)
PASS bundle_host_query.sh (0.2s)
PASS borrowed_view_return.sh (1.5s)
PASS bundle_libraries.sh (0.3s)
PASS bundle_owned_field.sh (0.0s)
PASS bundle_memory_host.sh (0.3s)
PASS bundle_host_review_abi.sh (0.6s)
PASS assembly_blocks.sh (2.7s)
PASS asm_dct8.sh (3.1s)
PASS bundle_verification.sh (0.1s)
PASS bundle_step_limit.sh (0.3s)
PASS c_exe_link.sh (0.1s)
PASS bundle_runtime_provider.sh (0.5s)
PASS c_call.sh (0.4s)
PASS c_reexport_type_header.sh (0.3s)
PASS c99_target.sh (0.7s)
PASS bundle_partial_modules.sh (0.9s)
PASS c_reexport_alias.sh (0.5s)
PASS c_module_init.sh (0.6s)
PASS c_warning_free_logic.sh (0.1s)
PASS c_spelling.sh (0.3s)
PASS callback_array_parameters.sh (0.1s)
PASS assembly_features.sh (3.6s)
PASS call_site_inlining.sh (0.2s)
PASS callback_record_layout.sh (0.1s)
PASS callback_table_layout.sh (0.1s)
PASS capabilities.sh (0.2s)
PASS callback_type_order.sh (0.2s)
PASS call_order.sh (0.5s)
PASS float_integer_casts.sh (4.4s)
PASS c_warnings.sh (1.0s)
PASS caller_location.sh (0.9s)
PASS cli_defines.sh (0.8s)
PASS compile_commands.sh (0.1s)
PASS calendar.sh (1.8s)
PASS char.sh (1.5s)
PASS cli_help.sh (1.0s)
PASS compact_branches.sh (1.0s)
PASS checked_integer_ops.sh (1.7s)
PASS compile_run_text.sh (0.4s)
PASS compile_ifx.sh (0.6s)
PASS check_runner.sh (2.1s)
PASS call_ranges.sh (2.8s)
PASS compile_time.sh (0.8s)
PASS compile_values.sh (0.9s)
PASS compiler_profile.sh (0.1s)
PASS compiler_enum.sh (1.9s)
PASS compile_if_syntax.sh (2.9s)
PASS compiler_bundle.sh (2.3s)
PASS compiler_expression.sh (2.0s)
PASS authoring_workflows.sh (8.1s)
PASS compiler_scan.sh (1.5s)
PASS compiler_proof_kernel.sh (2.4s)
PASS compiler_statement.sh (3.0s)
PASS compiler_declaration.sh (5.8s)
PASS compiler_text.sh (2.6s)
PASS compound_order.sh (0.6s)
PASS constant_time.sh (0.0s)
PASS compiler_source.sh (4.1s)
PASS cross_target_ui_shapes.sh (0.7s)
PASS compiler_type.sh (2.9s)
PASS constant_names.sh (1.5s)
PASS date_time.sh (0.0s)
PASS cross_module_inline.sh (1.7s)
PASS constant_tables.sh (2.0s)
PASS deep_nesting.sh (0.6s)
PASS data_scope_using.sh (1.6s)
PASS date_parse.sh (1.6s)
PASS default_bounds.sh (0.3s)
PASS default_arguments.sh (1.0s)
PASS date_time_linux.sh (2.0s)
PASS defer_block.sh (0.7s)
PASS defined_predicate.sh (0.5s)
PASS diagnostic_details.sh (0.0s)
PASS diagnostic_bounds.sh (0.1s)
PASS diagnostic_metadata.sh (0.1s)
PASS diagnostic_android.sh (0.2s)
PASS diagnostic_format.sh (0.3s)
PASS large_array_literals.sh (16.4s)
PASS division.sh (0.8s)
PASS empty_aggregate_lifetime.sh (0.7s)
PASS enum_cast.sh (0.4s)
PASS entry_dead_code.sh (0.8s)
PASS environment_native.sh (0.3s)
PASS enum_zero_arrays.sh (0.7s)
PASS emit_changed_module.sh (1.9s)
PASS directory_entry.sh (2.1s)
PASS explain.sh (0.2s)
PASS exe_build.sh (0.3s)
PASS ffi_header_import.sh (0.0s)
PASS definite_initialization.sh (2.8s)
PASS enum_flags.sh (1.6s)
PASS file_new.sh (0.4s)
PASS features.sh (0.9s)
PASS file_portable.sh (0.3s)
PASS file_copy_new.sh (0.9s)
PASS compile_run.sh (13.4s)
PASS file_read_into.sh (0.7s)
PASS file_link.sh (1.5s)
PASS foreign_keywords.sh (0.2s)
PASS field_guard_ranges.sh (1.9s)
PASS for_range.sh (0.9s)
PASS foreign_value_names.sh (0.5s)
PASS foreign_reads.sh (0.9s)
PASS formatter_parallel.sh (0.1s)
PASS for_collection.sh (1.6s)
PASS file_scope.sh (1.9s)
PASS format_builder.sh (1.3s)
PASS fuzz_regressions.sh (0.1s)
PASS compiler_files_portable.sh (14.9s)
PASS forward_import_conditions.sh (1.5s)
PASS forward_load_conditions.sh (1.5s)
PASS forward_type_conditions.sh (1.7s)
PASS formatter.sh (2.3s)
PASS compiler_profile_portable.sh (15.8s)
PASS generic_parameters.sh (0.8s)
PASS file_type_of.sh (4.1s)
PASS generic_record.sh (0.9s)
PASS generic_procedure.sh (1.2s)
PASS generic_slice_parameter.sh (1.4s)
PASS examples.sh (6.9s)
PASS global_string_output.sh (0.1s)
PASS global_names.sh (1.5s)
PASS global_owned_storage.sh (1.2s)
PASS generic_record_imports.sh (1.9s)
PASS global_slots.sh (1.7s)
PASS generic_array_parameter.sh (3.8s)
PASS go_anonymous_records.sh (1.0s)
PASS generic_multiple_results.sh (3.8s)
PASS go_conditional_widening.sh (0.5s)
PASS go_constant_strings.sh (0.9s)
PASS go_assert_spawn.sh (3.3s)
PASS go_callback_type_owners.sh (2.7s)
PASS go_export_roots.sh (0.4s)
PASS go_auth_primitives.sh (4.3s)
PASS go_field_tags.sh (1.9s)
PASS go_defer.sh (4.5s)
PASS go_bind.sh (5.8s)
PASS go_fields.sh (2.5s)
PASS go_foreign_types.sh (1.2s)
PASS go_error_values.sh (3.9s)
PASS go_maps.sh (1.0s)
PASS go_direct_assembly.sh (6.1s)
PASS go_c_headers.sh (7.8s)
PASS go_file_json.sh (3.2s)
PASS go_http_client.sh (3.8s)
PASS compiler_runtime_windows.sh (26.2s)
PASS go_many_parameters.sh (3.1s)
PASS go_package.sh (0.5s)
PASS go_output_stream.sh (0.6s)
PASS go_http_io.sh (3.8s)
PASS go_methods.sh (2.9s)
PASS generic_assembly.sh (14.3s)
PASS go_native_values.sh (2.9s)
PASS go_results.sh (1.9s)
PASS go_string_pointers.sh (0.6s)
PASS go_assembly.sh (13.4s)
PASS go_pointer_arrays.sh (2.9s)
PASS go_variadic.sh (0.9s)
PASS gpu.sh (0.8s)
PASS guide.sh (0.1s)
PASS go_select.sh (3.0s)
PASS hash_comments.sh (0.3s)
PASS gzip.sh (0.6s)
PASS go_package_init.sh (3.9s)
PASS go_slice_nil.sh (2.9s)
PASS heap_new.sh (0.8s)
PASS go_method_exports.sh (6.4s)
PASS go_sql_time.sh (3.2s)
PASS host_capability.sh (0.2s)
PASS host_export_link.sh (0.1s)
PASS host_arrays.sh (0.8s)
PASS host_bindings.sh (0.7s)
PASS hmac_sha256_go.sh (0.8s)
PASS host_module_binding.sh (0.7s)
PASS hash_map.sh (2.0s)
PASS gpu_offload.sh (2.7s)
PASS host_ziran_binding.sh (1.5s)
PASS implicit_widening.sh (1.0s)
PASS guarded_index_ranges.sh (3.0s)
PASS if_then.sh (1.5s)
PASS imported_callback_cast.sh (0.3s)
PASS import_string.sh (1.0s)
PASS imported_global_type_owner.sh (0.1s)
PASS imported_constant_names.sh (0.8s)
PASS imported_enum_names.sh (0.8s)
PASS imported_field_type_alias.sh (0.9s)
PASS imported_global_names.sh (0.8s)
PASS go_named_exports.sh (8.9s)
PASS imported_native_types.sh (0.2s)
PASS imported_map_slices.sh (0.6s)
PASS indexed_field_read.sh (0.1s)
PASS host_slices.sh (3.2s)
PASS imported_value_names.sh (0.8s)
PASS imported_type_names.sh (1.1s)
PASS input_in_module_path.sh (0.1s)
PASS inferred_int.sh (0.9s)
PASS imported_typed_constants.sh (1.5s)
PASS inferred_record.sh (0.8s)
PASS install_user.sh (1.0s)
PASS integer_literal_spellings.sh (0.8s)
PASS zx_web_lifecycle.sh (44.6s)
PASS jai_syntax.sh (1.4s)
PASS kept_text.sh (0.1s)
PASS json_array_reuse.sh (1.5s)
PASS json_string_value.sh (1.2s)
PASS json_scan.sh (1.7s)
PASS large_record.sh (0.1s)
PASS law_cases.sh (0.1s)
PASS large_enums.sh (0.7s)
PASS law_floats.sh (0.1s)
PASS law_records.sh (0.3s)
PASS language_contract.sh (1.4s)
PASS lint_casts.sh (0.0s)
PASS lint_characters.sh (0.0s)
PASS lint_flags.sh (0.0s)
PASS law_integers.sh (0.6s)
PASS imported_aggregate_constants.sh (6.3s)
PASS laws.sh (0.8s)
PASS imported_host_slices.sh (5.6s)
PASS large_constant_globals.sh (2.2s)
PASS local_shadows_import.sh (0.3s)
PASS local_owned_fields.sh (0.8s)
PASS local_procedures.sh (0.6s)
PASS long_string_constants.sh (0.3s)
PASS macro_temporaries.sh (0.2s)
PASS mapped_file_linux.sh (0.2s)
PASS image_resize_fallible.sh (8.4s)
PASS imported_globals.sh (6.7s)
PASS long_literals.sh (1.0s)
PASS math_float64.sh (0.5s)
PASS indirect_record_types.sh (6.9s)
PASS many_functions.sh (1.9s)
PASS module_root_capacity.sh (1.3s)
PASS module_symlink.sh (0.2s)
PASS match.sh (2.3s)
PASS must_use.sh (0.3s)
PASS multiline_param_targets.sh (0.8s)
PASS module_paths.sh (2.4s)
PASS mutex_linux.sh (0.3s)
PASS loop_guard_ranges.sh (3.1s)
PASS multiple_results.sh (0.9s)
PASS module_symbol_names.sh (2.2s)
PASS named_module_paths.sh (0.4s)
PASS named_arguments.sh (0.8s)
PASS named_imports.sh (0.7s)
PASS named_generic_dependencies.sh (1.3s)
PASS module_import_identity.sh (3.9s)
PASS llm_authoring.sh (5.4s)
PASS native_function_value_names.sh (0.6s)
PASS native_loops.sh (0.5s)
PASS native_nil.sh (0.8s)
PASS native_c_ffi.sh (1.9s)
FAIL native_entry.sh (1.7s, exit 1)
PASS native_release.sh (0.4s)
PASS native_operand_order.sh (0.8s)
PASS native_object_reuse.sh (0.9s)
PASS native_switch.sh (0.4s)
PASS lanczos_isa_bitexact.sh (8.7s)
PASS native_threads.sh (0.5s)
PASS negative_real_constants.sh (0.2s)
PASS native_run.sh (1.1s)
PASS nested_array_assign.sh (0.6s)
PASS multiline_strings.sh (4.7s)
PASS native_type_value_names.sh (1.2s)
PASS nested_constant_tables.sh (1.0s)
PASS nested_comments.sh (1.1s)
PASS nested_lazy_call.sh (0.7s)
PASS opaque_text_lifetime.sh (0.1s)
PASS numeric_semantics.sh (1.2s)
PASS operators.sh (0.7s)
PASS overloads.sh (0.7s)
PASS numeric_width_matrix.sh (1.1s)
PASS native_commands.sh (5.9s)
PASS owned_text_results.sh (1.9s)
PASS owned_text.sh (2.3s)
PASS package_process.sh (0.7s)
PASS package_darwin.sh (2.3s)
PASS parallel_captures.sh (0.2s)
PASS package_checkout_concurrency.sh (2.7s)
PASS package_relative_imports.sh (0.5s)
PASS nested_vec_elements.sh (4.4s)
PASS paren_record_literal.sh (0.1s)
PASS parallel_linux.sh (0.4s)
PASS parser_recovery.sh (0.3s)
PASS native_build_cache.sh (8.5s)
PASS parallel.sh (0.9s)
PASS pointer_cast_nested_array.sh (0.1s)
PASS parallel_results.sh (0.9s)
PASS pointer_field_text_lifetime.sh (0.3s)
PASS pointer_to_array.sh (0.0s)
PASS parallel_slices.sh (0.9s)
PASS native_runtime_headers.sh (6.5s)
PASS pointer_slot_params.sh (0.2s)
PASS portable_collection.sh (0.0s)
PASS pointer_subscript.sh (0.2s)
PASS portable_format.sh (0.1s)
PASS portable_imported_record_slices.sh (0.1s)
PASS portable_limits.sh (0.4s)
PASS path.sh (1.1s)
PASS portable_long_runs.sh (0.2s)
PASS portable_s64.sh (0.1s)
PASS portable_arrays.sh (1.2s)
PASS pointer_member_check.sh (1.6s)
PASS primitive_types.sh (0.1s)
PASS native_build_parallel.sh (10.3s)
FAIL portable_entry.sh (1.6s, exit 1)
PASS portable_pointers.sh (1.0s)
PASS package_map_concurrency.sh (4.1s)
PASS portable_globals.sh (1.7s)
PASS private_field_type_header.sh (0.1s)
PASS portable_host_records.sh (1.6s)
PASS private_type_application.sh (0.2s)
PASS private_type_application_load.sh (0.3s)
PASS portable_strings.sh (0.9s)
PASS private_module_imports.sh (0.7s)
PASS print_enums.sh (0.9s)
PASS process.sh (0.5s)
PASS print.sh (1.2s)
PASS portable_slices.sh (1.8s)
PASS print_records.sh (1.4s)
PASS qualified_slot_record_types.sh (0.2s)
FAIL program_export.sh (0.7s, exit 1)
PASS proofs.sh (0.7s)
PASS queue.sh (0.1s)
PASS process_channel_linux.sh (1.1s)
PASS random_linux.sh (0.1s)
PASS record_abi_metadata.sh (0.1s)
PASS procedure_inlining.sh (1.6s)
PASS record_fields_by_name.sh (0.0s)
PASS record_slice_header.sh (0.0s)
PASS range_loop_one_exit.sh (0.3s)
PASS record_pointer_layout.sh (0.2s)
PASS rejection_helper.sh (0.0s)
PASS record_update_stack.sh (0.5s)
PASS range_types.sh (0.7s)
PASS recursive_slice_records.sh (0.7s)
PASS qualified_pointer_import.sh (1.4s)
PASS procedure_result_reachability.sh (2.3s)
PASS resizable_arrays.sh (0.8s)
PASS saved_ir_call_argument_cast.sh (0.1s)
PASS process_channel_wait_linux.sh (2.2s)
PASS std_unicode_normalization.sh (63.8s)
PASS saved_ir_blocks.sh (0.4s)
PASS return_paths.sh (0.8s)
PASS runtime_local_names.sh (0.7s)
PASS safe_inference.sh (0.7s)
PASS proven_index_ranges.sh (2.2s)
PASS signature_spacing.sh (0.1s)
PASS sequence_header.sh (0.5s)
PASS sha256.sh (0.6s)
PASS semantic_edit.sh (0.7s)
PASS shared_foreign_bindings.sh (0.5s)
PASS shadowed_binding_reads_outer.sh (0.7s)
PASS runtime_globals.sh (1.6s)
PASS shared_type_application.sh (0.9s)
PASS reexport_import.sh (2.2s)
PASS semicolon_statements.sh (1.2s)
PASS site_targets.sh (0.4s)
PASS size_of.sh (0.6s)
PASS slot_field_values.sh (0.2s)
PASS slot_type_collision.sh (0.1s)
PASS slice_field_bound.sh (1.1s)
PASS slots.sh (0.8s)
PASS socket_linux.sh (0.2s)
PASS simd_run_ranges.sh (2.3s)
PASS stale_output.sh (0.3s)
PASS native_workers_windows.sh (13.9s)
PASS sort.sh (0.7s)
PASS simd_go.sh (3.2s)
PASS standalone_std.sh (0.2s)
PASS source_line.sh (1.3s)
PASS std_file_tree_wasm32.sh (0.0s)
PASS std_binary.sh (0.7s)
PASS std_file_darwin.sh (0.6s)
PASS std_foreign_size_types.sh (0.1s)
PASS std_image_composite_at.sh (0.6s)
PASS std_file_tree_linux.sh (1.5s)
PASS simd_std_imports.sh (5.2s)
PASS std_image_transpose.sh (0.7s)
PASS std_import_spelling_identity.sh (0.5s)
PASS std_image_linux.sh (1.5s)
PASS std_number_text.sh (0.1s)
PASS std_text.sh (0.1s)
PASS std_native_linux.sh (0.3s)
PASS host_strings.sh (31.9s)
PASS std_tools_linux.sh (1.1s)
PASS standalone.sh (7.3s)
PASS std_grapheme.sh (6.3s)
PASS stored_type_diagnostic.sh (0.0s)
PASS std_utf8.sh (2.7s)
PASS string_ranges.sh (0.7s)
PASS structure_first_error.sh (0.1s)
PASS stored_slots.sh (1.4s)
PASS symbol_lookup.sh (1.1s)
PASS std_text_results.sh (6.5s)
PASS string_storage.sh (2.0s)
PASS text_call_mutation.sh (0.8s)
PASS target_diagnostics.sh (1.8s)
PASS text_hex_decode.sh (0.6s)
PASS text_condition_arms.sh (1.2s)
PASS text_procedure_type_reads.sh (1.2s)
PASS text_reads_field_paths.sh (1.2s)
PASS text_format_arguments.sh (2.1s)
PASS text_reassigned_local.sh (1.2s)
PASS text_stream.sh (0.3s)
PASS text_string_arrays.sh (0.8s)
PASS text_scoped_producers.sh (1.9s)
PASS text_scoped_arguments.sh (2.4s)
PASS text_view.sh (0.8s)
PASS text_view_mutation.sh (0.3s)
PASS thread_android.sh (0.0s)
PASS thread_linux.sh (0.5s)
PASS this.sh (1.0s)
PASS text_without_vec_import.sh (1.0s)
PASS timer_linux.sh (0.2s)
PASS std_file_windows.sh (14.4s)
PASS tool_diagnostics.sh (0.4s)
PASS transport_view.sh (0.3s)
PASS unchanged_outputs.sh (0.1s)
PASS unary_precedence.sh (0.7s)
PASS unicode_data.sh (1.2s)
PASS text_std_module_path.sh (5.1s)
PASS unterminated_declarations.sh (0.1s)
PASS union.sh (1.1s)
PASS unreachable.sh (0.8s)
PASS std_json_document.sh (15.0s)
PASS update.sh (0.5s)
PASS using.sh (1.1s)
PASS using_import.sh (1.2s)
PASS using_modifiers.sh (1.1s)
PASS unused_enum_call.sh (2.1s)
PASS toml_document.sh (4.3s)
PASS variadic_foreigns.sh (0.2s)
PASS using_pointer.sh (0.7s)
PASS simd_native.sh (22.1s)
PASS utf8_copy_valid.sh (0.5s)
PASS using_struct.sh (0.8s)
PASS vec_move_expression.sh (0.2s)
PASS vec_resize_stack.sh (0.2s)
PASS version.sh (0.0s)
PASS vec_slice_global.sh (0.3s)
PASS vec_auto_drop.sh (0.6s)
PASS vec.sh (1.1s)
PASS vm_call_metadata.sh (0.5s)
PASS vm_builtin_dispatch.sh (0.6s)
PASS vec_field_loops.sh (1.6s)
PASS vm_binary_dispatch.sh (1.5s)
PASS vm_deep_marking.sh (1.6s)
PASS simd.sh (25.2s)
PASS std_time_windows.sh (19.0s)
PASS vm_locale.sh (0.1s)
PASS vm_local_reads.sh (0.5s)
PASS vm_concurrent_instances.sh (2.6s)
PASS vm_nested_collection.sh (0.4s)
PASS vm_leaf_eval.sh (1.8s)
PASS vm_profile.sh (0.1s)
PASS vm_inline_records.sh (2.6s)
PASS vm_function_plans.sh (3.5s)
PASS vm_return_storage.sh (0.5s)
PASS vm_packed_arrays.sh (1.5s)
PASS vm_literal_cache.sh (2.3s)
PASS vm_metadata_cache.sh (2.0s)
PASS vm_record_layout.sh (1.5s)
PASS vm_retirement.sh (1.5s)
PASS vm_vec_scope.sh (0.0s)
PASS vm_u64_enums.sh (0.6s)
PASS wasm_cc.sh (0.0s)
PASS vm_storage_reads.sh (0.7s)
PASS wasm_slices.sh (0.2s)
PASS vm_scalar_coercion.sh (1.6s)
PASS vm_value_payloads.sh (1.5s)
PASS vm_scalar_plans.sh (1.7s)
PASS vec_capacity.sh (6.7s)
PASS vorbis_linux.sh (1.5s)
PASS vm_vec_type_cache.sh (1.8s)
PASS std_unicode.sh (93.7s)
PASS wide_comparisons.sh (1.0s)
PASS wide_constants.sh (1.1s)
PASS widening_cast.sh (1.1s)
PASS zip.sh (0.8s)
PASS zx_native_asm.sh (0.1s)
PASS zx_native_cache.sh (0.1s)
PASS zip_file_linux.sh (0.8s)
PASS zir_api.sh (0.7s)
PASS zx_native_invocation_regression.sh (0.3s)
PASS zx_native_parallel.sh (0.2s)
PASS zx_portable_write.sh (0.3s)
PASS wasm_enums.sh (2.8s)
PASS web_bridge.sh (2.7s)
PASS zero_arrays.sh (2.3s)
PASS thread_windows.sh (14.1s)
PASS zx_wasm.sh (1.5s)
PASS zx_wasm_web.sh (2.4s)
PASS packages.sh (97.4s)
PASS simd_target.sh (32.8s)
PASS zstd_go.sh (5.3s)
PASS simd_tier_units.sh (39.9s)
PASS zx_linked_web.sh (11.5s)
PASS std_float_text.sh (121.2s)
PASS compiler_kernel_benchmarks.sh (148.0s)
PASS site_pages.sh (152.9s)
=== FAIL native_entry.sh (exit 1)
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 160, in <module>
run([cxx, '-std=c++17', '-O2', '-I'+str(repo/'include'), '-I'+str(out), out/'body.o', cpp_host, '-o', out/'cpp-probe'])
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/native_entry_test.py", line 21, in run
assert result.returncode == answer, (command, result.returncode, result.stdout, result.stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: (['/home/wao/.local/bin/c++', '-std=c++17', '-O2', '-I/mnt/storage/Projects/ziranlang/ziran/include', '-I/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/c-source', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/c-source/body.o'), PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/host.cpp'), '-o', PosixPath('/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/tmp.cvQUT3kbIy/wide/c-source/cpp-probe')], 1, '', "/usr/bin/ld: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/native_entry.sh.wp6yo3du/cc4WMTdr.o: in function `main':\nhost.cpp:(.text.startup+0x5): undefined reference to `Probe()'\ncollect2: error: ld returned 1 exit status\n")
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/native_entry.sh.log
=== FAIL portable_entry.sh (exit 1)
Traceback (most recent call last):
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 38, in <module>
actual = run(ziran, 'run', bundle).stdout
~~~^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/storage/Projects/ziranlang/ziran/tests/portable_entry_test.py", line 30, in run
return subprocess.run(list(map(str, args)), check=True, capture_output=True, text=True, **kwargs)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/mnt/storage/Projects/ziranlang/ziran/build/bin/ziran', 'run', '/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/portable_entry.sh.earuot3y/tmp.qlAt6rh4Nf/true-source.zx']' returned non-zero exit status 1.
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/portable_entry.sh.log
=== FAIL program_export.sh (exit 1)
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/program_export.sh.onmy05o9/tmp.S8X2dAAbB9/keyword_main.c: In function ‘main’:
/mnt/storage/Projects/ziranlang/ziran/build/check-logs/ziran-check.if0mdymi/program_export.sh.onmy05o9/tmp.S8X2dAAbB9/keyword_main.c:4:45: error: implicit declaration of function ‘ziran_keyword_class_0’; did you mean ‘ziran_keyword_switch_0’? [-Wimplicit-function-declaration]
4 | ziran_keyword_switch_0() == 1 && ziran_keyword_class_0() == 2
| ^~~~~~~~~~~~~~~~~~~~~
| ziran_keyword_switch_0
Full log: /mnt/storage/Projects/ziranlang/ziran/build/check-logs/program_export.sh.log
519/522 passed in 217.9s (522 executed, 0 reused): failed native_entry.sh, portable_entry.sh, program_export.sh
make: *** [Makefile:643: check] Error 1
Loaded 100 of 1932 files, more files were not shown because too many files have changed in this diff. Show more