[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AXSJWYEZAX7WNXAQZ56VSY":3,"skill-same:01M7AXSJWYEZAX7WNXAQZ56VSY":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7AXSJWYEZAX7WNXAQZ56VSY","aria-bytecode-change",null,"加或改一条字节码指令（OpCode）时使用。列出完整同步面：code.hpp X 表追加与枚举序、dispatch_loop 的 case（漏 case 是运行期 fatal）、opcode_profile 的平行 switch 与 size_of\u002Frecords_fall_pair、反汇编渲染与 kOpCodeCount 哨兵、CodeGen\u002FCodeUnit 发射侧、instruction-set.md 与 lowering.md、语料与画像。","deeplakee\u002Faria-lang","deeplakee","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F97671080?v=4","01M7AXS58E626NA3J9F9XD57QV","01M7AXS593V1EK8QXN24PJMRXA",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-bytecode-change\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: aria-bytecode-change\ndescription: 加或改一条字节码指令（OpCode）时使用。列出完整同步面：code.hpp X 表追加与枚举序、dispatch_loop 的 case（漏 case 是运行期 fatal）、opcode_profile 的平行 switch 与 size_of\u002Frecords_fall_pair、反汇编渲染与 kOpCodeCount 哨兵、CodeGen\u002FCodeUnit 发射侧、instruction-set.md 与 lowering.md、语料与画像。\n---\n\n# 加 \u002F 改一条指令\n\n> 场景：新增 OpCode、改某条指令的栈效应或操作数格式。见[指令规格](..\u002F..\u002Freference\u002Fspecs\u002Finstruction-set.md)\n> 与 [CodeUnit 容器和发射接口](..\u002F..\u002Freference\u002Fbytecode.md)。\n\n## 1. 定形\n\n先在 `instruction-set.md` 里想清楚三件事：**操作数格式**（选既有 `OpFormat` 就少改两处）、**栈效应**（右侧为栈顶；`STORE_*` 必须 peek-store、留被存值）、**谁发射**（CodeGen 哪个 visit 方法，还是只给手写字节码用）。\n\n## 2. 同步面（按序过）\n\n1. **`src\u002Fbytecode\u002Fcode.hpp` 的 `ARIA_OPCODE_LIST`**：**按语义段插入**一行 `X(NAME, Format)`（新算子排进对应段，二元与一元对齐段内既有排布）。opcode 编号会移动，但无数值稳定消费面：CodeUnit 无序列化格式、画像按名输出、测试对 opcode 的引用全走枚举符号（裸字节是操作数载荷）。唯一硬约束：勿拆散 `LOAD_LOCAL_1..8` \u002F `STORE_LOCAL_1..8`（static_assert 锁连续）。\n2. **`tests\u002Fbytecode\u002Ftest_disassembler.cpp` 的 `EXPECT_EQ(kOpCodeCount, 85u)`**：X 表行数哨兵，加一条就改这个数（不改则测试红，这是它存在的意义）。\n3. **`src\u002Fruntime\u002FEval.cpp` 的 `dispatch_loop`**：加 `case`。漏了不会编译错--落 `default: UNREACHABLE()`，**运行期 fatal**。\n4. **`src\u002Fruntime\u002Fopcode_profile.cpp`**：同步 `fetch` 的全枚举 switch。新增格式时核对 `size_of`（默认按 3 字节）；改变出边时核对 `records_fall_pair` 与 `is_frame_switch`（分别按格式和指令分类）。\n5. **`Disassembler`**：按格式表自动分发，既有格式零改动；**只有新格式**才加分发分支。渲染回归在 `tests\u002Fbytecode\u002Ftest_disassembler.cpp`。\n6. **发射侧**：`CodeGen` 的 visit 方法里经 `CodeUnit` 的封装发（`emit_op`\u002F`emit_byte`\u002F`emit_word`；局部槽用 `emit_load_local`\u002F`emit_store_local` 以吃到 N 短变体；跳转用 `emit_jump` + `patch_jump`--`patch_jump` **没有 target 参数**，目标恒为调用时刻的 `size()`，故同一目标的占位必须连续回填）。\n7. **文档**：`reference\u002Fspecs\u002Finstruction-set.md` 加表行（操作数\u002F栈效应\u002F语义）与相关 lowering 图；影响赋值或循环的还要改 `lowering.md`。\n8. **验收**：`tests\u002Fbytecode\u002F`（反汇编渲染、`kOpCodeCount` 哨兵）+ `tests\u002Fcompile\u002F`（端到端断言字节码形状）；语言面可见的行为另配语料（见技能 `aria-testing`）。\n9. **画像配置**：按 [bench\u002Fprofile 的构建命令](..\u002F..\u002F..\u002Fbench\u002Fprofile\u002FREADME.md#快速开始)另建 `-DARIA_OPCODE_PROFILE=ON` 的版本，构建 `aria` 和 `aria_tests`，运行画像相关测试。改热指令时再跑代表性负载的画像。\n\n## 3. 常踩的三处\n\n- **只改了 dispatch、没改画像 switch**：普通配置不会编译画像实现。画像配置下，Clang\u002FGCC 启用 `-Wswitch` 时会警告漏掉的枚举（别给 `fetch` 的 switch 加 `default`）；只有把警告升为错误时才会使构建失败。\n- **改了指令语义、没改栈效应注释与文档**：`Eval.cpp` 的 case 注释是契约，`instruction-set.md` 是规格，两处都要动。\n- **新格式只改了 Disassembler**：`opcode_profile.cpp` 的 `size_of` 会给出错的字节长，画像静默失真。\n","# 加 \u002F 改一条指令\n\n> 场景：新增 OpCode、改某条指令的栈效应或操作数格式。见[指令规格](..\u002F..\u002Freference\u002Fspecs\u002Finstruction-set.md)\n> 与 [CodeUnit 容器和发射接口](..\u002F..\u002Freference\u002Fbytecode.md)。\n\n## 1. 定形\n\n先在 `instruction-set.md` 里想清楚三件事：**操作数格式**（选既有 `OpFormat` 就少改两处）、**栈效应**（右侧为栈顶；`STORE_*` 必须 peek-store、留被存值）、**谁发射**（CodeGen 哪个 visit 方法，还是只给手写字节码用）。\n\n## 2. 同步面（按序过）\n\n1. **`src\u002Fbytecode\u002Fcode.hpp` 的 `ARIA_OPCODE_LIST`**：**按语义段插入**一行 `X(NAME, Format)`（新算子排进对应段，二元与一元对齐段内既有排布）。opcode 编号会移动，但无数值稳定消费面：CodeUnit 无序列化格式、画像按名输出、测试对 opcode 的引用全走枚举符号（裸字节是操作数载荷）。唯一硬约束：勿拆散 `LOAD_LOCAL_1..8` \u002F `STORE_LOCAL_1..8`（static_assert 锁连续）。\n2. **`tests\u002Fbytecode\u002Ftest_disassembler.cpp` 的 `EXPECT_EQ(kOpCodeCount, 85u)`**：X 表行数哨兵，加一条就改这个数（不改则测试红，这是它存在的意义）。\n3. **`src\u002Fruntime\u002FEval.cpp` 的 `dispatch_loop`**：加 `case`。漏了不会编译错--落 `default: UNREACHABLE()`，**运行期 fatal**。\n4. **`src\u002Fruntime\u002Fopcode_profile.cpp`**：同步 `fetch` 的全枚举 switch。新增格式时核对 `size_of`（默认按 3 字节）；改变出边时核对 `records_fall_pair` 与 `is_frame_switch`（分别按格式和指令分类）。\n5. **`Disassembler`**：按格式表自动分发，既有格式零改动；**只有新格式**才加分发分支。渲染回归在 `tests\u002Fbytecode\u002Ftest_disassembler.cpp`。\n6. **发射侧**：`CodeGen` 的 visit 方法里经 `CodeUnit` 的封装发（`emit_op`\u002F`emit_byte`\u002F`emit_word`；局部槽用 `emit_load_local`\u002F`emit_store_local` 以吃到 N 短变体；跳转用 `emit_jump` + `patch_jump`--`patch_jump` **没有 target 参数**，目标恒为调用时刻的 `size()`，故同一目标的占位必须连续回填）。\n7. **文档**：`reference\u002Fspecs\u002Finstruction-set.md` 加表行（操作数\u002F栈效应\u002F语义）与相关 lowering 图；影响赋值或循环的还要改 `lowering.md`。\n8. **验收**：`tests\u002Fbytecode\u002F`（反汇编渲染、`kOpCodeCount` 哨兵）+ `tests\u002Fcompile\u002F`（端到端断言字节码形状）；语言面可见的行为另配语料（见技能 `aria-testing`）。\n9. **画像配置**：按 [bench\u002Fprofile 的构建命令](..\u002F..\u002F..\u002Fbench\u002Fprofile\u002FREADME.md#快速开始)另建 `-DARIA_OPCODE_PROFILE=ON` 的版本，构建 `aria` 和 `aria_tests`，运行画像相关测试。改热指令时再跑代表性负载的画像。\n\n## 3. 常踩的三处\n\n- **只改了 dispatch、没改画像 switch**：普通配置不会编译画像实现。画像配置下，Clang\u002FGCC 启用 `-Wswitch` 时会警告漏掉的枚举（别给 `fetch` 的 switch 加 `default`）；只有把警告升为错误时才会使构建失败。\n- **改了指令语义、没改栈效应注释与文档**：`Eval.cpp` 的 case 注释是契约，`instruction-set.md` 是规格，两处都要动。\n- **新格式只改了 Disassembler**：`opcode_profile.cpp` 的 `size_of` 会给出错的字节长，画像静默失真。\n",{"name":5,"description":7},"main","cf06d60e6d3a96fa18d91934c819d1b7deb307a8",".agents\u002Fskills\u002Faria-bytecode-change",0,"https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang","https:\u002F\u002Fgithub.com\u002Fdeeplakee","2026-11-14 16:04:58",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add deeplakee\u002Faria-lang --skill aria-bytecode-change",{"tool":36,"command":37},"bunx","bunx skills add deeplakee\u002Faria-lang --skill aria-bytecode-change",{"tool":39,"command":40},"pnpm","pnpm dlx skills add deeplakee\u002Faria-lang --skill aria-bytecode-change","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-bytecode-change\u002FSKILL.md",true,[],[45,52,59,66,72,79],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7AXT1RJW6VYT6CY9TMVWKNQ","aria-testing","写 aria 的 C++ GTest 用例或语言语料时使用。核对 CMake 登记、语料位置、期望文件与双配置验收；运行命令见 docs\u002Ftesting.md，语料判定规则见 tests\u002Flanguage\u002FREADME.md。","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-testing\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7AXSY2FZPTKZXH1B6BJ7SQC","aria-language-change","aria 语言面改动同步清单：改文法（docs\u002Fgrammar.txt）、词法、语义或新增语言特性时使用。列出全部同步义务面：Parser\u002FCodeGen 实现、tests\u002Flanguage 语料正负向、docs\u002Fguide 教程章节、README 特性表、.agents\u002Freference 模块参考，及双配置全量验证要求。","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-language-change\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7AXST1VPKADEVF89BW4MK64","aria-error-messages","aria 报错文案规范速查：写或改任何面向用户的报错文案（编译期 \u002F 运行期 \u002F CLI \u002F ASSERT）时使用。含 detail 通则、句式家族要点、元数族 arity_error 唯一口、被调者泛称、ASSERT 文案规则与机械门禁 tools\u002Fcheck_error_messages.py 的实际覆盖面。规范本体在 .agents\u002Freference\u002Fspecs\u002Ferror-messages.md。","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-error-messages\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7AXSQJKZYG1PD341F0WW1Y5","aria-commit","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-commit\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7AXSF6TW8G4PV1J19TP4JJP","aria-bench","aria 性能测量纪律：跑基准、做 A\u002FB 对比、写性能报告时使用。含三层分工（bench\u002Flang 进程级墙钟与跨语言对照、lexer\u002Fvm\u002Fhashtable 进程内微基准、bench\u002Fprofile 指令频度画像）、各自的构建配方与目录、A\u002FB 对照方法与报告规范、构建旗（ARIA_USE_TAGVALUE \u002F ARIA_USE_MIMALLOC \u002F ARIA_OPCODE_PROFILE）。","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-bench\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7AXSBWZGYDJ87FEHDJAAF3N","aria-add-builtin","给 aria 加内建方法、静态原语或新内建类时使用。列出完整同步面：方法体与方法表、make_class 注册口（实例方法 vs 不绑定的静态原语）、receiver\u003CT> 与 obj_tag 守卫、arity_error 元数口、返回值写槽与 GC 根、语料与文档（含 docs\u002Fguide\u002F17-builtin-reference.md）。","https:\u002F\u002Fgithub.com\u002Fdeeplakee\u002Faria-lang\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Faria-add-builtin\u002FSKILL.md",[],[]]