[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unexpected delay in using arguments.

From: Chet Ramey
Subject: Re: Unexpected delay in using arguments.
Date: Sat, 29 Dec 2018 10:39:04 -0600
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3

On 12/28/18 10:58 PM, Bize Ma wrote:
> Chet Ramey (<address@hidden <mailto:address@hidden>>) 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.

        - 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 <address@hidden>
        - {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    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]