Repository navigation
refactor(ccr): v10 目标无关格形态迁移 - #181
Merged
Merged
Conversation
Delete tag2l.cr, the g_x86_mw_* frame/tag state, jo/oc tail blocks, and test_mw_task1-6. Raw compiler paths now use plain 64-bit values; user programs continue on tagged BigInt. Also box TI_DEX_S -> TI_INT stores for @raw_int under tagged mode, so raw dex payloads are not misread as tagged immediates. Relock canary_elf: the removed compiler globals shift intern ids; all four .ccr values are unchanged. D1 determinism is 5/5.
Add a debug marker to CLI flag records and print hidden debug channels in their own help group. Update corec debug flag registrations.
- split target-owned ABI builtins across x86_64, linux, and runtime; the target root only composes them - move classic value mapping to src/arch/x86_64 and keep the compiler mapping.cr as a target-neutral interface - add the kernel cell API; frontend table accesses no longer call w64/r64/w32/r32/load8/store8/_dyncpy directly - make the target descriptor own the backend command, import roots, and runtime source path - rename the combination root to x86_64-linux-elf (arch x system x container) and record all three in Core.toml - relock the four .ccr canaries after the compiler-side global order changed; ELF canary is unchanged
Use src/targets/x86_64/linux/elf/ instead of one hyphenated target name. The root only composes the three axes; architecture, OS, and container implementations remain in their own trees. Update the build manifest, project-mode import root, tests, and parity script.
Keep the declared dex? row on call results, struct-field reads, and enum match payloads. The existing match lowering only recovered the payload form from irv_decl_ti; without propagation, @raw_int saw a raw scaled integer as a plain int and produced 3 instead of 7. test_opt_dex is now 30/30; BigInt, backend bootstrap, corec2/corec3, and canary remain green.
Define .ccr v10 as a lattice/existence representation, not a linear slot instruction stream. NOD/EDG/ENT/REG are the semantic backbone; file order is a topological projection. Remove width/offset/stride/ABI/home from the authoritative format, keep TYPE as semantic domains, reserve CASE, and leave target layout to corearch/HIT while .coi remains optional optimization knowledge.
Do not spell wire fields as u32/i32. The format needs fixed byte widths, but those are file-format contracts, not language types or target word sizes. Use semantic roles (count, id, imm, flags, ...) plus a separate wire-role table.
Order the canonical segments as STR, TYPE, IFACE, SYM, NOD, ENT, REG, EDG, CASE so a reader can consume forward with no backward seeks. Add the streaming-reader contract and the zstd/tar .ccrb distribution bundle rules. Raw .ccr remains uncompressed and target-neutral.
Replace ASCII pipeline arrows with Mermaid flowcharts for the lattice pipeline, canonical segment order, bundle layout, and consumer flow.
Remove the w64 and r64 builtin names from the frontend ABI table and backend dispatch. Internal byte-buffer access now uses cell_store and cell_load, which the compiler and stdlib share as low-level runtime accessors. This is the first step toward removing fixed-width names from the ordinary surface; v10 typed/layout IR migration remains separate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
把
.ccr从 v9.1 槽格式迁移到 v10 目标无关格形态:STR → TYPE → IFACE → SYM → NOD → ENT → REG → EDG → CASE;v9 整类拒绝。type_id/flags,移除宽度/stride/偏移;ENT 24B 无home,补全局/参数存在行。opt_meta不再从 wire 执行寄存器分配。ir_gen/ptr_analysis/provenance_verify/ccr_lower/interp不再直接调用mp_*;corearch 按 target layout 重建。w64/r64公共内建移除;raw 字节内建保留为显式 SYSTEM runtime ABI。tools/ccrb.py分发层;.coi可选、不透明、可删除;corearch 不依赖 zstd。.ccrcanary 仅按 header flags/ENT 存在行归因重锁,ELF canary 不变。验证
最终 head
0cdf35cc:ELF canary:
826d74cf7f099f9758e11a64d443695ff8360327a88e7eb5922ddfd617e0dce5(53430 B)。已知后续
BytesAPI 迁移后,普通程序才能重新产生 PORTABLE.ccr;当前注入 runtime 调 raw ABI,故 e2e 均为 SYSTEM。.coi完整记录格式仍归独立计划;本 PR 只保证.ccrb可选 opaque sidecar。.ccrbCI 因未声明 zstd 依赖暂列 allowlist。test_hit_table.py及若干迁移前已红套件不在本 PR 范围。