-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-43693: Add _PyCode_New() and do some related cleanup. #26258
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
ericsnowcurrently
wants to merge
44
commits into
python:main
from
ericsnowcurrently:code-object-cleanup
Closed
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
dce5124
Re-organize the _PyCodeObject fields.
ericsnowcurrently e416918
Spell out the PyCode_New*() signatures.
ericsnowcurrently 6740572
Add a TODO to code.h.
ericsnowcurrently 4381869
Fix a memory leak.
ericsnowcurrently 19cfb8b
Add _PyCode_New().
ericsnowcurrently 8f10f5d
Factor out _PyCode_GetFastlocalOffsetId().
ericsnowcurrently 0c42221
Factor out _PyCode_HasFastlocals().
ericsnowcurrently 3315b28
Factor out _PyCode_CellForLocal().
ericsnowcurrently 2ac48ba
Add macros to hide away some of the PyCodeObject fields.
ericsnowcurrently 02e15a4
Move the fast locals section down.
ericsnowcurrently ad70f99
Store more counts on PyCodeObject.
ericsnowcurrently e38643f
Update a comment.
ericsnowcurrently 09fbe71
Factor out macros related to co_code.
ericsnowcurrently 9b4ca77
Fix some smelly names.
ericsnowcurrently f00133f
Fix whitespace.
ericsnowcurrently acef742
Fix co_nlocals in code.replace().
ericsnowcurrently 559e408
Stop using statics in PyCode_NewEmpty().
ericsnowcurrently a923b5b
Actually fix whitespace.
ericsnowcurrently afcc944
Fix a typo.
ericsnowcurrently d304aba
Replace macros with inline functions.
ericsnowcurrently 23e5485
Unify all the PyCodeObject validation code.
ericsnowcurrently 81c4a49
Fix the logged function name.
ericsnowcurrently af51553
Fix the GDB script.
ericsnowcurrently cc3f435
-_PyCode_GetFastlocalOffsetId -> _PyCode_FastOffsetFromId().
ericsnowcurrently fcf4ea3
Fix CO_FAST_KWONLY.
ericsnowcurrently cb82a6a
Fix a typo.
ericsnowcurrently 672a75f
Make sure int is used for fast offsets and PyCodeObject counts.
ericsnowcurrently 32907b1
Fix the comment about fields in hash/comparision.
ericsnowcurrently aee3640
Drop co_nlocals from marshaled code objects.
ericsnowcurrently fd50f62
Regen a couple more files.
ericsnowcurrently 9736ff5
Fix test_ctypes.
ericsnowcurrently c95314c
Factor out CO_FAST_ARG.
ericsnowcurrently b419060
Fix a typo.
ericsnowcurrently 6195184
Add an assert for the return value of frame_nslots().
ericsnowcurrently 3c4ec94
Add a comment about using an arguments struct for _PyCode_New().
ericsnowcurrently ffc4b54
Drop some outdated TODO comments.
ericsnowcurrently 292b646
Fix a typo.
ericsnowcurrently cd9e34a
Add _PyCode_FastInfoFromOffset().
ericsnowcurrently cd4f587
Add _PyCode_GetFastFreevar().
ericsnowcurrently a4e6dd3
Use _PyCode_FastInfoFromOffset() elsewhere in ceval.c.
ericsnowcurrently f93b6df
Add _PyCode_OffsetFromIndex().
ericsnowcurrently f779627
_PyCode_FastInfoFromOffset() -> _PyCode_FastInfoFromOparg().
ericsnowcurrently 292e457
Add _PyCode_FastInfoFromOffset() and use it in frameobject.c.
ericsnowcurrently f6bafb4
Fix warnings.
ericsnowcurrently File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add an assert for the return value of frame_nslots().
- Loading branch information
commit 6195184a64208df233c320d327f23b10dec41f89
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see it is just misnamed, and the comment is misleading. Cell and free variables are also included.