0xMiden / 0xMiden/miden-vm

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

Đang mở
#2,566 3 bình luận 0 reaction 2 người được giao Được @mooori nhận Xem trên GitHub
assembly
Ngôn ngữ chính
Rust
Star
772
Fork
352
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
84

Mô tả

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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
compilers
Loại issue
Tái cấu trúc
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.