8000 gh-105481: expose opcode metadata via the _opcode module by iritkatriel · Pull Request #106688 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105481: expose opcode metadata via the _opcode module #106688

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 10 commits into from
Jul 14, 2023
Prev Previous commit
Next Next commit
compile.c needs metadata, flowgraph doesn't
  • Loading branch information
iritkatriel committed Jul 12, 2023
commit ba367b2ad265e03ca037031bed41a4eace592821
2 changes: 2 additions & 0 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#include "pycore_pystate.h" // _Py_GetConfig()
#include "pycore_symtable.h" // PySTEntryObject, _PyFuture_FromAST()

#define NEED_OPCODE_METADATA
#include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
#undef NEED_OPCODE_METADATA

#define COMP_GENEXP 0
#define COMP_LISTCOMP 1
Expand Down
4 changes: 1 addition & 3 deletions Python/flowgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()

#include "pycore_opcode_utils.h"
#define NEED_OPCODE_METADATA
#include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
#undef NEED_OPCODE_METADATA
#include "pycore_opcode_metadata.h" // OPCODE_HAS_ARG, etc


#undef SUCCESS
Expand Down
0