Skip to content

Improve interface between compiler and symtable #122985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
iritkatriel opened this issue Aug 13, 2024 · 1 comment
Open

Improve interface between compiler and symtable #122985

iritkatriel opened this issue Aug 13, 2024 · 1 comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Aug 13, 2024

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

@iritkatriel
Copy link
Member Author

See #124697 re inlined comprehensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants