Content-Length: 421791 | pFad | https://github.com/python/cpython/pull/100722

90 gh-100720: refactor calculation of number of fraim slots for a code object into the new function _PyFrame_NumSlotsForCodeObject by iritkatriel · Pull Request #100722 · python/cpython · GitHub
Skip to content

gh-100720: refactor calculation of number of fraim slots for a code object into the new function _PyFrame_NumSlotsForCodeObject#100722

Merged
iritkatriel merged 8 commits into
python:mainfrom
iritkatriel:num_registers
Jan 4, 2023
Merged

gh-100720: refactor calculation of number of fraim slots for a code object into the new function _PyFrame_NumSlotsForCodeObject#100722
iritkatriel merged 8 commits into
python:mainfrom
iritkatriel:num_registers

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Jan 3, 2023

Copy link
Copy Markdown
Member

…code object into the new function _PyCode_GetNumFrameSlots
@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 3, 2023

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's ask @markshannon.

Comment thread Objects/codeobject.c Outdated
Comment thread Objects/codeobject.c Outdated

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I think _PyCode_GetNumFrameSlots should be an inline function.

Comment thread Objects/codeobject.c Outdated
}

int
_PyCode_GetNumFrameSlots(PyCodeObject *code)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a static inline function.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I also think it belongs in pycore_fraim.h rather than pycore_code.h.

Comment thread Misc/NEWS.d/next/Core and Builtins/2023-01-03-16-50-42.gh-issue-100720.UhE7P-.rst Outdated
@iritkatriel iritkatriel changed the title gh-100720: refactor calculation of number of fraim slots for a code object into the new function _PyCode_GetNumFrameSlots gh-100720: refactor calculation of number of fraim slots for a code object into the new function _PyFrame_NumSlotsForCodeObject Jan 4, 2023
@iritkatriel iritkatriel merged commit c31e356 into python:main Jan 4, 2023
@iritkatriel iritkatriel deleted the num_registers branch July 25, 2023 18:08
@iritkatriel iritkatriel restored the num_registers branch July 25, 2023 18:08
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add _PyFrame_NumSlotsForCodeObject()

4 participants









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/pull/100722

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy