Skip to content

Commit 365fceb

Browse files
committed
Add explanatory comment to CALL_NO_KW_ALLOC_AND_ENTER_INIT.
1 parent 7c0876c commit 365fceb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Python/ceval.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4988,6 +4988,11 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
49884988
}
49894989

49904990
TARGET(CALL_NO_KW_ALLOC_AND_ENTER_INIT) {
4991+
/* This instruction does the following:
4992+
* 1. Creates the object (by calling ``object.__new__``)
4993+
* 2. Pushes a shim frame to the frame stack (to cleanup after ``__init__``)
4994+
* 3. Pushes the frame for ``__init__`` to the frame stack
4995+
* */
49914996
assert(call_shape.kwnames == NULL);
49924997
_PyCallCache *cache = (_PyCallCache *)next_instr;
49934998
DEOPT_IF(is_method(stack_pointer, oparg), CALL);

0 commit comments

Comments
 (0)