mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-127705: Use _PyStackRef
s in the default build. (GH-127875)
This commit is contained in:
parent
7cc99a54b7
commit
2bef8ea8ea
21 changed files with 688 additions and 254 deletions
|
@ -1488,11 +1488,11 @@ mark_stacks(PyInterpreterState *interp, PyGC_Head *visited, int visited_space, b
|
|||
objects_marked += move_to_reachable(func, &reachable, visited_space);
|
||||
while (sp > locals) {
|
||||
sp--;
|
||||
if (PyStackRef_IsNull(*sp)) {
|
||||
PyObject *op = PyStackRef_AsPyObjectBorrow(*sp);
|
||||
if (op == NULL || _Py_IsImmortal(op)) {
|
||||
continue;
|
||||
}
|
||||
PyObject *op = PyStackRef_AsPyObjectBorrow(*sp);
|
||||
if (!_Py_IsImmortal(op) && _PyObject_IS_GC(op)) {
|
||||
if (_PyObject_IS_GC(op)) {
|
||||
PyGC_Head *gc = AS_GC(op);
|
||||
if (_PyObject_GC_IS_TRACKED(op) &&
|
||||
gc_old_space(gc) != visited_space) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue