]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove legacy opcache structs (GH-27164)
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Fri, 16 Jul 2021 15:49:35 +0000 (23:49 +0800)
committerGitHub <noreply@github.com>
Fri, 16 Jul 2021 15:49:35 +0000 (00:49 +0900)
Include/cpython/code.h
Include/internal/pycore_code.h
Objects/codeobject.c

index 8c00eb90bf0af8341189dbd59b8601ffe9dc8d6f..b232f80367e7724d73d72f36d3f1a8d9aa0e6334 100644 (file)
@@ -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 {
index 06a8b1b1e7df325ee00457db56107b59769f3f51..bc469763670d4ee901ee57457093c84a14014cc9 100644 (file)
@@ -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
  */
index a5120ec01f5cb0873ee6d03c9618e96c0f63f679..3dc9fd787f3859f8183805d54858780fcadca9bc 100644 (file)
@@ -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()