Skip to content

Commit

Permalink
pythongh-110020: Fix unused variable warnings in bytecodes.c
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Sep 28, 2023
1 parent 0baf726 commit e5c7cf7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
9 changes: 3 additions & 6 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2023,8 +2023,7 @@ dummy_func(
}

op(_GUARD_DORV_VALUES, (owner -- owner)) {
PyTypeObject *tp = Py_TYPE(owner);
assert(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT);
assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
PyDictOrValues dorv = *_PyObject_DictOrValuesPointer(owner);
DEOPT_IF(!_PyDictOrValues_IsValues(dorv), STORE_ATTR);
}
Expand Down Expand Up @@ -2789,8 +2788,7 @@ dummy_func(
}

op(_GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, (owner -- owner)) {
PyTypeObject *owner_cls = Py_TYPE(owner);
assert(owner_cls->tp_flags & Py_TPFLAGS_MANAGED_DICT);
assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
PyDictOrValues *dorv = _PyObject_DictOrValuesPointer(owner);
DEOPT_IF(!_PyDictOrValues_IsValues(*dorv) &&
!_PyObject_MakeInstanceAttributesFromDict(owner, dorv),
Expand Down Expand Up @@ -2823,8 +2821,7 @@ dummy_func(

op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self if (1))) {
assert(oparg & 1);
PyTypeObject *owner_cls = Py_TYPE(owner);
assert(owner_cls->tp_dictoffset == 0);
assert(Py_TYPE(owner)->tp_dictoffset == 0);
STAT_INC(LOAD_ATTR, hit);
assert(descr != NULL);
assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR));
Expand Down
9 changes: 3 additions & 6 deletions Python/executor_cases.c.h

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

9 changes: 3 additions & 6 deletions Python/generated_cases.c.h

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

0 comments on commit e5c7cf7

Please sign in to comment.