Skip to content

Commit deaa57a

Browse files
committed
py/compile: Remove debugging code for compiler dispatch.
It was a relic from the days of developing the compiler and is no longer needed, and it's impossible to trigger via a test.
1 parent db4e009 commit deaa57a

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

py/compile.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,15 +2723,8 @@ STATIC void compile_node(compiler_t *comp, mp_parse_node_t pn) {
27232723
mp_parse_node_struct_t *pns = (mp_parse_node_struct_t*)pn;
27242724
EMIT_ARG(set_source_line, pns->source_line);
27252725
compile_function_t f = compile_function[MP_PARSE_NODE_STRUCT_KIND(pns)];
2726-
if (f == NULL) {
2727-
#if MICROPY_DEBUG_PRINTERS
2728-
printf("node %u cannot be compiled\n", (uint)MP_PARSE_NODE_STRUCT_KIND(pns));
2729-
mp_parse_node_print(pn, 0);
2730-
#endif
2731-
compile_syntax_error(comp, pn, "internal compiler error");
2732-
} else {
2733-
f(comp, pns);
2734-
}
2726+
assert(f != NULL);
2727+
f(comp, pns);
27352728
}
27362729
}
27372730

0 commit comments

Comments
 (0)