Commit Graph
13 Commits
Author SHA1 Message Date
waozi d2db9d35fe Extend verified direct assembly execution and optimization 2026-11-11 21:28:27 -03:00
waozi 4dc2da6b09 Publish measured desktop, Android and web target matrix
Compare five real examples across four targets on three measured platforms, preserving raw samples, independent output verification and artifact provenance.

Complete the WebAssembly support needed by the examples, inspect ZX bundles, prune generated C dependencies while preserving C++ linkage, and validate native script execution. Optimize only the temporary bootstrap seed and retain fresh-build measurements and historical benchmark records under bench/results.

Local tests: all 522 cases passed across the full run and corrected header-test rerun; all 16 bootstrap modules match. Playground runtime, bundle runtime, private browser layouts and matrix controls, published artifacts and local site links passed.
2026-11-10 23:50:12 -03:00
waozi 347b3c8437 Move compiler parsing, linking and effect laws into Ziran 2026-11-07 19:16:39 -03:00
waozi 4235c1dde6 Regenerate the bootstrap headers' ZIRAN_NO_HEADER_INLINE guard
The header-inline section guard gained !defined(ZIRAN_NO_HEADER_INLINE),
but the checked-in compiler_source.h and compiler_text.h still had the
old guard, so compiler_source.sh and compiler_text.sh found them stale.
2026-11-07 12:36:43 -03:00
waozi 8f6df80860 Dispatch #target procedures to SSSE3, SSE4.1 and AVX2 clones
A #target procedure gets a clone per x86-64 SIMD tier in C, and the
procedure itself picks one through CPUID and the OS's YMM state, read
once. ZIRAN_SIMD_TIER lowers the choice for tests. Checking keeps 256-bit
vectors from crossing the procedure's boundary by value, since AVX2
clones would pass them in YMM registers. Saved IR records the modifier
(format 61). TinyCC, NEON and other targets compile the procedure once.
2026-11-06 14:41:00 -03:00
waozi 35eae0536d Add #inline and #cold procedure modifiers
#inline after a procedure's result makes generated C always inline it:
private procedures become static inline with always_inline on GCC and
Clang, and a public procedure keeps its cross-module header copy past the
usual size limits. A procedure that calls itself is rejected
(check.inline).

#cold marks a slow path: the C definition is noinline and cold, other
modules call its one definition instead of a header copy, and Go gets
//go:noinline. Neither modifier changes what a call does.

Saved IR records the modifier, so the ZIR format version is now 60.
tests/procedure_inlining.sh checks the attributes, which calls stay out
of line, C at -O0 and -O2, Go, native and portable results, saved IR, and
the rejected forms.
2026-11-06 12:56:37 -03:00
waozi e859f7854f Inline small public procedures across modules through header copies 2026-11-06 06:51:58 -03:00
waozi ca0f6c2940 Reduce generated native runtime header dependencies 2026-10-15 22:21:02 -03:00
waozi 88b8acfdfe Emit native Rust assembly with checked portable fallback
Share checked operands with the Rust backend, preserve caller storage for memory operands, and isolate CPU-feature helpers behind cached runtime detection. Fix quoted-brace discovery for one-line assembly procedures and target-width Rust word types.

Add source/saved IR conformance, explicit unsupported-variant fallbacks, cross-target evidence and a repeatable native-control benchmark.
2026-10-15 20:05:44 -03:00
waozi 07fe834cda Parse blocks opened and closed together on one line
A line such as 'for y: 0..2 { for x: 0..2 {' opened only the outer
block, and '} }' closed only one, so the file failed with
"unterminated declaration at end of file". A control header whose
body stays open now passes its remaining text on as the next logical
line without queueing a closer, and '} }' splits into two closers.
Unterminated literals inside the body still leave the line unsplit.
2026-10-02 15:44:25 -03:00
waozi 50d296b3a7 Compile procedure header parsing from Ziran source 2026-10-01 01:36:48 -03:00
waozi cd0a4327a3 Move statement classification and record separators into Ziran 2026-10-01 01:18:28 -03:00
waozi 8d4374ad6a Compile source preprocessing and logical scanning from Ziran 2026-10-01 01:09:31 -03:00