Remove legacy opcache structs (GH-27164)
This commit is contained in:
parent
9af34c9351
commit
e9cd47d0e5
@ -23,8 +23,6 @@ typedef uint16_t _Py_CODEUNIT;
|
|||||||
# define _Py_MAKECODEUNIT(opcode, oparg) ((opcode)|((oparg)<<8))
|
# define _Py_MAKECODEUNIT(opcode, oparg) ((opcode)|((oparg)<<8))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _PyOpcache _PyOpcache;
|
|
||||||
|
|
||||||
|
|
||||||
/* Bytecode object */
|
/* Bytecode object */
|
||||||
struct PyCodeObject {
|
struct PyCodeObject {
|
||||||
|
@ -4,29 +4,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Legacy Opcache */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
PyObject *ptr; /* Cached pointer (borrowed reference) */
|
|
||||||
uint64_t globals_ver; /* ma_version of global dict */
|
|
||||||
uint64_t builtins_ver; /* ma_version of builtin dict */
|
|
||||||
} _PyOpcache_LoadGlobal;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
PyTypeObject *type;
|
|
||||||
Py_ssize_t hint;
|
|
||||||
unsigned int tp_version_tag;
|
|
||||||
} _PyOpCodeOpt_LoadAttr;
|
|
||||||
|
|
||||||
struct _PyOpcache {
|
|
||||||
union {
|
|
||||||
_PyOpcache_LoadGlobal lg;
|
|
||||||
_PyOpCodeOpt_LoadAttr la;
|
|
||||||
} u;
|
|
||||||
char optimized;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* PEP 659
|
/* PEP 659
|
||||||
* Specialization and quickening structs and helper functions
|
* Specialization and quickening structs and helper functions
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include "code.h"
|
#include "code.h"
|
||||||
#include "opcode.h"
|
#include "opcode.h"
|
||||||
#include "structmember.h" // PyMemberDef
|
#include "structmember.h" // PyMemberDef
|
||||||
#include "pycore_code.h" // _PyOpcache
|
#include "pycore_code.h" // _PyCodeConstructor
|
||||||
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
|
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
|
||||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||||
#include "pycore_tuple.h" // _PyTuple_ITEMS()
|
#include "pycore_tuple.h" // _PyTuple_ITEMS()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user