bc: implement pass-by-reference code from upstream
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 25 Jan 2019 13:24:03 +0000 (14:24 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 14 Feb 2019 13:40:57 +0000 (14:40 +0100)
commit5c6b9165e776f60b7bfeb01a2d5fa6331ee0cb89
tree6e5770c2b8fbc28d7d43934d79d6c28e3eeec205
parent8296334c1f457c598e04e1aa0f79cbdbbba27427
bc: implement pass-by-reference code from upstream

function                                             old     new   delta
zxc_program_popResultAndCopyToVar                    298     493    +195
bc_vec_pushIndex                                       -      75     +75
zxc_vm_process                                       859     928     +69
xc_program_dereference                                 -      66     +66
bc_vec_npush                                           -      65     +65
zbc_num_s                                            239     249     +10
zxc_program_num                                     1024    1032      +8
zbc_num_divmod                                       150     156      +6
xc_program_search                                    143     146      +3
zxc_program_assign                                   392     389      -3
zdc_program_execStr                                  520     517      -3
xc_program_pushVar                                   198     195      -3
zxc_program_exec                                    4101    4092      -9
zbc_program_call                                     318     308     -10
zbc_func_insert                                      120     104     -16
zbc_parse_stmt_possibly_auto                        1460    1439     -21
bc_vec_push                                           53      12     -41
xc_parse_pushIndex                                    61      18     -43
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/9 up/down: 497/-149)          Total: 348 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c
testsuite/bc_references.bc [new file with mode: 0644]
testsuite/bc_references_results.txt [new file with mode: 0644]