8000 Remove legacy opcache structs (GH-27164) · python/cpython@e9cd47d · GitHub
[go: up one dir, main page]

Skip to content

Commit e9cd47d

Browse files
Remove legacy opcache structs (GH-27164)
1 parent 9af34c9 commit e9cd47d

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

Include/cpython/code.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ typedef uint16_t _Py_CODEUNIT;
2323
# define _Py_MAKECODEUNIT(opcode, oparg) ((opcode)|((oparg)<<8))
2424
#endif
2525

26-
typedef struct _PyOpcache _PyOpcache;
27-
2826

2927
/* Bytecode object */
3028
struct PyCodeObject {

Include/internal/pycore_code.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,6 @@
44
extern "C" {
55
#endif
66

7-
/* Legacy Opcache */
8-
9-
typedef struct {
10-
PyObject *ptr; /* Cached pointer (borrowed reference) */
11-
uint64_t globals_ver; /* ma_version of global dict */
12-
uint64_t builtins_ver; /* ma_version of builtin dict */
13-
} _PyOpcache_LoadGlobal;
14-
15-
typedef struct {
16-
PyTypeObject *type;
17-
Py_ssize_t hint;
18-
unsigned int tp_version_tag;
19-
} _PyOpCodeOpt_LoadAttr;
20-
21-
struct _PyOpcache {
22-
union {
23-
_PyOpcache_LoadGlobal lg;
24-
_PyOpCodeOpt_LoadAttr la;
25-
} u;
26-
char optimized;
27-
};
28-
29-
307
/* PEP 659
318
* Specialization and quickening structs and helper functions
329
*/

Objects/codeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "code.h"
55
#include "opcode.h"
66
#include "structmember.h" // PyMemberDef
7-
#include "pycore_code.h" // _PyOpcache
7+
#include "pycore_code.h" // _PyCodeConstructor
88
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
99
#include "pycore_pystate.h" // _PyInterpreterState_GET()
1010
#include "pycore_tuple.h" // _PyTuple_ITEMS()

0 commit comments

Comments
 (0)
0