mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Reduce the size of Func::Body quite a bit with some extra packing
This commit is contained in:
parent
72c79006ac
commit
2cfa5e79fa
2 changed files with 3 additions and 2 deletions
|
@ -564,7 +564,7 @@ void ScriptFunc::AddBody(StmtPtr new_body, const std::vector<IDPtr>& new_inits,
|
|||
|
||||
Body b;
|
||||
b.stmts = new_body;
|
||||
b.groups = groups;
|
||||
b.groups = {groups.begin(), groups.end()};
|
||||
current_body = new_body;
|
||||
current_priority = b.priority = priority;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
@ -66,8 +67,8 @@ public:
|
|||
|
||||
struct Body {
|
||||
detail::StmtPtr stmts;
|
||||
std::forward_list<EventGroupPtr> groups;
|
||||
int priority;
|
||||
std::set<EventGroupPtr> groups;
|
||||
// If any of the groups are disabled, this body is disabled.
|
||||
// The disabled field is updated from EventGroup instances.
|
||||
bool disabled = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue