Merge remote-tracking branch 'origin/topic/johanna/1095-just-get-rid-of-it'

* origin/topic/johanna/1095-just-get-rid-of-it:
  Re-add TYPE_COUNTER without function and deprecation marker.
  Completely remove all traces of the COUNTER type.
This commit is contained in:
Johanna Amann 2020-08-03 10:37:07 -07:00
commit 22b401f52f
26 changed files with 24 additions and 69 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));