Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove LOAD_ATTR_MUTABLE_CLASS_DESCRIPTOR
  • Loading branch information
Fidget-Spinner committed Jun 16, 2022
commit 3d5d5fd4832cfdb9e7b6a350548be1eefdf1353f
27 changes: 13 additions & 14 deletions Include/internal/pycore_opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 29 additions & 30 deletions Include/opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Lib/opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def jabs_op(name, op):
"LOAD_ATTR_ADAPTIVE",
# These potentially push [NULL, bound method] onto the stack.
"LOAD_ATTR_CLASS",
"LOAD_ATTR_CLASS_MUTABLE_DESCRIPTOR",
"LOAD_ATTR_INSTANCE_VALUE",
"LOAD_ATTR_MODULE",
"LOAD_ATTR_PROPERTY",
Expand Down
27 changes: 0 additions & 27 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -3649,33 +3649,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
NOTRACE_DISPATCH();
}

TARGET(LOAD_ATTR_CLASS_MUTABLE_DESCRIPTOR) {
assert(cframe.use_tracing == 0);
_PyLoadMethodCache *cache = (_PyLoadMethodCache *)next_instr;

PyObject *cls = TOP();
DEOPT_IF(!PyType_Check(cls), LOAD_ATTR);
uint32_t type_version = read_u32(cache->type_version);
DEOPT_IF(((PyTypeObject *)cls)->tp_version_tag != type_version,
LOAD_ATTR);
assert(type_version != 0);
PyObject *descr = read_obj(cache->descr);
descrgetfunc get = Py_TYPE(descr)->tp_descr_get;
DEOPT_IF(get == NULL, LOAD_ATTR);
STAT_INC(LOAD_ATTR, hit);
PyObject *res = get(descr, NULL, cls);
if (res == NULL) {
goto error;
}
assert(res != NULL);
SET_TOP(NULL);
STACK_GROW((oparg & 1));
SET_TOP(res);
Py_DECREF(cls);
JUMPBY(INLINE_CACHE_ENTRIES_LOAD_ATTR);
NOTRACE_DISPATCH();
}

TARGET(LOAD_ATTR_PROPERTY) {
assert(cframe.use_tracing == 0);
_PyLoadMethodCache *cache = (_PyLoadMethodCache *)next_instr;
Expand Down
24 changes: 12 additions & 12 deletions Python/opcode_targets.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading