Ignore:
Timestamp:
Sep 15, 2020, 2:55:26 PM (5 years ago)
Author:
bird
Message:

kash: Cache one pstack_block since parsecmd seems to be called for each statement line in a script. Also, mark pstack blocks as 'done' before returning from parsecmd and prevent them from becoming current (curpstack) again upon popping.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/shinstance.h

    r3460 r3461  
    131131    /** Reference counter. */
    132132    unsigned volatile   refs;
    133     unsigned            padding;
     133    /** Whether to make it current when is restored to the top of the stack. */
     134    KBOOL               done;
    134135    /** The first stack block. */
    135136    struct stack_block  first;
     
    339340    unsigned            pstacksize;     /**< Number of entries in pstack. */
    340341    unsigned            pstackalloced;  /**< The allocated size of pstack. */
     342    pstack_block       *freepstack;     /**< One cached pstack entry (lots of parsecmd calls). */
    341343#endif
    342344
Note: See TracChangeset for help on using the changeset viewer.