py: Add "default" to switches to allow better code flow analysis.
This helps compiler produce smaller code. Saves 124 bytes on stmhal and
bare-arm.
diff --git a/py/emitbc.c b/py/emitbc.c
index d637391..436fdf1 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -454,8 +454,9 @@
case MP_TOKEN_KW_FALSE: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_FALSE); break;
case MP_TOKEN_KW_NONE: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_NONE); break;
case MP_TOKEN_KW_TRUE: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_TRUE); break;
+ no_other_choice:
case MP_TOKEN_ELLIPSIS: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_ELLIPSIS); break;
- default: assert(0);
+ default: assert(0); goto no_other_choice; // to help flow control analysis
}
}