Improve interface between compiler and symtable
Đang mở
Chưa có ai nhận issue này.
interpreter-core
type-feature
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
In this issue I want to try and improve the interface between the compiler and the symtable.
Problems I see are:
- the compiler modifies the symtable
- the compiler performs calculations that the symtable could do (such as in
push_inlined_comprehension_state) - the symtable is actually not a correct representation of some scopes, like those of inlined comprehensions (the comprehension scope it removed from the symtable tree, but is still access from the compiler via the symtable dict). Exception handlers are another example of scope changes that the compiler does, which are not reflected in the symtable.
Linked PRs
- gh-122986
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách đọc các phần triển khai của compiler và symtable, tập trung vào push_inlined_comprehension_state cũng như cách xử lý inlined comprehensions và các exception handler. Công việc được xem là hoàn tất khi thiết lập được một giao diện rõ ràng hơn, trong đó compiler không sửa đổi symtable, các phép tính thuộc về symtable được chuyển vào đó và các thay đổi về scope được biểu diễn nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- compilers
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 15/100