DescriptionProvide defines as local variables in if-expressions.
If-expressions can now access the values of variables defined at the
command line (using -D or -E). Undefined variables default to False.
This enables many if-expressions to be simplified, e.g.:
Before: <if expr="pp_ifdef('enable_foo')">
After: <if expr="enable_foo">
Before: <if expr="defs['foo'] == 'bar'">
After: <if expr="foo == 'bar'">
This also improves evaluation performance by caching compiled code
objects, leading to a 3x evaluation speedup while processing
generated_resources.grd (0.35 -> 0.12 sec on my machine).
R=joi@chromium.org
Committed: https://code.google.com/p/grit-i18n/source/detail?r=150
Patch Set 1 #
Total comments: 2
Patch Set 2 : fixed non-boolean expression #
Total comments: 1
Patch Set 3 : rebased past is_posix fix, fixed is_posix again and updated unittests #
Messages
Total messages: 5 (0 generated)
|