Implement Zag Script, zagd planning, and Linux x86 milestones - #2
Implement Zag Script, zagd planning, and Linux x86 milestones#2micahcooley wants to merge 424 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 518 files, which is 418 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (10)
📒 Files selected for processing (539)
You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a review. |
…erings The arm64 self-hosting CI step aborted twice on this branch. First the backend could not lower constructs this PR added, so the gen1 cross-compile failed with "unsupported constructs". After those were lowered, the gen2 self-compile ran out of memory under qemu-user because every allocation took its own mmap and each was rounded up to a full page, so the 100 KB znc source blew past 8 GiB. acodegen: - lower _zag_slice_ptr, _zag_raw_syscall (AArch64 svc convention), and fail-closed stubs for the x86 cpuid/xgetbv intrinsics, plus their return types in ac_expr_type - handle prefix statements and a trailing return inside a switch-expression arm (ac_lower_arm_value), mirroring the x86 backend - replace the one-mmap-per-allocation __malloc with a 64 MiB arena/bump allocator, dropping gen2 peak RSS from over 8 GiB to about 0.5 GiB - reserve 16 bytes at the start of the data segment for the allocator's cursor and end globals elf_arm64: - mark the data PT_LOAD read/write so the allocator globals are writable Rebuilt the x86 znc seed to fixpoint. Local results: arm64 self-host 5/5, arm64 suite 99/0, differential 57/0, native 133/0, bootstrap reproducibility 6/6. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Modularize the native codegen by extracting ncodegen.zag into seven focused files: ncodegen_env (environment/slots), ncodegen_generics (monomorphization), ncodegen_layout (type layout), ncodegen_runtime (numeric runtime detection), ncodegen_scan (frame sizing), ncodegen_strings (literal decoding), and ncodegen_types (type predicates). Add GPU shader backend emitters for CUDA PTX, GLSL, MSL, OpenCL C, and SPIR-V, plus runtime loaders for CUDA, Metal, OpenCL, OpenGL, and Vulkan. Include compatibility-tier and runtime test scripts for each backend. Update analyze, sema, lex, parse, ast, typed, and znc.zag to support the new backends and modular codegen. Rebuild the znc bootstrap binary. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Language/compiler: - sema.zag: improved effect analysis and callee resolution - typed.zag: enhanced type checking for v2 edition features - ncodegen.zag: additional codegen improvements - isa.zag: new SIMD bitwise i32x4 instructions - x86.zag: x86 backend support for new instructions Tests: - Added run_x86_simd_bitwise_i32x4.sh and test source - Expanded v2 edition, effect adversarial, and kernel effects tests - Updated docs consistency and release gate tests Documentation: - Updated V2 language spec, memory model, safety tooling, effect model - Updated allocator guide, CPU control guide, GPU model docs - Updated support matrix and implementation plan Bootstrap seed: - Updated znc seed binary to current self-hosting fixpoint Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
What changed
Authority and safety
Regular Zag remains advisory and source-preserving. Zag Script applies defaults only where source choices are unspecified. Foreground compilation remains authoritative without zagd. Unsupported i686 and optimizer behavior fails closed and remains documented.
Validation
Remaining documented boundaries
This PR does not claim universal memory safety, a complete ownership system, universal deep optimization, full foreign i686 ABI coverage, ARM support, or full x86-family completion.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is enabled.