runtime: 执行循环热路径免 malloc + vthread 状态写入收敛 - #312
Merged
Conversation
- keytree: 新增 kvlangKeytreeStackBuf/FrameRootLen;FrameNum 免 strbuf 构造 - kvspace: 短 key 走栈缓冲;新增 kvlangKvSetChar 直写 char/utf8 body (跳过 TLV 编码→KvSet 往返),供 PC 推进热路径 - kvcpu: 执行循环缓存 frame_root/深度/funcdir,前缀比较判帧变; jump_to/Advance 复用帧根;免指令后回读 - vthread: kvlangVthreadAdvance(状态门,每步只回读 1 个 ‥status key) + kvlangVthreadStatusGet - frame_t 增 frame_root/status_known/fb_pc;rwir_func/decode/myrwircaps 配套签名收敛 Closes #309 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.
变更
routine-c 每指令热路径去掉多余分配与回读。
kvlangKeytreeStackBuf/kvlangKeytreeFrameRootLen;FrameNum直接定位帧坐标、免 strbuf 构造。kvlangKvSetChar直写 char/utf8 body,跳过「TLV 编码→KvSet 再解 head」往返,供 PC 推进热路径用。frame_root/深度/funcdir,仅当帧变(前缀比较)才重算;jump_to复用帧根;免指令后回读。kvlangVthreadAdvance(状态门,每步只回读 1 个‥statuskey,保证外部置 paused/error 下一步即见)+kvlangVthreadStatusGet。kvlangFrame_t增frame_root/status_known/fb_pc;rwir_func/decode/myrwircaps 配套签名收敛。10 文件 +299/-94。CI(shm+fs 跑 tutorial)验证不回归。
Closes #309
🤖 Generated with Claude Code