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
Address review comments
  • Loading branch information
markshannon committed Jun 18, 2023
commit 4f4de5f3cac12a2bc0135222f8df78b0486aecb3
13 changes: 7 additions & 6 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2911,14 +2911,15 @@ dummy_func(
_PyCallCache *cache = (_PyCallCache *)next_instr;
DEOPT_IF(null != NULL, CALL);
DEOPT_IF(!PyType_Check(callable), CALL);
PyHeapTypeObject *tp = (PyHeapTypeObject *)callable;
DEOPT_IF(tp->ht_type.tp_version_tag != read_u32(cache->func_version), CALL);
PyFunctionObject *init = (PyFunctionObject *)tp->_spec_cache.init;
PyTypeObject *tp = (PyTypeObject *)callable;
DEOPT_IF(tp->tp_version_tag != read_u32(cache->func_version), CALL);
PyHeapTypeObject *cls = (PyHeapTypeObject *)callable;
PyFunctionObject *init = (PyFunctionObject *)cls->_spec_cache.init;
PyCodeObject *code = (PyCodeObject *)init->func_code;
DEOPT_IF(!_PyThreadState_HasStackSpace(tstate, code->co_framesize + FRAME_SPECIALS_SIZE + 2), CALL);
STAT_INC(CALL, hit);
DEOPT_IF(code->co_argcount != oparg+1, CALL);
Comment thread
markshannon marked this conversation as resolved.
PyObject *self = _PyType_NewManagedObject(&tp->ht_type);
DEOPT_IF(!_PyThreadState_HasStackSpace(tstate, code->co_framesize + _Py_InitCleanup.co_framesize), CALL);
STAT_INC(CALL, hit);
PyObject *self = _PyType_NewManagedObject(tp);
if (self == NULL) {
goto error;
}
Expand Down
Loading