8000 bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. by ericsnowcurrently · Pull Request #26388 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. #26388

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

Merged
merged 31 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a5edf53
Add co_fastlocalnames and co_fastlocalkinds.
ericsnowcurrently May 20, 2021
3cf1539
Populate the fast locals info first.
ericsnowcurrently May 26, 2021
3f11732
Allow co_varnames and friends to be NULL.
ericsnowcurrently May 21, 2021
a492565
Update the import magic number.
ericsnowcurrently May 21, 2021
0ff263e
Regen a couple more files.
ericsnowcurrently May 22, 2021
90f4e8a
Add a NEWS entry.
ericsnowcurrently May 22, 2021
ee10bb3
Fix the arg-is-cell case.
ericsnowcurrently May 24, 2021
861f90c
Use int for counts instead of Py_ssize_t.
ericsnowcurrently May 25, 2021
4d97056
Switch co_fastlocalkinds to a variable length array.
ericsnowcurrently May 25, 2021
f67e7eb
Fix a "smelly" symbol.
ericsnowcurrently May 26, 2021
c5d0ad2
Fix PyFrame_FastToLocals() and PyFrame_LocalsToFast().
ericsnowcurrently May 26, 2021
b9a975c
Fix a typo.
ericsnowcurrently May 26, 2021
3b01a5f
Regen other files.
ericsnowcurrently May 26, 2021
19465f4
Fix the gdb script.
ericsnowcurrently May 26, 2021
93c3568
lint
ericsnowcurrently May 26, 2021
8000
418da97
Expose co_fastlocalnames to Python code.
ericsnowcurrently May 27, 2021
9de74bd
Update the dis docs.
ericsnowcurrently May 27, 2021
e50e286
Use co_fastlocalnames in the dis module.
ericsnowcurrently May 27, 2021
f0fda39
Fix some comments.
ericsnowcurrently May 27, 2021
361ca0a
Drop "inline" from some big functions.
ericsnowcurrently May 27, 2021
bbdaada
Clarify that we only look through the free vars in super_init_without…
ericsnowcurrently May 27, 2021
8c100d9
Clarify about the case where a "fast" arg is also a cell.
ericsnowcurrently May 27, 2021
505536e
Use a private getter function for co_fastlocalnames instead of a prop…
ericsnowcurrently May 27, 2021
885e435
Drop the arg-related flags.
ericsnowcurrently Jun 2, 2021
29e1c2a
Leave the bottom numbers for locals kinds.
ericsnowcurrently Jun 2, 2021
235e4aa
"fastlocal" -> "localsplus"
ericsnowcurrently Jun 2, 2021
13fe60d
Add a note about "locals plus" and variable kinds.
ericsnowcurrently Jun 2, 2021
fba56f5
co._get_localsplusnames() -> co._varname_from_oparg()
ericsnowcurrently Jun 2, 2021
68c7776
Fix the gdb hooks.
ericsnowcurrently Jun 2, 2021
e10e7da
Be more strict about types.
ericsnowcurrently Jun 3, 2021
87cb192
Add a TODO about "_PyCodeConstructor.argcount".
ericsnowcurrently Jun 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Drop the arg-related flags.
  • Loading branch information
ericsnowcurrently committed Jun 3, 2021
commit 885e43584f95745b89e6e207c4e659ee02882fd5
16 changes: 3 additions & 13 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,9 @@ struct _PyOpcache {
// We would use an enum if C let us specify the storage type.
typedef unsigned char _PyFastLocalKind;
// Note that these all fit within _PyFastLocalKind, as do combinations.
#define CO_FAST_POSONLY 0x01
#define CO_FAST_POSORKW 0x02
#define CO_FAST_VARARGS 0x04
#define CO_FAST_KWONLY 0x08
#define CO_FAST_VARKWARGS 0x10
#define CO_FAST_LOCALONLY 0x20
#define CO_FAST_CELL 0x40
#define CO_FAST_FREE 0x80

#define CO_FAST_ARG (CO_FAST_POSONLY | CO_FAST_POSORKW | CO_FAST_VARARGS | \
CO_FAST_KWONLY | CO_FAST_VARKWARGS)
#define CO_FAST_LOCAL (CO_FAST_ARG | CO_FAST_LOCALONLY)
#define CO_FAST_ANY (CO_FAST_LOCAL | CO_FAST_CELL | CO_FAST_FREE)
#define CO_FAST_LOCAL 0x01
#define CO_FAST_CELL 0x40
#define CO_FAST_FREE 0x80

typedef _PyFastLocalKind *_PyFastLocalKinds;

Expand Down
Loading
0