◐ Shell
reader mode source ↗
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
1 change: 1 addition & 0 deletions Include/cpython/object.h
Original file line number Diff line number Diff line change
@@ -231,6 +231,7 @@ struct _typeobject {
* by code other than the specializer and interpreter. */
struct _specialization_cache {
PyObject *getitem;
};

/* The *real* layout of a type object when allocated on the heap */
Expand Down
2 changes: 2 additions & 0 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ struct callable_cache {
PyObject *len;
PyObject *list_append;
PyObject *object__getattribute__;
};

/* "Locals plus" for a code object is the set of locals + cell vars +
Expand Down
35 changes: 33 additions & 2 deletions Include/internal/pycore_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,27 @@ static inline void _PyFrame_StackPush(_PyInterpreterFrame *f, PyObject *value) {

void _PyFrame_Copy(_PyInterpreterFrame *src, _PyInterpreterFrame *dest);

/* Consumes reference to func and locals */
static inline void
_PyFrame_InitializeSpecials(
_PyInterpreterFrame *frame, PyFunctionObject *func,
PyObject *locals, PyCodeObject *code)
{
Expand Down Expand Up @@ -213,7 +231,20 @@ _PyFrame_PushUnchecked(PyThreadState *tstate, PyFunctionObject *func)
_PyInterpreterFrame *new_frame = (_PyInterpreterFrame *)tstate->datastack_top;
tstate->datastack_top += code->co_framesize;
assert(tstate->datastack_top < tstate->datastack_limit);
_PyFrame_InitializeSpecials(new_frame, func, NULL, code);
return new_frame;
}

Expand Down
2 changes: 2 additions & 0 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,10 @@ static inline int _PyType_SUPPORTS_WEAKREFS(PyTypeObject *type) {
}

extern PyObject* _PyType_AllocNoTrack(PyTypeObject *type, Py_ssize_t nitems);

extern int _PyObject_InitializeDict(PyObject *obj);
extern int _PyObject_StoreInstanceAttribute(PyObject *obj, PyDictValues *values,
PyObject *name, PyObject *value);
PyObject * _PyObject_GetInstanceAttribute(PyObject *obj, PyDictValues *values,
Expand Down
56 changes: 28 additions & 28 deletions Include/internal/pycore_opcode.h
Loading
Toggle all file notes Toggle all file annotations