Remove deprecated attributes.

To be more exact: &encrypt, &mergeable, &rotate_interval, &rotate_size

Also removes no longer used redef-able constants:
log_rotate_interval, log_max_size, log_encryption_key

GH-243
This commit is contained in:
Johanna Amann 2019-05-20 14:04:04 -07:00
parent 0080c5ea09
commit 1ff2894af2
17 changed files with 17 additions and 561 deletions

View file

@ -1483,22 +1483,6 @@ int TableVal::Assign(Val* index, HashKey* k, Val* new_val, Opcode op)
BroType* yt = Type()->AsTableType()->YieldType();
if ( yt && yt->Tag() == TYPE_TABLE &&
new_val->AsTableVal()->FindAttr(ATTR_MERGEABLE) )
{
// Join two mergeable sets.
Val* old = Lookup(index, false);
if ( old && old->AsTableVal()->FindAttr(ATTR_MERGEABLE) )
{
if ( LoggingAccess() && op != OP_NONE )
StateAccess::Log(new StateAccess(OP_ASSIGN_IDX,
this, index, new_val, old));
new_val->AsTableVal()->AddTo(old->AsTableVal(), 0, false);
Unref(new_val);
return 1;
}
}
TableEntryVal* new_entry_val = new TableEntryVal(new_val);
HashKey k_copy(k->Key(), k->Size(), k->Hash());
TableEntryVal* old_entry_val = AsNonConstTable()->Insert(k, new_entry_val);
@ -2831,27 +2815,6 @@ RecordVal::~RecordVal()
void RecordVal::Assign(int field, Val* new_val, Opcode op)
{
if ( new_val && Lookup(field) &&
record_type->FieldType(field)->Tag() == TYPE_TABLE &&
new_val->AsTableVal()->FindAttr(ATTR_MERGEABLE) )
{
// Join two mergeable sets.
Val* old = Lookup(field);
if ( old->AsTableVal()->FindAttr(ATTR_MERGEABLE) )
{
if ( LoggingAccess() && op != OP_NONE )
{
StringVal* index = new StringVal(Type()->AsRecordType()->FieldName(field));
StateAccess::Log(new StateAccess(OP_ASSIGN_IDX, this, index, new_val, old));
Unref(index);
}
new_val->AsTableVal()->AddTo(old->AsTableVal(), 0, false);
Unref(new_val);
return;
}
}
Val* old_val = AsNonConstRecord()->replace(field, new_val);
if ( LoggingAccess() && op != OP_NONE )
@ -3213,28 +3176,6 @@ bool VectorVal::Assign(unsigned int index, Val* element, Opcode op)
BroType* yt = Type()->AsVectorType()->YieldType();
if ( yt && yt->Tag() == TYPE_TABLE &&
element->AsTableVal()->FindAttr(ATTR_MERGEABLE) )
{
// Join two mergeable sets.
Val* old = Lookup(index);
if ( old && old->AsTableVal()->FindAttr(ATTR_MERGEABLE) )
{
if ( LoggingAccess() && op != OP_NONE )
{
Val* ival = val_mgr->GetCount(index);
StateAccess::Log(new StateAccess(OP_ASSIGN_IDX,
this, ival, element,
(*val.vector_val)[index]));
Unref(ival);
}
element->AsTableVal()->AddTo(old->AsTableVal(), 0, false);
Unref(element);
return true;
}
}
Val* val_at_index = 0;
if ( index < val.vector_val->size() )