Skip to content

Improve interface between compiler and symtable #122985

Open
@iritkatriel

Description

@iritkatriel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions