Skip to content

Add _PyFrame_NumSlotsForCodeObject() #100720

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

Closed
iritkatriel opened this issue Jan 3, 2023 · 0 comments · Fixed by #100722
Closed

Add _PyFrame_NumSlotsForCodeObject() #100720

iritkatriel opened this issue Jan 3, 2023 · 0 comments · Fixed by #100722
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Jan 3, 2023

The calculation of how many slots need to be in the frame of a given code object is repeated in a number of places in the codebase, which makes it error prone to try and change the frame layout. It should be refactored into a single place.

(lessons learnt from the register machine experiment).

Linked PRs

@iritkatriel iritkatriel added type-feature A feature request or enhancement interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jan 3, 2023
@iritkatriel iritkatriel self-assigned this Jan 3, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Jan 3, 2023
…code object into the new function _PyCode_GetNumFrameSlots
@iritkatriel iritkatriel changed the title Add _PyCode_GetNumFrameSlots() Add _PyFrame_NumSlotsForCodeObject() Jan 4, 2023
iritkatriel added a commit that referenced this issue Jan 4, 2023
…bject into the new function _PyFrame_NumSlotsForCodeObject (#100722)
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
1 participant