Skip to content

Conversation

@da-woods
Copy link
Contributor

The idea is that all lookups for the module state go through __PYX_GET_MODULE_STATE() and the code generation no longer needs to care about what type of lookup it might be (so doesn't need to know anything about the scope).

At the start of each function we create a temporary definition for __PYX_GET_MODULE_STATE() using one of a number of mechanisms depending on what information is available in the scope.


The is very much a draft - I've only tested that it compiled on a single file so I complete expect it to fail. It's more a request for comments on the general approach.

The idea is that all lookups for the module state go through
`__PYX_GET_MODULE_STATE()` and the code generation no longer
needs to care about what type of lookup it might be (so doesn't
need to know anything about the scope).

At the start of each function we create a temporary definition
for __PYX_GET_MODULE_STATE() using one of a number of
mechanisms depending on what information is available in the scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant