Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15005 > unrolled thread

Re: Unexpected delay in using arguments.

Started byChet Ramey <chet.ramey@case.edu>
First post2018-12-29 10:39 -0600
Last post2018-12-29 10:39 -0600
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Unexpected delay in using arguments. Chet Ramey <chet.ramey@case.edu> - 2018-12-29 10:39 -0600

#15005 — Re: Unexpected delay in using arguments.

FromChet Ramey <chet.ramey@case.edu>
Date2018-12-29 10:39 -0600
SubjectRe: Unexpected delay in using arguments.
Message-ID<mailman.6528.1546102294.1284.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web