Coverage Report

Created: 2022-07-08 09:39

/home/mdboom/Work/builds/cpython/Include/internal/pycore_object.h
Line
Count
Source (jump to first uncovered line)
1
#ifndef Py_INTERNAL_OBJECT_H
2
#define Py_INTERNAL_OBJECT_H
3
#ifdef __cplusplus
4
extern "C" {
5
#endif
6
7
#ifndef Py_BUILD_CORE
8
#  error "this header requires Py_BUILD_CORE define"
9
#endif
10
11
#include <stdbool.h>
12
#include "pycore_gc.h"            // _PyObject_GC_IS_TRACKED()
13
#include "pycore_interp.h"        // PyInterpreterState.gc
14
#include "pycore_pystate.h"       // _PyInterpreterState_GET()
15
#include "pycore_runtime.h"       // _PyRuntime
16
17
#define _PyObject_IMMORTAL_INIT(type) \
18
    { \
19
        .ob_refcnt = 999999999, \
20
        .ob_type = (type), \
21
    }
22
#define _PyVarObject_IMMORTAL_INIT(type, size) \
23
    { \
24
        .ob_base = _PyObject_IMMORTAL_INIT(type), \
25
        .ob_size = size, \
26
    }
27
28
PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalRefcountErrorFunc(
29
    const char *func,
30
    const char *message);
31
32
#define _Py_FatalRefcountError(message) \
33
    _Py_FatalRefcountErrorFunc(__func__, (message))
34
35
static inline void
36
_Py_DECREF_SPECIALIZED(PyObject *op, const destructor destruct)
37
{
38
    _Py_DECREF_STAT_INC();
39
#ifdef Py_REF_DEBUG
40
    _Py_RefTotal--;
41
#endif
42
    if (--op->ob_refcnt != 0) {
  Branch (42:9): [True: 9.89k, False: 14.0M]
  Branch (42:9): [True: 7, False: 178]
43
        assert(op->ob_refcnt > 0);
44
    }
45
    else {
46
#ifdef Py_TRACE_REFS
47
        _Py_ForgetReference(op);
48
#endif
49
        destruct(op);
50
    }
51
}
Unexecuted instantiation: abstract.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: boolobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: bytearrayobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: bytesobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: call.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: cellobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: classobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: complexobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: descrobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: enumobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: exceptions.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: genericaliasobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: genobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: floatobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: frameobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: funcobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: iterobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: listobject.c:_Py_DECREF_SPECIALIZED
longobject.c:_Py_DECREF_SPECIALIZED
Line
Count
Source
37
{
38
    _Py_DECREF_STAT_INC();
39
#ifdef Py_REF_DEBUG
40
    _Py_RefTotal--;
41
#endif
42
    if (--op->ob_refcnt != 0) {
  Branch (42:9): [True: 9.89k, False: 14.0M]
43
        assert(op->ob_refcnt > 0);
44
    }
45
    else {
46
#ifdef Py_TRACE_REFS
47
        _Py_ForgetReference(op);
48
#endif
49
        destruct(op);
50
    }
51
}
Unexecuted instantiation: dictobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: odictobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: memoryobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: methodobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: moduleobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: object.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: setobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: sliceobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: structseq.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: tupleobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: typeobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: unicodeobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: unionobject.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: weakrefobject.c:_Py_DECREF_SPECIALIZED
bltinmodule.c:_Py_DECREF_SPECIALIZED
Line
Count
Source
37
{
38
    _Py_DECREF_STAT_INC();
39
#ifdef Py_REF_DEBUG
40
    _Py_RefTotal--;
41
#endif
42
    if (--op->ob_refcnt != 0) {
  Branch (42:9): [True: 7, False: 178]
43
        assert(op->ob_refcnt > 0);
44
    }
45
    else {
46
#ifdef Py_TRACE_REFS
47
        _Py_ForgetReference(op);
48
#endif
49
        destruct(op);
50
    }
51
}
Unexecuted instantiation: ceval.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: context.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: frame.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: hamt.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: pylifecycle.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: pystate.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: pythonrun.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: specialize.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: sysmodule.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: gcmodule.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: posixmodule.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: iobase.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: fileio.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: bytesio.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: bufferedio.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: textio.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: stringio.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: itertoolsmodule.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: _weakref.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: _abc.c:_Py_DECREF_SPECIALIZED
Unexecuted instantiation: _functoolsmodule.c:_Py_DECREF_SPECIALIZED
52
53
static inline void
54
_Py_DECREF_NO_DEALLOC(PyObject *op)
55
{
56
    _Py_DECREF_STAT_INC();
57
#ifdef Py_REF_DEBUG
58
    _Py_RefTotal--;
59
#endif
60
    op->ob_refcnt--;
61
#ifdef Py_DEBUG
62
    if (op->ob_refcnt <= 0) {
63
        _Py_FatalRefcountError("Expected a positive remaining refcount");
64
    }
65
#endif
66
}
Unexecuted instantiation: abstract.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: boolobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: bytearrayobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: bytesobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: call.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: cellobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: classobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: complexobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: descrobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: enumobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: exceptions.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: genericaliasobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: genobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: floatobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: frameobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: funcobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: iterobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: listobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: longobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: dictobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: odictobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: memoryobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: methodobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: moduleobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: object.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: setobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: sliceobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: structseq.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: tupleobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: typeobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: unicodeobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: unionobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: weakrefobject.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: bltinmodule.c:_Py_DECREF_NO_DEALLOC
ceval.c:_Py_DECREF_NO_DEALLOC
Line
Count
Source
55
{
56
    _Py_DECREF_STAT_INC();
57
#ifdef Py_REF_DEBUG
58
    _Py_RefTotal--;
59
#endif
60
    op->ob_refcnt--;
61
#ifdef Py_DEBUG
62
    if (op->ob_refcnt <= 0) {
63
        _Py_FatalRefcountError("Expected a positive remaining refcount");
64
    }
65
#endif
66
}
Unexecuted instantiation: context.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: frame.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: hamt.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: pylifecycle.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: pystate.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: pythonrun.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: specialize.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: sysmodule.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: gcmodule.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: posixmodule.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: iobase.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: fileio.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: bytesio.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: bufferedio.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: textio.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: stringio.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: itertoolsmodule.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: _weakref.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: _abc.c:_Py_DECREF_NO_DEALLOC
Unexecuted instantiation: _functoolsmodule.c:_Py_DECREF_NO_DEALLOC
67
68
PyAPI_FUNC(int) _PyType_CheckConsistency(PyTypeObject *type);
69
PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content);
70
71
/* Update the Python traceback of an object. This function must be called
72
   when a memory block is reused from a free list.
73
74
   Internal function called by _Py_NewReference(). */
75
extern int _PyTraceMalloc_NewReference(PyObject *op);
76
77
// Fast inlined version of PyType_HasFeature()
78
static inline int
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: abstract.c:_PyType_HasFeature
Unexecuted instantiation: boolobject.c:_PyType_HasFeature
Unexecuted instantiation: bytearrayobject.c:_PyType_HasFeature
bytesobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: call.c:_PyType_HasFeature
Unexecuted instantiation: cellobject.c:_PyType_HasFeature
Unexecuted instantiation: classobject.c:_PyType_HasFeature
complexobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: descrobject.c:_PyType_HasFeature
Unexecuted instantiation: enumobject.c:_PyType_HasFeature
Unexecuted instantiation: exceptions.c:_PyType_HasFeature
Unexecuted instantiation: genericaliasobject.c:_PyType_HasFeature
Unexecuted instantiation: genobject.c:_PyType_HasFeature
floatobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: frameobject.c:_PyType_HasFeature
Unexecuted instantiation: funcobject.c:_PyType_HasFeature
Unexecuted instantiation: iterobject.c:_PyType_HasFeature
Unexecuted instantiation: listobject.c:_PyType_HasFeature
longobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
dictobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: odictobject.c:_PyType_HasFeature
Unexecuted instantiation: memoryobject.c:_PyType_HasFeature
Unexecuted instantiation: methodobject.c:_PyType_HasFeature
Unexecuted instantiation: moduleobject.c:_PyType_HasFeature
object.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: setobject.c:_PyType_HasFeature
Unexecuted instantiation: sliceobject.c:_PyType_HasFeature
structseq.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: tupleobject.c:_PyType_HasFeature
typeobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
unicodeobject.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: unionobject.c:_PyType_HasFeature
Unexecuted instantiation: weakrefobject.c:_PyType_HasFeature
Unexecuted instantiation: bltinmodule.c:_PyType_HasFeature
Unexecuted instantiation: ceval.c:_PyType_HasFeature
Unexecuted instantiation: context.c:_PyType_HasFeature
Unexecuted instantiation: frame.c:_PyType_HasFeature
Unexecuted instantiation: hamt.c:_PyType_HasFeature
Unexecuted instantiation: pylifecycle.c:_PyType_HasFeature
Unexecuted instantiation: pystate.c:_PyType_HasFeature
Unexecuted instantiation: pythonrun.c:_PyType_HasFeature
Unexecuted instantiation: specialize.c:_PyType_HasFeature
sysmodule.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
gcmodule.c:_PyType_HasFeature
Line
Count
Source
79
_PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
80
    return ((type->tp_flags & feature) != 0);
81
}
Unexecuted instantiation: posixmodule.c:_PyType_HasFeature
Unexecuted instantiation: iobase.c:_PyType_HasFeature
Unexecuted instantiation: fileio.c:_PyType_HasFeature
Unexecuted instantiation: bytesio.c:_PyType_HasFeature
Unexecuted instantiation: bufferedio.c:_PyType_HasFeature
Unexecuted instantiation: textio.c:_PyType_HasFeature
Unexecuted instantiation: stringio.c:_PyType_HasFeature
Unexecuted instantiation: itertoolsmodule.c:_PyType_HasFeature
Unexecuted instantiation: _weakref.c:_PyType_HasFeature
Unexecuted instantiation: _abc.c:_PyType_HasFeature
Unexecuted instantiation: _functoolsmodule.c:_PyType_HasFeature
82
83
extern void _PyType_InitCache(PyInterpreterState *interp);
84
85
86
/* Inline functions trading binary compatibility for speed:
87
   _PyObject_Init() is the fast version of PyObject_Init(), and
88
   _PyObject_InitVar() is the fast version of PyObject_InitVar().
89
90
   These inline functions must not be called with op=NULL. */
91
static inline void
92
_PyObject_Init(PyObject *op, PyTypeObject *typeobj)
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 0, False: 19.0M]
  Branch (96:9): [True: 0, False: 78.5k]
  Branch (96:9): [True: 0, False: 104M]
  Branch (96:9): [True: 0, False: 152M]
  Branch (96:9): [True: 211k, False: 2.89M]
  Branch (96:9): [True: 14.4M, False: 16.8M]
  Branch (96:9): [True: 0, False: 70.4M]
  Branch (96:9): [True: 3.41M, False: 116M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: abstract.c:_PyObject_Init
Unexecuted instantiation: boolobject.c:_PyObject_Init
Unexecuted instantiation: bytearrayobject.c:_PyObject_Init
bytesobject.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 0, False: 19.0M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: call.c:_PyObject_Init
Unexecuted instantiation: cellobject.c:_PyObject_Init
Unexecuted instantiation: classobject.c:_PyObject_Init
complexobject.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 0, False: 78.5k]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: descrobject.c:_PyObject_Init
Unexecuted instantiation: enumobject.c:_PyObject_Init
Unexecuted instantiation: exceptions.c:_PyObject_Init
Unexecuted instantiation: genericaliasobject.c:_PyObject_Init
Unexecuted instantiation: genobject.c:_PyObject_Init
floatobject.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 0, False: 104M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: frameobject.c:_PyObject_Init
Unexecuted instantiation: funcobject.c:_PyObject_Init
Unexecuted instantiation: iterobject.c:_PyObject_Init
Unexecuted instantiation: listobject.c:_PyObject_Init
longobject.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 0, False: 152M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: dictobject.c:_PyObject_Init
Unexecuted instantiation: odictobject.c:_PyObject_Init
Unexecuted instantiation: memoryobject.c:_PyObject_Init
Unexecuted instantiation: methodobject.c:_PyObject_Init
Unexecuted instantiation: moduleobject.c:_PyObject_Init
object.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 211k, False: 2.89M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: setobject.c:_PyObject_Init
Unexecuted instantiation: sliceobject.c:_PyObject_Init
Unexecuted instantiation: structseq.c:_PyObject_Init
Unexecuted instantiation: tupleobject.c:_PyObject_Init
typeobject.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 14.4M, False: 16.8M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
unicodeobject.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 0, False: 70.4M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: unionobject.c:_PyObject_Init
Unexecuted instantiation: weakrefobject.c:_PyObject_Init
Unexecuted instantiation: bltinmodule.c:_PyObject_Init
Unexecuted instantiation: ceval.c:_PyObject_Init
Unexecuted instantiation: context.c:_PyObject_Init
Unexecuted instantiation: frame.c:_PyObject_Init
Unexecuted instantiation: hamt.c:_PyObject_Init
Unexecuted instantiation: pylifecycle.c:_PyObject_Init
Unexecuted instantiation: pystate.c:_PyObject_Init
Unexecuted instantiation: pythonrun.c:_PyObject_Init
Unexecuted instantiation: specialize.c:_PyObject_Init
Unexecuted instantiation: sysmodule.c:_PyObject_Init
gcmodule.c:_PyObject_Init
Line
Count
Source
93
{
94
    assert(op != NULL);
95
    Py_SET_TYPE(op, typeobj);
96
    if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE)) {
  Branch (96:9): [True: 3.41M, False: 116M]
97
        Py_INCREF(typeobj);
98
    }
99
    _Py_NewReference(op);
100
}
Unexecuted instantiation: posixmodule.c:_PyObject_Init
Unexecuted instantiation: iobase.c:_PyObject_Init
Unexecuted instantiation: fileio.c:_PyObject_Init
Unexecuted instantiation: bytesio.c:_PyObject_Init
Unexecuted instantiation: bufferedio.c:_PyObject_Init
Unexecuted instantiation: textio.c:_PyObject_Init
Unexecuted instantiation: stringio.c:_PyObject_Init
Unexecuted instantiation: itertoolsmodule.c:_PyObject_Init
Unexecuted instantiation: _weakref.c:_PyObject_Init
Unexecuted instantiation: _abc.c:_PyObject_Init
Unexecuted instantiation: _functoolsmodule.c:_PyObject_Init
101
102
static inline void
103
_PyObject_InitVar(PyVarObject *op, PyTypeObject *typeobj, Py_ssize_t size)
104
{
105
    assert(op != NULL);
106
    Py_SET_SIZE(op, size);
107
    _PyObject_Init((PyObject *)op, typeobj);
108
}
Unexecuted instantiation: abstract.c:_PyObject_InitVar
Unexecuted instantiation: boolobject.c:_PyObject_InitVar
Unexecuted instantiation: bytearrayobject.c:_PyObject_InitVar
bytesobject.c:_PyObject_InitVar
Line
Count
Source
104
{
105
    assert(op != NULL);
106
    Py_SET_SIZE(op, size);
107
    _PyObject_Init((PyObject *)op, typeobj);
108
}
Unexecuted instantiation: call.c:_PyObject_InitVar
Unexecuted instantiation: cellobject.c:_PyObject_InitVar
Unexecuted instantiation: classobject.c:_PyObject_InitVar
Unexecuted instantiation: complexobject.c:_PyObject_InitVar
Unexecuted instantiation: descrobject.c:_PyObject_InitVar
Unexecuted instantiation: enumobject.c:_PyObject_InitVar
Unexecuted instantiation: exceptions.c:_PyObject_InitVar
Unexecuted instantiation: genericaliasobject.c:_PyObject_InitVar
Unexecuted instantiation: genobject.c:_PyObject_InitVar
Unexecuted instantiation: floatobject.c:_PyObject_InitVar
Unexecuted instantiation: frameobject.c:_PyObject_InitVar
Unexecuted instantiation: funcobject.c:_PyObject_InitVar
Unexecuted instantiation: iterobject.c:_PyObject_InitVar
Unexecuted instantiation: listobject.c:_PyObject_InitVar
longobject.c:_PyObject_InitVar
Line
Count
Source
104
{
105
    assert(op != NULL);
106
    Py_SET_SIZE(op, size);
107
    _PyObject_Init((PyObject *)op, typeobj);
108
}
Unexecuted instantiation: dictobject.c:_PyObject_InitVar
Unexecuted instantiation: odictobject.c:_PyObject_InitVar
Unexecuted instantiation: memoryobject.c:_PyObject_InitVar
Unexecuted instantiation: methodobject.c:_PyObject_InitVar
Unexecuted instantiation: moduleobject.c:_PyObject_InitVar
object.c:_PyObject_InitVar
Line
Count
Source
104
{
105
    assert(op != NULL);
106
    Py_SET_SIZE(op, size);
107
    _PyObject_Init((PyObject *)op, typeobj);
108
}
Unexecuted instantiation: setobject.c:_PyObject_InitVar
Unexecuted instantiation: sliceobject.c:_PyObject_InitVar
Unexecuted instantiation: structseq.c:_PyObject_InitVar
Unexecuted instantiation: tupleobject.c:_PyObject_InitVar
typeobject.c:_PyObject_InitVar
Line
Count
Source
104
{
105
    assert(op != NULL);
106
    Py_SET_SIZE(op, size);
107
    _PyObject_Init((PyObject *)op, typeobj);
108
}
Unexecuted instantiation: unicodeobject.c:_PyObject_InitVar
Unexecuted instantiation: unionobject.c:_PyObject_InitVar
Unexecuted instantiation: weakrefobject.c:_PyObject_InitVar
Unexecuted instantiation: bltinmodule.c:_PyObject_InitVar
Unexecuted instantiation: ceval.c:_PyObject_InitVar
Unexecuted instantiation: context.c:_PyObject_InitVar
Unexecuted instantiation: frame.c:_PyObject_InitVar
Unexecuted instantiation: hamt.c:_PyObject_InitVar
Unexecuted instantiation: pylifecycle.c:_PyObject_InitVar
Unexecuted instantiation: pystate.c:_PyObject_InitVar
Unexecuted instantiation: pythonrun.c:_PyObject_InitVar
Unexecuted instantiation: specialize.c:_PyObject_InitVar
Unexecuted instantiation: sysmodule.c:_PyObject_InitVar
gcmodule.c:_PyObject_InitVar
Line
Count
Source
104
{
105
    assert(op != NULL);
106
    Py_SET_SIZE(op, size);
107
    _PyObject_Init((PyObject *)op, typeobj);
108
}
Unexecuted instantiation: posixmodule.c:_PyObject_InitVar
Unexecuted instantiation: iobase.c:_PyObject_InitVar
Unexecuted instantiation: fileio.c:_PyObject_InitVar
Unexecuted instantiation: bytesio.c:_PyObject_InitVar
Unexecuted instantiation: bufferedio.c:_PyObject_InitVar
Unexecuted instantiation: textio.c:_PyObject_InitVar
Unexecuted instantiation: stringio.c:_PyObject_InitVar
Unexecuted instantiation: itertoolsmodule.c:_PyObject_InitVar
Unexecuted instantiation: _weakref.c:_PyObject_InitVar
Unexecuted instantiation: _abc.c:_PyObject_InitVar
Unexecuted instantiation: _functoolsmodule.c:_PyObject_InitVar
109
110
111
/* Tell the GC to track this object.
112
 *
113
 * The object must not be tracked by the GC.
114
 *
115
 * NB: While the object is tracked by the collector, it must be safe to call the
116
 * ob_traverse method.
117
 *
118
 * Internal note: interp->gc.generation0->_gc_prev doesn't have any bit flags
119
 * because it's not object header.  So we don't use _PyGCHead_PREV() and
120
 * _PyGCHead_SET_PREV() for it to avoid unnecessary bitwise operations.
121
 *
122
 * See also the public PyObject_GC_Track() function.
123
 */
124
static inline void _PyObject_GC_TRACK(
125
// The preprocessor removes _PyObject_ASSERT_FROM() calls if NDEBUG is defined
126
#ifndef NDEBUG
127
    const char *filename, int lineno,
128
#endif
129
    PyObject *op)
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: abstract.c:_PyObject_GC_TRACK
Unexecuted instantiation: boolobject.c:_PyObject_GC_TRACK
bytearrayobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
bytesobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: call.c:_PyObject_GC_TRACK
cellobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
classobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: complexobject.c:_PyObject_GC_TRACK
descrobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
enumobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
exceptions.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: genericaliasobject.c:_PyObject_GC_TRACK
genobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: floatobject.c:_PyObject_GC_TRACK
frameobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
funcobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
iterobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
listobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: longobject.c:_PyObject_GC_TRACK
dictobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
odictobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
memoryobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
methodobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: moduleobject.c:_PyObject_GC_TRACK
Unexecuted instantiation: object.c:_PyObject_GC_TRACK
setobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
sliceobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
structseq.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
tupleobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
typeobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
unicodeobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
unionobject.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: weakrefobject.c:_PyObject_GC_TRACK
bltinmodule.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: ceval.c:_PyObject_GC_TRACK
context.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
frame.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
hamt.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: pylifecycle.c:_PyObject_GC_TRACK
Unexecuted instantiation: pystate.c:_PyObject_GC_TRACK
Unexecuted instantiation: pythonrun.c:_PyObject_GC_TRACK
Unexecuted instantiation: specialize.c:_PyObject_GC_TRACK
Unexecuted instantiation: sysmodule.c:_PyObject_GC_TRACK
gcmodule.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: posixmodule.c:_PyObject_GC_TRACK
Unexecuted instantiation: iobase.c:_PyObject_GC_TRACK
Unexecuted instantiation: fileio.c:_PyObject_GC_TRACK
Unexecuted instantiation: bytesio.c:_PyObject_GC_TRACK
Unexecuted instantiation: bufferedio.c:_PyObject_GC_TRACK
Unexecuted instantiation: textio.c:_PyObject_GC_TRACK
Unexecuted instantiation: stringio.c:_PyObject_GC_TRACK
itertoolsmodule.c:_PyObject_GC_TRACK
Line
Count
Source
130
{
131
    _PyObject_ASSERT_FROM(op, !_PyObject_GC_IS_TRACKED(op),
132
                          "object already tracked by the garbage collector",
133
                          filename, lineno, __func__);
134
135
    PyGC_Head *gc = _Py_AS_GC(op);
136
    _PyObject_ASSERT_FROM(op,
137
                          (gc->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0,
138
                          "object is in generation which is garbage collected",
139
                          filename, lineno, __func__);
140
141
    PyInterpreterState *interp = _PyInterpreterState_GET();
142
    PyGC_Head *generation0 = interp->gc.generation0;
143
    PyGC_Head *last = (PyGC_Head*)(generation0->_gc_prev);
144
    _PyGCHead_SET_NEXT(last, gc);
145
    _PyGCHead_SET_PREV(gc, last);
146
    _PyGCHead_SET_NEXT(gc, generation0);
147
    generation0->_gc_prev = (uintptr_t)gc;
148
}
Unexecuted instantiation: _weakref.c:_PyObject_GC_TRACK
Unexecuted instantiation: _abc.c:_PyObject_GC_TRACK
Unexecuted instantiation: _functoolsmodule.c:_PyObject_GC_TRACK
149
150
/* Tell the GC to stop tracking this object.
151
 *
152
 * Internal note: This may be called while GC. So _PyGC_PREV_MASK_COLLECTING
153
 * must be cleared. But _PyGC_PREV_MASK_FINALIZED bit is kept.
154
 *
155
 * The object must be tracked by the GC.
156
 *
157
 * See also the public PyObject_GC_UnTrack() which accept an object which is
158
 * not tracked.
159
 */
160
static inline void _PyObject_GC_UNTRACK(
161
// The preprocessor removes _PyObject_ASSERT_FROM() calls if NDEBUG is defined
162
#ifndef NDEBUG
163
    const char *filename, int lineno,
164
#endif
165
    PyObject *op)
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: abstract.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: boolobject.c:_PyObject_GC_UNTRACK
bytearrayobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
bytesobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: call.c:_PyObject_GC_UNTRACK
cellobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
classobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: complexobject.c:_PyObject_GC_UNTRACK
descrobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: enumobject.c:_PyObject_GC_UNTRACK
exceptions.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
genericaliasobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
genobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: floatobject.c:_PyObject_GC_UNTRACK
frameobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
funcobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
iterobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
listobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: longobject.c:_PyObject_GC_UNTRACK
dictobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
odictobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
memoryobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: methodobject.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: moduleobject.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: object.c:_PyObject_GC_UNTRACK
setobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
sliceobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: structseq.c:_PyObject_GC_UNTRACK
tupleobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
typeobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
unicodeobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
unionobject.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: weakrefobject.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: bltinmodule.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: ceval.c:_PyObject_GC_UNTRACK
context.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: frame.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: hamt.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: pylifecycle.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: pystate.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: pythonrun.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: specialize.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: sysmodule.c:_PyObject_GC_UNTRACK
gcmodule.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: posixmodule.c:_PyObject_GC_UNTRACK
iobase.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
fileio.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
bytesio.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
bufferedio.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
textio.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
stringio.c:_PyObject_GC_UNTRACK
Line
Count
Source
166
{
167
    _PyObject_ASSERT_FROM(op, _PyObject_GC_IS_TRACKED(op),
168
                          "object not tracked by the garbage collector",
169
                          filename, lineno, __func__);
170
171
    PyGC_Head *gc = _Py_AS_GC(op);
172
    PyGC_Head *prev = _PyGCHead_PREV(gc);
173
    PyGC_Head *next = _PyGCHead_NEXT(gc);
174
    _PyGCHead_SET_NEXT(prev, next);
175
    _PyGCHead_SET_PREV(next, prev);
176
    gc->_gc_next = 0;
177
    gc->_gc_prev &= _PyGC_PREV_MASK_FINALIZED;
178
}
Unexecuted instantiation: itertoolsmodule.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: _weakref.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: _abc.c:_PyObject_GC_UNTRACK
Unexecuted instantiation: _functoolsmodule.c:_PyObject_GC_UNTRACK
179
180
// Macros to accept any type for the parameter, and to automatically pass
181
// the filename and the filename (if NDEBUG is not defined) where the macro
182
// is called.
183
#ifdef NDEBUG
184
#  define _PyObject_GC_TRACK(op) \
185
        _PyObject_GC_TRACK(_PyObject_CAST(op))
186
#  define _PyObject_GC_UNTRACK(op) \
187
        _PyObject_GC_UNTRACK(_PyObject_CAST(op))
188
#else
189
#  define _PyObject_GC_TRACK(op) \
190
        _PyObject_GC_TRACK(__FILE__, __LINE__, _PyObject_CAST(op))
191
#  define _PyObject_GC_UNTRACK(op) \
192
        _PyObject_GC_UNTRACK(__FILE__, __LINE__, _PyObject_CAST(op))
193
#endif
194
195
#ifdef Py_REF_DEBUG
196
extern void _PyDebug_PrintTotalRefs(void);
197
#endif
198
199
#ifdef Py_TRACE_REFS
200
extern void _Py_AddToAllObjects(PyObject *op, int force);
201
extern void _Py_PrintReferences(FILE *);
202
extern void _Py_PrintReferenceAddresses(FILE *);
203
#endif
204
205
static inline PyObject **
206
_PyObject_GET_WEAKREFS_LISTPTR(PyObject *op)
207
{
208
    Py_ssize_t offset = Py_TYPE(op)->tp_weaklistoffset;
209
    return (PyObject **)((char *)op + offset);
210
}
Unexecuted instantiation: abstract.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: boolobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: bytearrayobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: bytesobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: call.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: cellobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: classobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: complexobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: descrobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: enumobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: exceptions.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: genericaliasobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: genobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: floatobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: frameobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: funcobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: iterobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: listobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: longobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: dictobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: odictobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: memoryobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: methodobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: moduleobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: object.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: setobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: sliceobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: structseq.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: tupleobject.c:_PyObject_GET_WEAKREFS_LISTPTR
typeobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Line
Count
Source
207
{
208
    Py_ssize_t offset = Py_TYPE(op)->tp_weaklistoffset;
209
    return (PyObject **)((char *)op + offset);
210
}
Unexecuted instantiation: unicodeobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: unionobject.c:_PyObject_GET_WEAKREFS_LISTPTR
weakrefobject.c:_PyObject_GET_WEAKREFS_LISTPTR
Line
Count
Source
207
{
208
    Py_ssize_t offset = Py_TYPE(op)->tp_weaklistoffset;
209
    return (PyObject **)((char *)op + offset);
210
}
Unexecuted instantiation: bltinmodule.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: ceval.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: context.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: frame.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: hamt.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: pylifecycle.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: pystate.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: pythonrun.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: specialize.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: sysmodule.c:_PyObject_GET_WEAKREFS_LISTPTR
gcmodule.c:_PyObject_GET_WEAKREFS_LISTPTR
Line
Count
Source
207
{
208
    Py_ssize_t offset = Py_TYPE(op)->tp_weaklistoffset;
209
    return (PyObject **)((char *)op + offset);
210
}
Unexecuted instantiation: posixmodule.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: iobase.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: fileio.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: bytesio.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: bufferedio.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: textio.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: stringio.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: itertoolsmodule.c:_PyObject_GET_WEAKREFS_LISTPTR
_weakref.c:_PyObject_GET_WEAKREFS_LISTPTR
Line
Count
Source
207
{
208
    Py_ssize_t offset = Py_TYPE(op)->tp_weaklistoffset;
209
    return (PyObject **)((char *)op + offset);
210
}
Unexecuted instantiation: _abc.c:_PyObject_GET_WEAKREFS_LISTPTR
Unexecuted instantiation: _functoolsmodule.c:_PyObject_GET_WEAKREFS_LISTPTR
211
212
// Fast inlined version of PyObject_IS_GC()
213
static inline int
214
_PyObject_IS_GC(PyObject *obj)
215
{
216
    return (PyType_IS_GC(Py_TYPE(obj))
217
            && 
(10.1G
Py_TYPE10.1G
(obj)->tp_is_gc == NULL10.1G
  Branch (217:17): [True: 7.91G, False: 2.21G]
218
                || 
Py_TYPE2.21G
(obj)->tp_is_gc(obj)2.21G
));
  Branch (218:20): [True: 1.78G, False: 429M]
219
}
Unexecuted instantiation: abstract.c:_PyObject_IS_GC
Unexecuted instantiation: boolobject.c:_PyObject_IS_GC
Unexecuted instantiation: bytearrayobject.c:_PyObject_IS_GC
Unexecuted instantiation: bytesobject.c:_PyObject_IS_GC
Unexecuted instantiation: call.c:_PyObject_IS_GC
Unexecuted instantiation: cellobject.c:_PyObject_IS_GC
Unexecuted instantiation: classobject.c:_PyObject_IS_GC
Unexecuted instantiation: complexobject.c:_PyObject_IS_GC
Unexecuted instantiation: descrobject.c:_PyObject_IS_GC
Unexecuted instantiation: enumobject.c:_PyObject_IS_GC
Unexecuted instantiation: exceptions.c:_PyObject_IS_GC
Unexecuted instantiation: genericaliasobject.c:_PyObject_IS_GC
Unexecuted instantiation: genobject.c:_PyObject_IS_GC
Unexecuted instantiation: floatobject.c:_PyObject_IS_GC
Unexecuted instantiation: frameobject.c:_PyObject_IS_GC
Unexecuted instantiation: funcobject.c:_PyObject_IS_GC
Unexecuted instantiation: iterobject.c:_PyObject_IS_GC
Unexecuted instantiation: listobject.c:_PyObject_IS_GC
Unexecuted instantiation: longobject.c:_PyObject_IS_GC
Unexecuted instantiation: dictobject.c:_PyObject_IS_GC
Unexecuted instantiation: odictobject.c:_PyObject_IS_GC
Unexecuted instantiation: memoryobject.c:_PyObject_IS_GC
Unexecuted instantiation: methodobject.c:_PyObject_IS_GC
Unexecuted instantiation: moduleobject.c:_PyObject_IS_GC
Unexecuted instantiation: object.c:_PyObject_IS_GC
Unexecuted instantiation: setobject.c:_PyObject_IS_GC
Unexecuted instantiation: sliceobject.c:_PyObject_IS_GC
Unexecuted instantiation: structseq.c:_PyObject_IS_GC
Unexecuted instantiation: tupleobject.c:_PyObject_IS_GC
Unexecuted instantiation: typeobject.c:_PyObject_IS_GC
Unexecuted instantiation: unicodeobject.c:_PyObject_IS_GC
Unexecuted instantiation: unionobject.c:_PyObject_IS_GC
Unexecuted instantiation: weakrefobject.c:_PyObject_IS_GC
Unexecuted instantiation: bltinmodule.c:_PyObject_IS_GC
Unexecuted instantiation: ceval.c:_PyObject_IS_GC
Unexecuted instantiation: context.c:_PyObject_IS_GC
Unexecuted instantiation: frame.c:_PyObject_IS_GC
Unexecuted instantiation: hamt.c:_PyObject_IS_GC
Unexecuted instantiation: pylifecycle.c:_PyObject_IS_GC
Unexecuted instantiation: pystate.c:_PyObject_IS_GC
Unexecuted instantiation: pythonrun.c:_PyObject_IS_GC
Unexecuted instantiation: specialize.c:_PyObject_IS_GC
Unexecuted instantiation: sysmodule.c:_PyObject_IS_GC
gcmodule.c:_PyObject_IS_GC
Line
Count
Source
215
{
216
    return (PyType_IS_GC(Py_TYPE(obj))
217
            && 
(10.1G
Py_TYPE10.1G
(obj)->tp_is_gc == NULL10.1G
  Branch (217:17): [True: 7.91G, False: 2.21G]
218
                || 
Py_TYPE2.21G
(obj)->tp_is_gc(obj)2.21G
));
  Branch (218:20): [True: 1.78G, False: 429M]
219
}
Unexecuted instantiation: posixmodule.c:_PyObject_IS_GC
Unexecuted instantiation: iobase.c:_PyObject_IS_GC
Unexecuted instantiation: fileio.c:_PyObject_IS_GC
Unexecuted instantiation: bytesio.c:_PyObject_IS_GC
Unexecuted instantiation: bufferedio.c:_PyObject_IS_GC
Unexecuted instantiation: textio.c:_PyObject_IS_GC
Unexecuted instantiation: stringio.c:_PyObject_IS_GC
Unexecuted instantiation: itertoolsmodule.c:_PyObject_IS_GC
Unexecuted instantiation: _weakref.c:_PyObject_IS_GC
Unexecuted instantiation: _abc.c:_PyObject_IS_GC
Unexecuted instantiation: _functoolsmodule.c:_PyObject_IS_GC
220
221
// Fast inlined version of PyType_IS_GC()
222
#define _PyType_IS_GC(t) _PyType_HasFeature((t), 
Py_TPFLAGS_HAVE_GC368M
)
223
224
static inline size_t
225
_PyType_PreHeaderSize(PyTypeObject *tp)
226
{
227
    return _PyType_IS_GC(tp) * sizeof(PyGC_Head) +
228
        _PyType_HasFeature(tp, Py_TPFLAGS_MANAGED_DICT) * 2 * sizeof(PyObject *);
229
}
Unexecuted instantiation: abstract.c:_PyType_PreHeaderSize
Unexecuted instantiation: boolobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: bytearrayobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: bytesobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: call.c:_PyType_PreHeaderSize
Unexecuted instantiation: cellobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: classobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: complexobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: descrobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: enumobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: exceptions.c:_PyType_PreHeaderSize
Unexecuted instantiation: genericaliasobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: genobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: floatobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: frameobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: funcobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: iterobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: listobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: longobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: dictobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: odictobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: memoryobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: methodobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: moduleobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: object.c:_PyType_PreHeaderSize
Unexecuted instantiation: setobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: sliceobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: structseq.c:_PyType_PreHeaderSize
Unexecuted instantiation: tupleobject.c:_PyType_PreHeaderSize
typeobject.c:_PyType_PreHeaderSize
Line
Count
Source
226
{
227
    return _PyType_IS_GC(tp) * sizeof(PyGC_Head) +
228
        _PyType_HasFeature(tp, Py_TPFLAGS_MANAGED_DICT) * 2 * sizeof(PyObject *);
229
}
Unexecuted instantiation: unicodeobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: unionobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: weakrefobject.c:_PyType_PreHeaderSize
Unexecuted instantiation: bltinmodule.c:_PyType_PreHeaderSize
Unexecuted instantiation: ceval.c:_PyType_PreHeaderSize
Unexecuted instantiation: context.c:_PyType_PreHeaderSize
Unexecuted instantiation: frame.c:_PyType_PreHeaderSize
Unexecuted instantiation: hamt.c:_PyType_PreHeaderSize
Unexecuted instantiation: pylifecycle.c:_PyType_PreHeaderSize
Unexecuted instantiation: pystate.c:_PyType_PreHeaderSize
Unexecuted instantiation: pythonrun.c:_PyType_PreHeaderSize
Unexecuted instantiation: specialize.c:_PyType_PreHeaderSize
sysmodule.c:_PyType_PreHeaderSize
Line
Count
Source
226
{
227
    return _PyType_IS_GC(tp) * sizeof(PyGC_Head) +
228
        _PyType_HasFeature(tp, Py_TPFLAGS_MANAGED_DICT) * 2 * sizeof(PyObject *);
229
}
gcmodule.c:_PyType_PreHeaderSize
Line
Count
Source
226
{
227
    return _PyType_IS_GC(tp) * sizeof(PyGC_Head) +
228
        _PyType_HasFeature(tp, Py_TPFLAGS_MANAGED_DICT) * 2 * sizeof(PyObject *);
229
}
Unexecuted instantiation: posixmodule.c:_PyType_PreHeaderSize
Unexecuted instantiation: iobase.c:_PyType_PreHeaderSize
Unexecuted instantiation: fileio.c:_PyType_PreHeaderSize
Unexecuted instantiation: bytesio.c:_PyType_PreHeaderSize
Unexecuted instantiation: bufferedio.c:_PyType_PreHeaderSize
Unexecuted instantiation: textio.c:_PyType_PreHeaderSize
Unexecuted instantiation: stringio.c:_PyType_PreHeaderSize
Unexecuted instantiation: itertoolsmodule.c:_PyType_PreHeaderSize
Unexecuted instantiation: _weakref.c:_PyType_PreHeaderSize
Unexecuted instantiation: _abc.c:_PyType_PreHeaderSize
Unexecuted instantiation: _functoolsmodule.c:_PyType_PreHeaderSize
230
231
void _PyObject_GC_Link(PyObject *op);
232
233
// Usage: assert(_Py_CheckSlotResult(obj, "__getitem__", result != NULL));
234
extern int _Py_CheckSlotResult(
235
    PyObject *obj,
236
    const char *slot_name,
237
    int success);
238
239
// PyType_Ready() must be called if _PyType_IsReady() is false.
240
// See also the Py_TPFLAGS_READY flag.
241
#define _PyType_IsReady(type) ((type)->tp_dict != NULL)
242
243
// Test if a type supports weak references
244
static inline int _PyType_SUPPORTS_WEAKREFS(PyTypeObject *type) {
245
    return (type->tp_weaklistoffset > 0);
246
}
Unexecuted instantiation: abstract.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: boolobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: bytearrayobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: bytesobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: call.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: cellobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: classobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: complexobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: descrobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: enumobject.c:_PyType_SUPPORTS_WEAKREFS
exceptions.c:_PyType_SUPPORTS_WEAKREFS
Line
Count
Source
244
static inline int _PyType_SUPPORTS_WEAKREFS(PyTypeObject *type) {
245
    return (type->tp_weaklistoffset > 0);
246
}
Unexecuted instantiation: genericaliasobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: genobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: floatobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: frameobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: funcobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: iterobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: listobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: longobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: dictobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: odictobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: memoryobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: methodobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: moduleobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: object.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: setobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: sliceobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: structseq.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: tupleobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: typeobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: unicodeobject.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: unionobject.c:_PyType_SUPPORTS_WEAKREFS
weakrefobject.c:_PyType_SUPPORTS_WEAKREFS
Line
Count
Source
244
static inline int _PyType_SUPPORTS_WEAKREFS(PyTypeObject *type) {
245
    return (type->tp_weaklistoffset > 0);
246
}
Unexecuted instantiation: bltinmodule.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: ceval.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: context.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: frame.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: hamt.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: pylifecycle.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: pystate.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: pythonrun.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: specialize.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: sysmodule.c:_PyType_SUPPORTS_WEAKREFS
gcmodule.c:_PyType_SUPPORTS_WEAKREFS
Line
Count
Source
244
static inline int _PyType_SUPPORTS_WEAKREFS(PyTypeObject *type) {
245
    return (type->tp_weaklistoffset > 0);
246
}
Unexecuted instantiation: posixmodule.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: iobase.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: fileio.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: bytesio.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: bufferedio.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: textio.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: stringio.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: itertoolsmodule.c:_PyType_SUPPORTS_WEAKREFS
_weakref.c:_PyType_SUPPORTS_WEAKREFS
Line
Count
Source
244
static inline int _PyType_SUPPORTS_WEAKREFS(PyTypeObject *type) {
245
    return (type->tp_weaklistoffset > 0);
246
}
Unexecuted instantiation: _abc.c:_PyType_SUPPORTS_WEAKREFS
Unexecuted instantiation: _functoolsmodule.c:_PyType_SUPPORTS_WEAKREFS
247
248
extern PyObject* _PyType_AllocNoTrack(PyTypeObject *type, Py_ssize_t nitems);
249
250
extern int _PyObject_InitializeDict(PyObject *obj);
251
extern int _PyObject_StoreInstanceAttribute(PyObject *obj, PyDictValues *values,
252
                                          PyObject *name, PyObject *value);
253
PyObject * _PyObject_GetInstanceAttribute(PyObject *obj, PyDictValues *values,
254
                                        PyObject *name);
255
256
static inline PyDictValues **_PyObject_ValuesPointer(PyObject *obj)
257
{
258
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
259
    return ((PyDictValues **)obj)-4;
260
}
Unexecuted instantiation: abstract.c:_PyObject_ValuesPointer
Unexecuted instantiation: boolobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: bytearrayobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: bytesobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: call.c:_PyObject_ValuesPointer
Unexecuted instantiation: cellobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: classobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: complexobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: descrobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: enumobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: exceptions.c:_PyObject_ValuesPointer
Unexecuted instantiation: genericaliasobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: genobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: floatobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: frameobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: funcobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: iterobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: listobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: longobject.c:_PyObject_ValuesPointer
dictobject.c:_PyObject_ValuesPointer
Line
Count
Source
257
{
258
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
259
    return ((PyDictValues **)obj)-4;
260
}
Unexecuted instantiation: odictobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: memoryobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: methodobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: moduleobject.c:_PyObject_ValuesPointer
object.c:_PyObject_ValuesPointer
Line
Count
Source
257
{
258
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
259
    return ((PyDictValues **)obj)-4;
260
}
Unexecuted instantiation: setobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: sliceobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: structseq.c:_PyObject_ValuesPointer
Unexecuted instantiation: tupleobject.c:_PyObject_ValuesPointer
typeobject.c:_PyObject_ValuesPointer
Line
Count
Source
257
{
258
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
259
    return ((PyDictValues **)obj)-4;
260
}
Unexecuted instantiation: unicodeobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: unionobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: weakrefobject.c:_PyObject_ValuesPointer
Unexecuted instantiation: bltinmodule.c:_PyObject_ValuesPointer
ceval.c:_PyObject_ValuesPointer
Line
Count
Source
257
{
258
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
259
    return ((PyDictValues **)obj)-4;
260
}
Unexecuted instantiation: context.c:_PyObject_ValuesPointer
Unexecuted instantiation: frame.c:_PyObject_ValuesPointer
Unexecuted instantiation: hamt.c:_PyObject_ValuesPointer
Unexecuted instantiation: pylifecycle.c:_PyObject_ValuesPointer
Unexecuted instantiation: pystate.c:_PyObject_ValuesPointer
Unexecuted instantiation: pythonrun.c:_PyObject_ValuesPointer
Unexecuted instantiation: specialize.c:_PyObject_ValuesPointer
Unexecuted instantiation: sysmodule.c:_PyObject_ValuesPointer
Unexecuted instantiation: gcmodule.c:_PyObject_ValuesPointer
Unexecuted instantiation: posixmodule.c:_PyObject_ValuesPointer
Unexecuted instantiation: iobase.c:_PyObject_ValuesPointer
Unexecuted instantiation: fileio.c:_PyObject_ValuesPointer
Unexecuted instantiation: bytesio.c:_PyObject_ValuesPointer
Unexecuted instantiation: bufferedio.c:_PyObject_ValuesPointer
Unexecuted instantiation: textio.c:_PyObject_ValuesPointer
Unexecuted instantiation: stringio.c:_PyObject_ValuesPointer
Unexecuted instantiation: itertoolsmodule.c:_PyObject_ValuesPointer
Unexecuted instantiation: _weakref.c:_PyObject_ValuesPointer
Unexecuted instantiation: _abc.c:_PyObject_ValuesPointer
Unexecuted instantiation: _functoolsmodule.c:_PyObject_ValuesPointer
261
262
static inline PyObject **_PyObject_ManagedDictPointer(PyObject *obj)
263
{
264
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
265
    return ((PyObject **)obj)-3;
266
}
Unexecuted instantiation: abstract.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: boolobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: bytearrayobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: bytesobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: call.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: cellobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: classobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: complexobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: descrobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: enumobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: exceptions.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: genericaliasobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: genobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: floatobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: frameobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: funcobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: iterobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: listobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: longobject.c:_PyObject_ManagedDictPointer
dictobject.c:_PyObject_ManagedDictPointer
Line
Count
Source
263
{
264
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
265
    return ((PyObject **)obj)-3;
266
}
Unexecuted instantiation: odictobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: memoryobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: methodobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: moduleobject.c:_PyObject_ManagedDictPointer
object.c:_PyObject_ManagedDictPointer
Line
Count
Source
263
{
264
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
265
    return ((PyObject **)obj)-3;
266
}
Unexecuted instantiation: setobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: sliceobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: structseq.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: tupleobject.c:_PyObject_ManagedDictPointer
typeobject.c:_PyObject_ManagedDictPointer
Line
Count
Source
263
{
264
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
265
    return ((PyObject **)obj)-3;
266
}
Unexecuted instantiation: unicodeobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: unionobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: weakrefobject.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: bltinmodule.c:_PyObject_ManagedDictPointer
ceval.c:_PyObject_ManagedDictPointer
Line
Count
Source
263
{
264
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
265
    return ((PyObject **)obj)-3;
266
}
Unexecuted instantiation: context.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: frame.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: hamt.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: pylifecycle.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: pystate.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: pythonrun.c:_PyObject_ManagedDictPointer
specialize.c:_PyObject_ManagedDictPointer
Line
Count
Source
263
{
264
    assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
265
    return ((PyObject **)obj)-3;
266
}
Unexecuted instantiation: sysmodule.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: gcmodule.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: posixmodule.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: iobase.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: fileio.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: bytesio.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: bufferedio.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: textio.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: stringio.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: itertoolsmodule.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: _weakref.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: _abc.c:_PyObject_ManagedDictPointer
Unexecuted instantiation: _functoolsmodule.c:_PyObject_ManagedDictPointer
267
268
#define MANAGED_DICT_OFFSET (((int)sizeof(PyObject *))*-3)
269
270
extern PyObject ** _PyObject_DictPointer(PyObject *);
271
extern int _PyObject_VisitInstanceAttributes(PyObject *self, visitproc visit, void *arg);
272
extern void _PyObject_ClearInstanceAttributes(PyObject *self);
273
extern void _PyObject_FreeInstanceAttributes(PyObject *self);
274
extern int _PyObject_IsInstanceDictEmpty(PyObject *);
275
extern PyObject* _PyType_GetSubclasses(PyTypeObject *);
276
277
// Access macro to the members which are floating "behind" the object
278
#define _PyHeapType_GET_MEMBERS(etype) \
279
    ((PyMemberDef *)(((char *)(etype)) + Py_TYPE(etype)->tp_basicsize))
280
281
PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, PyObject *);
282
283
/* C function call trampolines to mitigate bad function pointer casts.
284
 *
285
 * Typical native ABIs ignore additional arguments or fill in missing
286
 * values with 0/NULL in function pointer cast. Compilers do not show
287
 * warnings when a function pointer is explicitly casted to an
288
 * incompatible type.
289
 *
290
 * Bad fpcasts are an issue in WebAssembly. WASM's indirect_call has strict
291
 * function signature checks. Argument count, types, and return type must
292
 * match.
293
 *
294
 * Third party code unintentionally rely on problematic fpcasts. The call
295
 * trampoline mitigates common occurences of bad fpcasts on Emscripten.
296
 */
297
#if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE)
298
#define _PyCFunction_TrampolineCall(meth, self, args) \
299
    _PyCFunctionWithKeywords_TrampolineCall( \
300
        (*(PyCFunctionWithKeywords)(void(*)(void))(meth)), (self), (args), NULL)
301
extern PyObject* _PyCFunctionWithKeywords_TrampolineCall(
302
    PyCFunctionWithKeywords meth, PyObject *, PyObject *, PyObject *);
303
#else
304
#define _PyCFunction_TrampolineCall(meth, self, args) \
305
    (meth)((self), (args))
306
#define _PyCFunctionWithKeywords_TrampolineCall(meth, self, args, kw) \
307
    (meth)((self), (args), (kw))
308
#endif // __EMSCRIPTEN__ && PY_CALL_TRAMPOLINE
309
310
#ifdef __cplusplus
311
}
312
#endif
313
#endif /* !Py_INTERNAL_OBJECT_H */