diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2019-10-22 14:03:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-22 14:03:09 -0700 |
commit | 2caeef9745366ad4c45f61dabedf1cd7f676a4a1 (patch) | |
tree | 4ddcc391429293e4a4e75d6ff23019ee9f71e781 /src/expr/mkmetakind | |
parent | 2bd74b751844230b82c58bfdd29666206562781d (diff) |
NodeValue: Eliminate redundant NBITS macros. (#3400)
Previously, the metakind header defined macros for the number of bits
reserved for fields in the NodeValue "header" (for the reference count,
the node kind, the number of children and the node id). These macros
were redundant, since the only one using them was the NodeValue itself,
which redefined them (while using them) as constants in the class.
Additionally, MAX_CHILDREN was defined (using these macros) not only
in the metakind header, but redefined in other places.
This commit defines the above values as constexpr members of the
NodeValue class and cleans up redundancy.
Diffstat (limited to 'src/expr/mkmetakind')
-rwxr-xr-x | src/expr/mkmetakind | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr/mkmetakind b/src/expr/mkmetakind index 1cfcf253a..fe8a152df 100755 --- a/src/expr/mkmetakind +++ b/src/expr/mkmetakind @@ -329,7 +329,7 @@ function register_metakind { ub=$nc elif expr "$nc" : '[0-9][0-9]*:$' >/dev/null; then let `echo "$nc" | awk 'BEGIN{FS=":"}{print"lb="$1}'` - ub=MAX_CHILDREN + ub="expr::NodeValue::MAX_CHILDREN" elif expr "$nc" : '[0-9][0-9]*:[0-9][0-9]*$' >/dev/null; then let `echo "$nc" | awk 'BEGIN{FS=":"}{print"lb="$1" ub="$2}'` if [ $ub -lt $lb ]; then |