Completely remove all traces of the COUNTER type.

Relates to GH-1095
This commit is contained in:
Johanna Amann 2020-07-30 12:10:54 -07:00
parent 01fa5611ef
commit 417a6eb1e9
28 changed files with 79 additions and 140 deletions

View file

@ -1685,12 +1685,9 @@ BitExpr::BitExpr(BroExprTag arg_tag, ExprPtr arg_op1, ExprPtr arg_op2)
if ( IsVector(bt2) )
bt2 = t2->AsVectorType()->Yield()->Tag();
if ( (bt1 == zeek::TYPE_COUNT || bt1 == zeek::TYPE_COUNTER) &&
(bt2 == zeek::TYPE_COUNT || bt2 == zeek::TYPE_COUNTER) )
if ( (bt1 == zeek::TYPE_COUNT) && (bt2 == zeek::TYPE_COUNT) )
{
if ( bt1 == zeek::TYPE_COUNTER && bt2 == zeek::TYPE_COUNTER )
ExprError("cannot apply a bitwise operator to two \"counter\" operands");
else if ( is_vector(op1) || is_vector(op2) )
if ( is_vector(op1) || is_vector(op2) )
SetType(zeek::make_intrusive<zeek::VectorType>(base_type(zeek::TYPE_COUNT)));
else
SetType(base_type(zeek::TYPE_COUNT));