diff options
| author | Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | 2021-07-16 23:49:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-17 00:49:35 +0900 |
| commit | e9cd47d0e58cd468d6482d7ba59730b134d0d521 (patch) | |
| tree | 5d68df9c8d44d121d3af2a6338c42a237e472007 | |
| parent | 9af34c935185eca497617a216d141c72ffaeae9c (diff) | |
| download | cpython-git-e9cd47d0e58cd468d6482d7ba59730b134d0d521.tar.gz | |
Remove legacy opcache structs (GH-27164)
| -rw-r--r-- | Include/cpython/code.h | 2 | ||||
| -rw-r--r-- | Include/internal/pycore_code.h | 23 | ||||
| -rw-r--r-- | Objects/codeobject.c | 2 |
3 files changed, 1 insertions, 26 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h index 8c00eb90bf..b232f80367 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -23,8 +23,6 @@ typedef uint16_t _Py_CODEUNIT; # define _Py_MAKECODEUNIT(opcode, oparg) ((opcode)|((oparg)<<8)) #endif -typedef struct _PyOpcache _PyOpcache; - /* Bytecode object */ struct PyCodeObject { diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 06a8b1b1e7..bc46976367 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -4,29 +4,6 @@ extern "C" { #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 * Specialization and quickening structs and helper functions */ diff --git a/Objects/codeobject.c b/Objects/codeobject.c index a5120ec01f..3dc9fd787f 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -4,7 +4,7 @@ #include "code.h" #include "opcode.h" #include "structmember.h" // PyMemberDef -#include "pycore_code.h" // _PyOpcache +#include "pycore_code.h" // _PyCodeConstructor #include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs #include "pycore_pystate.h" // _PyInterpreterState_GET() #include "pycore_tuple.h" // _PyTuple_ITEMS() |
