Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possible huge setarrvalue optimization



On Nov 20, 2016 3:49 AM, "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Sebastian Gniazdowski wrote on Fri, Nov 18, 2016 at 04:20:20 -0800:
>
> > +
> > +        if (pre_assignment_length != post_assignment_length ||
v->pm->node.flags & (PM_SPECIAL|PM_UNIQUE)) {
>
> Should this line check that «v->pm->gsu.a.setfn == arrsetfn»?
>
> Should this line check that «pm->ename == NULL» [since arrsetfn()
> handles such arrays specially]?

Thanks for pointing out those possible details.  I know from implementing
the param_private module that this part of the code is really important to
assumptions made downstream -- it may appear safe to "give away" strings
based on local examination here but in fact cause problems outside this
function.

This and the proposed getstr optimization both make me nervous.  I know
Sebastian is anxious to have them appear in the next release, but it feels
and if we should have more time using them in dev branches.


Messages sorted by: Reverse Date, Date, Thread, Author