Skip to content

Commit 35e389d

Browse files
committed
Remove debugging code
1 parent 025049d commit 35e389d

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Python/ceval.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,6 @@ dump_item(_PyStackRef item)
155155
printf("<nil>");
156156
return;
157157
}
158-
if (PyList_CheckExact(obj)) {
159-
printf("len=%ld ", Py_SIZE(obj));
160-
}
161158
// Don't call __repr__(), it might recurse into the interpreter.
162159
printf("<%s at %p>", Py_TYPE(obj)->tp_name, (void *)obj);
163160
}
@@ -274,7 +271,6 @@ maybe_lltrace_resume_frame(_PyInterpreterFrame *frame, PyObject *globals)
274271
lltrace = *python_lltrace - '0'; // TODO: Parse an int and all that
275272
}
276273
}
277-
// lltrace = 5;
278274
if (lltrace >= 5) {
279275
lltrace_resume_frame(frame);
280276
}

Python/flowgraph.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ basicblock_insert_instruction(basicblock *block, int pos, cfg_instr *instr) {
273273
}
274274

275275
/* For debugging purposes only */
276-
#if 1
276+
#if 0
277277
static void
278278
dump_instr(cfg_instr *i)
279279
{
@@ -330,12 +330,6 @@ _PyCfgBuilder_DumpGraph(const basicblock *entryblock, const basicblock *mark)
330330
}
331331
}
332332

333-
#define DUMP(B, M) _PyCfgBuilder_DumpGraph((B), (M))
334-
335-
#else
336-
337-
#define DUMP(B, M) ((void)0)
338-
339333
#endif
340334

341335

@@ -835,7 +829,6 @@ calculate_stackdepth(cfg_builder *g)
835829
int maxdepth = 0;
836830
basicblock **sp = stack;
837831
if (stackdepth_push(&sp, entryblock, 0) < 0) {
838-
DUMP(entryblock, entryblock);
839832
goto error;
840833
}
841834
while (sp != stack) {
@@ -856,7 +849,6 @@ calculate_stackdepth(cfg_builder *g)
856849
if (new_depth < 0) {
857850
PyErr_Format(PyExc_ValueError,
858851
"Invalid CFG, stack underflow");
859-
DUMP(entryblock, b);
860852
goto error;
861853
}
862854
maxdepth = Py_MAX(maxdepth, depth);
@@ -871,7 +863,6 @@ calculate_stackdepth(cfg_builder *g)
871863
assert(target_depth >= 0); /* invalid code or bug in stackdepth() */
872864
maxdepth = Py_MAX(maxdepth, depth);
873865
if (stackdepth_push(&sp, instr->i_target, target_depth) < 0) {
874-
DUMP(entryblock, instr->i_target);
875866
goto error;
876867
}
877868
}
@@ -888,7 +879,6 @@ calculate_stackdepth(cfg_builder *g)
888879
if (next != NULL) {
889880
assert(BB_HAS_FALLTHROUGH(b));
890881
if (stackdepth_push(&sp, next, depth) < 0) {
891-
DUMP(entryblock, next);
892882
goto error;
893883
}
894884
}

0 commit comments

Comments
 (0)