ash: add LINENO support
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 27 Jan 2018 21:02:05 +0000 (22:02 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 27 Jan 2018 21:02:05 +0000 (22:02 +0100)
commit675d24aeaff29dbce6dc116a4b7c9f6026ed5069
tree446b740ec2d9b2fd035821a89dd876f10b27bff4
parent54c2111781e15b1c70bea43593aa67207f9ea118
ash: add LINENO support

This patch is a backport from dash of the combination of:
    [SHELL] Add preliminary LINENO support
    [VAR] Fix varinit ordering that broke fc
    [SHELL] Improve LINENO support

function                                             old     new   delta
parse_command                                       1604    1677     +73
calcsize                                             156     223     +67
copynode                                             196     258     +62
evalcommand                                         1546    1606     +60
ash_main                                            1046    1103     +57
lookupvar                                             51     106     +55
evalcase                                             269     317     +48
evaltree                                             501     547     +46
evalfor                                              156     200     +44
evalsubshell                                         156     195     +39
raise_error_syntax                                    11      29     +18
varinit_data                                         120     132     +12
evalfun                                              270     280     +10
funcline                                               -       4      +4
cmdtxt                                               569     572      +3
trapcmd                                              306     304      -2
ash_vmsg                                             153     150      -3
startlinno                                             4       -      -4
funcnest                                               4       -      -4
xxreadtoken                                          263     250     -13
readtoken1                                          2645    2602     -43
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 14/4 up/down: 598/-69)          Total: 529 bytes
   text    data     bss     dec     hex filename
 932834     481    6864  940179   e5893 busybox_old
 933375     481    6856  940712   e5aa8 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
shell/ash_LINENO.patch [deleted file]
shell/ash_test/ash-psubst/emptytick.right
shell/ash_test/ash-quoting/mode_x.right