@@ -68,7 +68,6 @@ struct VarDescr {
6868 enum { _Last = 1 , _Unused = 2 };
6969 int flags;
7070 enum {
71- _Const = 16 ,
7271 _Int = 32 ,
7372 _Zero = 64 ,
7473 _NonZero = 128 ,
@@ -79,16 +78,15 @@ struct VarDescr {
7978 _Even = 16384 ,
8079 _Odd = 32768 ,
8180 };
82- static constexpr int ConstZero = _Const | _Int | _Zero | _Pos | _Neg | _Finite | _Even;
83- static constexpr int ConstOne = _Const | _Int | _NonZero | _Pos | _Finite | _Odd;
84- static constexpr int ConstTrue = _Const | _Int | _NonZero | _Neg | _Finite | _Odd;
81+ static constexpr int ConstZero = _Int | _Zero | _Pos | _Neg | _Finite | _Even;
82+ static constexpr int ConstOne = _Int | _NonZero | _Pos | _Finite | _Odd;
83+ static constexpr int ConstTrue = _Int | _NonZero | _Neg | _Finite | _Odd;
8584 static constexpr int ValBit = _Int | _Pos | _Finite;
8685 static constexpr int ValBool = _Int | _Neg | _Finite;
8786 static constexpr int FiniteInt = _Int | _Finite;
8887 static constexpr int FiniteUInt = _Int | _Finite | _Pos;
8988 int val;
9089 td::RefInt256 int_const;
91- std::string str_const;
9290
9391 explicit VarDescr (var_idx_t _idx = -1 , int _flags = 0 , int _val = 0 ) : idx(_idx), flags(_flags), val(_val) {
9492 }
@@ -120,7 +118,12 @@ struct VarDescr {
120118 return val & _Odd;
121119 }
122120 bool is_int_const () const {
123- return (val & (_Int | _Const)) == (_Int | _Const) && int_const.not_null ();
121+ #ifdef TOLK_DEBUG
122+ if (int_const.not_null ()) {
123+ tolk_assert (val & _Int);
124+ }
125+ #endif
126+ return int_const.not_null ();
124127 }
125128 bool always_nonpos () const {
126129 return val & _Neg;
@@ -151,7 +154,7 @@ struct VarDescr {
151154 }
152155 void set_const (long long value);
153156 void set_const (td::RefInt256 value);
154- void set_const (std::string value);
157+ void set_const (const std::string& value);
155158 void operator +=(const VarDescr& y) {
156159 flags &= y.flags ;
157160 }
0 commit comments