busybox/miscutils
Denys Vlasenko 684d441f5c bc: make bc_program_addFunc() return new idx, untangle &p->fidx interaction
In:
       bc_program_addFunc(name, idx);
       p->func = bc_program_func(p->fidx);
in some cases p->fidx was updated by _first_ statement - because passed idx
was pointing at it. This was very obscure.

function                                             old     new   delta
zdc_parse_expr                                       653     658      +5
bc_program_addFunc                                   204     201      -3
zbc_vm_process                                       594     586      -8
bc_vm_init                                           663     655      -8
zbc_parse_name                                       482     472     -10
bc_parse_addFunc                                      25       -     -25
zbc_program_asciify                                  473     447     -26
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/5 up/down: 5/-80)             Total: -75 bytes
   text	   data	    bss	    dec	    hex	filename
 981482	    485	   7296	 989263	  f184f	busybox_old
 981401	    485	   7296	 989182	  f17fe	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-12-19 14:59:22 +01:00
..