mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Check in my ultra-shortlived patch #597220.
Move some debugging checks inside Py_DEBUG. They were causing cache misses according to cachegrind.
This commit is contained in:
parent
c66ff4441e
commit
69734a5272
1 changed files with 3 additions and 3 deletions
|
@ -238,13 +238,13 @@ PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals,
|
|||
if (builtin_object == NULL)
|
||||
return NULL;
|
||||
}
|
||||
if ((back != NULL && !PyFrame_Check(back)) ||
|
||||
code == NULL || !PyCode_Check(code) ||
|
||||
globals == NULL || !PyDict_Check(globals) ||
|
||||
#ifdef Py_DEBUG
|
||||
if (code == NULL || globals == NULL || !PyDict_Check(globals) ||
|
||||
(locals != NULL && !PyDict_Check(locals))) {
|
||||
PyErr_BadInternalCall();
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
ncells = PyTuple_GET_SIZE(code->co_cellvars);
|
||||
nfrees = PyTuple_GET_SIZE(code->co_freevars);
|
||||
extras = code->co_stacksize + code->co_nlocals + ncells + nfrees;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue