Ignore:
Timestamp:
Feb 1, 2015, 9:48:36 PM (10 years ago)
Author:
bird
Message:

Optimizations, tuning and bug fixes for the 'compiled' string expansion code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/variable.h

    r2770 r2771  
    1818
    1919#include "hash.h"
     20#ifdef CONFIG_WITH_COMPILER
     21# include "kmk_cc_exec.h"
     22#endif
    2023
    2124/* Codes in a variable definition saying where the definition came from.
     
    109112        v_default               /* Decide in target_environment.  */
    110113      } export ENUM_BITFIELD (2);
     114#ifdef CONFIG_WITH_COMPILER
     115    int recursive_without_dollar : 2; /* 0 if undetermined, 1 if value has no '$' chars, -1 if it has. */
     116#endif
    111117#ifdef CONFIG_WITH_MAKE_STATS
    112118    unsigned int changes;      /* Variable modification count.  */
     
    133139      (v)->expand_count = 0; \
    134140      (v)->evalval_count = 0; \
     141      (v)->recursive_without_dollar = 0; \
    135142    } while (0)
    136143#else
    137144# define VARIABLE_CHANGED(v) MAKE_STATS_2((v)->changes++)
     145#endif
     146
     147/* Macro that avoids a lot of CONFIG_WITH_COMPILER checks when
     148   accessing recursive_without_dollar. */
     149#ifdef CONFIG_WITH_COMPILER
     150# define IS_VARIABLE_RECURSIVE_WITHOUT_DOLLAR(v) ((v)->recursive_without_dollar > 0)
     151#else
     152# define IS_VARIABLE_RECURSIVE_WITHOUT_DOLLAR(v) 0
    138153#endif
    139154
Note: See TracChangeset for help on using the changeset viewer.