0xMiden / 0xMiden/miden-vm

Bring advice map entries into alignment with other module items in the AST

未关闭
#2,566 3 条评论 0 个 reaction 已指派 2 人 已被 @mooori 认领 在 GitHub 查看
assembly
主要语言
Rust
星标
772
派生
352
平均合并
1 天 7 小时
30 天内合并 PR
84

描述

One thing for follow up after this PR: when pretty-printing a `Module`, we currently do not print out advice map entries (but we do print the constants we generate to represent the keys). Not only does this mean pretty-printed modules don't render 1:1 with the original MASM, but they don't even contain all of the items (i.e. the actual advice map entries). This is basically just an artifact of how we're handling advice map entries today though.

After this PR is merged with the changes I described in my other comment - I think we can refactor things to skip generating the keys as separate `Constant` items, and instead resolve references to the keys (as constants) to the corresponding `AdviceMapEntry` item now that we'll have them in the AST. This would make `AdviceMapEntry` items proper items with associated symbols, and bring advice map entries into alignment with other module items.

_Originally posted by @bitwalker in https://github.com/0xMiden/miden-vm/pull/2563#discussion_r2677187354_

贡献指南

打开贡献指南

调研方向

Look at the AST representation of modules in the codebase, focusing on how advice map entries are currently handled versus other module items like constants. Examine the pretty-printing logic for modules to understand why advice map entries are omitted. The goal is to refactor so advice map entries become proper items with symbols, aligning them with other module items and ensuring pretty-printed modules match the original MASM.

由索引模型根据 Issue 内容生成。

评估

技术栈
rust
领域
compilers
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。