mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Change RecordVals to get resized at time of RecordType redef
Opposed to unconditionally checking all RecordVals whether they need to be resized after parsing ends.
This commit is contained in:
parent
da5fca7163
commit
a61ad9ea5c
4 changed files with 21 additions and 13 deletions
|
@ -924,14 +924,17 @@ public:
|
|||
// Extend the underlying arrays of record instances created during
|
||||
// parsing to match the number of fields in the record type (they may
|
||||
// mismatch as a result of parse-time record type redefinitions.
|
||||
static void ResizeParseTimeRecords();
|
||||
static void ResizeParseTimeRecords(RecordType* rt);
|
||||
|
||||
static void DoneParsing();
|
||||
|
||||
protected:
|
||||
Val* DoClone(CloneState* state) override;
|
||||
|
||||
BroObj* origin;
|
||||
|
||||
static vector<RecordVal*> parse_time_records;
|
||||
using RecordTypeValMap = std::unordered_map<RecordType*, std::vector<IntrusivePtr<RecordVal>>>;
|
||||
static RecordTypeValMap parse_time_records;
|
||||
};
|
||||
|
||||
class EnumVal : public Val {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue