Repository navigation
runtime: 删除第二份签名表,typed_core 从能力表派生(表漂移治理) - #627
Merged
Merged
Conversation
同一事实此前抄成两份表:能力表 myrwircaps.c(派发用)与签名表 isa_sig.c(typed_core 用)。两份表靠闸门逐项比对,闸门又被逐个删除, 于是表漂移无人发现。 本提交删除 isa_sig.c,typed_core 改为「能力表里声明了定长结果类型 (result_kind != NULL)的行」,与派发同源——同一事实只留一个源。 附带能力表编号黄金快照(323 行)与 --selftest 双向钉子:4 个合成错位 必须红并点名 index,1 个同输入必须绿。 Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
表漂移治理:删除第二份签名表,
typed_core从能力表派生治的是什么病
同一事实此前被抄成两份表:
runtime/src/myrwircaps.cruntime/src/isa_sig.ctyped_core判定(156 项 BIN/CMP/UN)e3c66ac0(publish the full 300-entry ISA manifest)两份表靠闸门逐项比对来维持一致,而闸门本身被逐个删除:
5be42c65(mark typed core rows and drop type dispatch for them)——typed core 行列改为标记,签名表与派发的对齐闸门随之削弱;144c848a(layout: 收窄恢复 typed 特化与测试)——相关测试收窄。于是两份表可以静默漂移,没有任何东西会报错。
改后:单一来源
typed_core= 「能力表里声明了定长结果类型的行」(156 项),与派发同源——同一个事实只留一个源,删除runtime/src/isa_sig.c。闸门如何验证(双向)
新增
runtime/tests/myrwircap_ids.py+tests/fixtures/myrwircap_ids.txt(323 行黄金快照,按myrwircaps.c预处理后的表序、id = 表下标):--selftest输出原文:ok: selftest 4 mismatches + 1 equal。验证(
git archive 3dac68fc干净副本,layout + C runtime + byteseek 三重建)09-debugger/pauses.kv)关于符号(口径说明):删除一个翻译单元后链接地址会移动——例如
kvlangBuiltinAdd从0x33a80移到0x33a40。我们声明的是符号集不变(308 个类型+名字的集合逐项相同),不是地址不变。
文件(7 个路径:4 改 + 1 删 + 2 增)
关联 #622,不关闭该 issue。
🤖 Generated with Claude Code