Skip to content

Commit

Permalink
remove some debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Sep 29, 2023
1 parent 2cf7e94 commit 66005ce
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 47 deletions.
16 changes: 0 additions & 16 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@ dummy_func(
if (do_raise(tstate, exc, cause)) {
assert(oparg == 0);
monitor_reraise(tstate, frame, next_instr-1);
DUMP_FRAME("goto exception_unwind");
goto exception_unwind;
}
break;
Expand All @@ -772,9 +771,7 @@ dummy_func(
assert(frame == &entry_frame);
assert(_PyFrame_IsIncomplete(frame));
/* Restore previous frame and return. */
DUMP_FRAME("INTERPRETER_EXIT1");
tstate->current_frame = frame->previous;
if (frame->previous) if (VERBOSE) fprintf(stderr, "INTERPRETER_EXIT2: tstate->current_frame=%p tstate->current_frame->prev_instr=%p tstate->current_frame->instr_ptr=%p new_return_offset=%d \n", tstate->current_frame, tstate->current_frame->prev_instr, tstate->current_frame->instr_ptr, tstate->current_frame->new_return_offset);
assert(!_PyErr_Occurred(tstate));
tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS;
return retval;
Expand All @@ -795,16 +792,13 @@ if (frame->previous) if (VERBOSE) fprintf(stderr, "INTERPRETER_EXIT2: tstate->cu
_PyInterpreterFrame *dying = frame;
frame = tstate->current_frame = dying->previous;
_PyEval_FrameClearAndPop(tstate, dying);
DUMP_FRAME("_POP_FRAME[1]");
frame->prev_instr += frame->return_offset;
frame->instr_ptr += frame->new_return_offset;
frame->new_return_offset = 0;

DUMP_FRAME("_POP_FRAME[2]");
_PyFrame_StackPush(frame, retval);
LOAD_SP();
LOAD_IP();
DUMP_FRAME("_POP_FRAME[3]");

#if LLTRACE && TIER_ONE
lltrace = maybe_lltrace_resume_frame(frame, &entry_frame, GLOBALS());
Expand Down Expand Up @@ -1003,7 +997,6 @@ DUMP_FRAME("_POP_FRAME[3]");
frame->return_offset = oparg;
frame->yield_offset = next_instr - frame->instr_ptr;
frame->new_return_offset = next_instr - frame->instr_ptr + oparg;
DUMP_FRAME("SEND (to gen_frame)");
DISPATCH_INLINED(gen_frame);
}
if (Py_IsNone(v) && PyIter_Check(receiver)) {
Expand Down Expand Up @@ -1086,13 +1079,7 @@ DUMP_FRAME("_POP_FRAME[3]");
gen_frame->instr_ptr = next_instr;
frame = tstate->current_frame = frame->previous;
gen_frame->previous = NULL;
if (VERBOSE) {
fprintf(stderr, "YIELD VALUE: ");
_PyObject_Dump(retval);
fprintf(stderr, "\n");
}
_PyFrame_StackPush(frame, retval);
DUMP_FRAME(">> YIELD_VALUE");
frame->instr_ptr += frame->yield_offset;
frame->new_return_offset = frame->yield_offset = 0;
frame->prev_instr = frame->instr_ptr - 1;
Expand Down Expand Up @@ -3107,7 +3094,6 @@ DUMP_FRAME(">> YIELD_VALUE");
STORE_SP();
new_frame->previous = frame;
CALL_STAT_INC(inlined_py_calls);
DUMP_FRAME("_PUSH_FRAME");
frame = tstate->current_frame = new_frame;
tstate->py_recursion_remaining--;
LOAD_SP();
Expand Down Expand Up @@ -3997,11 +3983,9 @@ DUMP_FRAME("_PUSH_FRAME");

op(_SAVE_CURRENT_IP, (--)) {
#if TIER_ONE
DUMP_FRAME("_SAVE_CURRENT_IP[1]");
frame->prev_instr = next_instr - 1;
assert(frame->new_return_offset == 0);
frame->new_return_offset = next_instr - frame->instr_ptr + frame->new_return_offset;
DUMP_FRAME("_SAVE_CURRENT_IP[2]");
#endif
#if TIER_TWO
// Relies on a preceding _SET_IP
Expand Down
5 changes: 0 additions & 5 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66005ce

Please sign in to comment.