Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15005
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Unexpected delay in using arguments. |
| Date | 2018-12-29 10:39 -0600 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.6528.1546102294.1284.bug-bash@gnu.org> (permalink) |
| References | (3 earlier) <20180815011219279040096@bob.proulx.com> <9a4dd312-8e3e-4b6a-05d5-699855bbfedf@case.edu> <CAFra36gGQnOZo8KqwnF+eQ==z40hxVcG6dO5z4oA-EeB62SFUQ@mail.gmail.com> <e62e0ae2-158b-6dbc-201b-d20d27ba05a7@case.edu> <CAFra36hQqF3-s2NW0k=okko=0M_nwHvWzkujt9RiNU8vKDiXaQ@mail.gmail.com> |
On 12/28/18 10:58 PM, Bize Ma wrote:
> Chet Ramey (<chet.ramey@case.edu <mailto:chet.ramey@case.edu>>) wrote:
>
> On 12/23/18 12:07 PM, Bize Ma wrote:
>
>
> {...}
>
>
> > Have you been able to "take a look" ?
>
> Yes, as a matter of fact. Look at the changelog for the day or two around
> the date of the referenced messages.
>
>
> I am pretty sure that I will not understand the finer details of the c code
> even
> if I could take a look at it. But, for the learning: could you be so kind as to
> provide some pointer as to where to find the change log ? Thanks!.
It's in CWRU/CWRU.chlog in the development distributions, with a symlink
from ChangeLog in releases. Here are the relevant entries.
8/15
----
variables.c
- dollar_arg_stack: now a stack of struct saved_dollar_vars, which has
an array for the first ten (dollar_vars) and a WORD_LIST * for the
remaining (rest_of_args). Fixes performance issue with function calls
and large numbers of positional parameters raised by
Bize Ma <binaryzebra@gmail.com>
- {save,restore,free,free_saved}_dollar_vars: new functions to manage
dollar_vars and dollar_arg_stack members. Need to keep these in sync
with whatever remember_args does
- push_dollar_vars: use save_dollar_vars, which just copies pointers,
and directly assign rest_of_args, without copying the words, to the
dollar_arg_stack entry. Have to clear dollar_vars and rest_of_args
with the assumption that callers will call remember_args(args, 1)
immediately following
- pop_dollar_vars: free current positional parameters and restore old
ones from pointers saved in dollar_arg_stack, making sure to
invalidate any cached value for "$@"
- dispose_saved_dollar_vars: free saved pointers from current index
into dollar_arg_stack
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Unexpected delay in using arguments. Chet Ramey <chet.ramey@case.edu> - 2018-12-29 10:39 -0600
csiph-web