Skip to content

Commit 035180c

Browse files
committed
py: Remove commented-out debug printf's from emitbc and objlist.
Any debugging prints should use a macro like DEBUG_printf.
1 parent 1f37194 commit 035180c

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

py/emitbc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ STATIC void emit_write_uint(emit_t *emit, emit_allocator_t allocator, mp_uint_t
110110

111111
// all functions must go through this one to emit code info
112112
STATIC byte *emit_get_cur_to_write_code_info(emit_t *emit, int num_bytes_to_write) {
113-
//printf("emit %d\n", num_bytes_to_write);
114113
if (emit->pass < MP_PASS_EMIT) {
115114
emit->code_info_offset += num_bytes_to_write;
116115
return emit->dummy_data;
@@ -140,7 +139,6 @@ STATIC void emit_write_code_info_qstr(emit_t *emit, qstr qst) {
140139
#if MICROPY_ENABLE_SOURCE_LINE
141140
STATIC void emit_write_code_info_bytes_lines(emit_t *emit, mp_uint_t bytes_to_skip, mp_uint_t lines_to_skip) {
142141
assert(bytes_to_skip > 0 || lines_to_skip > 0);
143-
//printf(" %d %d\n", bytes_to_skip, lines_to_skip);
144142
while (bytes_to_skip > 0 || lines_to_skip > 0) {
145143
mp_uint_t b, l;
146144
if (lines_to_skip <= 6 || bytes_to_skip > 0xf) {
@@ -169,7 +167,6 @@ STATIC void emit_write_code_info_bytes_lines(emit_t *emit, mp_uint_t bytes_to_sk
169167

170168
// all functions must go through this one to emit byte code
171169
STATIC byte *emit_get_cur_to_write_bytecode(emit_t *emit, int num_bytes_to_write) {
172-
//printf("emit %d\n", num_bytes_to_write);
173170
if (emit->pass < MP_PASS_EMIT) {
174171
emit->bytecode_offset += num_bytes_to_write;
175172
return emit->dummy_data;
@@ -470,7 +467,6 @@ void mp_emit_bc_adjust_stack_size(emit_t *emit, mp_int_t delta) {
470467
}
471468

472469
void mp_emit_bc_set_source_line(emit_t *emit, mp_uint_t source_line) {
473-
//printf("source: line %d -> %d offset %d -> %d\n", emit->last_source_line, source_line, emit->last_source_line_offset, emit->bytecode_offset);
474470
#if MICROPY_ENABLE_SOURCE_LINE
475471
if (MP_STATE_VM(mp_optimise_value) >= 3) {
476472
// If we compile with -O3, don't store line numbers.

py/objlist.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
162162
}
163163

164164
mp_int_t len_adj = slice.start - slice.stop;
165-
//printf("Len adj: %d\n", len_adj);
166165
assert(len_adj <= 0);
167166
mp_seq_replace_slice_no_grow(self->items, self->len, slice.start, slice.stop, self->items/*NULL*/, 0, sizeof(*self->items));
168167
// Clear "freed" elements at the end of list
@@ -201,7 +200,6 @@ STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
201200
mp_raise_NotImplementedError(NULL);
202201
}
203202
mp_int_t len_adj = value_len - (slice_out.stop - slice_out.start);
204-
//printf("Len adj: %d\n", len_adj);
205203
if (len_adj > 0) {
206204
if (self->len + len_adj > self->alloc) {
207205
// TODO: Might optimize memory copies here by checking if block can

0 commit comments

Comments
 (0)