Improve interface between compiler and symtable
未關閉
還沒有人認領這個 Issue。
interpreter-core
type-feature
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先閱讀 compiler 和 symtable 的實作,重點關注 push_inlined_comprehension_state,以及對 inlined comprehensions 和例外處理常式的處理。完成的標準是建立一個更清晰的介面,使 compiler 不修改 symtable,將由 symtable 負責的計算移到其中,並以一致的方式表示作用域變更。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- compilers
- Issue 類型
- 重構
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 15/100