mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
convert scopes to be managed using IntrusivePtr's
This commit is contained in:
parent
f2f041b63b
commit
efd03d41f8
16 changed files with 41 additions and 48 deletions
|
@ -672,7 +672,7 @@ void begin_func(IDPtr id, const char* module_name,
|
|||
|
||||
class OuterIDBindingFinder : public TraversalCallback {
|
||||
public:
|
||||
OuterIDBindingFinder(Scope* s)
|
||||
OuterIDBindingFinder(ScopePtr s)
|
||||
{
|
||||
scopes.emplace_back(s);
|
||||
}
|
||||
|
@ -680,7 +680,7 @@ public:
|
|||
TraversalCode PreExpr(const Expr*) override;
|
||||
TraversalCode PostExpr(const Expr*) override;
|
||||
|
||||
std::vector<Scope*> scopes;
|
||||
std::vector<ScopePtr> scopes;
|
||||
std::unordered_set<ID*> outer_id_references;
|
||||
};
|
||||
|
||||
|
@ -766,7 +766,7 @@ void end_func(StmtPtr body)
|
|||
ingredients.release();
|
||||
}
|
||||
|
||||
IDPList gather_outer_ids(Scope* scope, Stmt* body)
|
||||
IDPList gather_outer_ids(ScopePtr scope, StmtPtr body)
|
||||
{
|
||||
OuterIDBindingFinder cb(scope);
|
||||
body->Traverse(&cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue