From d2d64f00fb7f1487c1fa21a456e003a801d7e711 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 14 Jan 2015 21:32:42 +0000 Subject: 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. --- py/emitbc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'py/emitbc.c') diff --git a/py/emitbc.c b/py/emitbc.c index d63739125f..436fdf1430 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -454,8 +454,9 @@ STATIC void emit_bc_load_const_tok(emit_t *emit, mp_token_kind_t tok) { 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 } } -- cgit v1.2.3