Skip to content

Add _PyFrame_NumSlotsForCodeObject() #100720

Closed
@iritkatriel

Description

@iritkatriel

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

Activity

self-assigned this
on Jan 3, 2023
added a commit that references this issue on Jan 3, 2023

pythongh-100720: refactor calculation of number of frame slots for a …

changed the title Add _PyCode_GetNumFrameSlots() Add _PyFrame_NumSlotsForCodeObject() on Jan 4, 2023
added a commit that references this issue on Jan 4, 2023

gh-100720: refactor calculation of number of frame slots for a code o…

c31e356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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

    Add _PyFrame_NumSlotsForCodeObject() · Issue #100720 · python/cpython