mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
removed unused EventBodyList subclass
This commit is contained in:
parent
eb1848c547
commit
c30f787949
2 changed files with 0 additions and 76 deletions
58
src/Stmt.cc
58
src/Stmt.cc
|
@ -1655,64 +1655,6 @@ TraversalCode StmtList::Traverse(TraversalCallback* cb) const
|
|||
HANDLE_TC_STMT_POST(tc);
|
||||
}
|
||||
|
||||
ValPtr EventBodyList::Exec(Frame* f, StmtFlowType& flow) const
|
||||
{
|
||||
RegisterAccess();
|
||||
flow = FLOW_NEXT;
|
||||
|
||||
for ( const auto& stmt : stmts )
|
||||
{
|
||||
f->SetNextStmt(stmt);
|
||||
|
||||
// Ignore the return value, since there shouldn't be
|
||||
// any; and ignore the flow, since we still execute
|
||||
// all of the event bodies even if one of them does
|
||||
// a FLOW_RETURN.
|
||||
if ( ! pre_execute_stmt(stmt, f) )
|
||||
{ // ### Abort or something
|
||||
}
|
||||
|
||||
auto result = stmt->Exec(f, flow);
|
||||
|
||||
if ( ! post_execute_stmt(stmt, f, result.get(), &flow) )
|
||||
{ // ### Abort or something
|
||||
}
|
||||
}
|
||||
|
||||
// Simulate a return so the hooks operate properly.
|
||||
StmtFlowType ft = FLOW_RETURN;
|
||||
(void) post_execute_stmt(f->GetNextStmt(), f, nullptr, &ft);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void EventBodyList::StmtDescribe(ODesc* d) const
|
||||
{
|
||||
if ( d->IsReadable() && stmts.length() > 0 )
|
||||
{
|
||||
for ( const auto& stmt : stmts )
|
||||
{
|
||||
if ( ! d->IsBinary() )
|
||||
{
|
||||
d->Add("{");
|
||||
d->PushIndent();
|
||||
stmt->AccessStats(d);
|
||||
}
|
||||
|
||||
stmt->Describe(d);
|
||||
|
||||
if ( ! d->IsBinary() )
|
||||
{
|
||||
d->Add("}");
|
||||
d->PopIndent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
StmtList::StmtDescribe(d);
|
||||
}
|
||||
|
||||
InitStmt::InitStmt(std::vector<IDPtr> arg_inits) : Stmt(STMT_INIT)
|
||||
{
|
||||
inits = std::move(arg_inits);
|
||||
|
|
18
src/Stmt.h
18
src/Stmt.h
|
@ -372,23 +372,6 @@ protected:
|
|||
StmtPList stmts;
|
||||
};
|
||||
|
||||
class EventBodyList final : public StmtList {
|
||||
public:
|
||||
EventBodyList() : StmtList()
|
||||
{ topmost = false; tag = STMT_EVENT_BODY_LIST; }
|
||||
|
||||
ValPtr Exec(Frame* f, StmtFlowType& flow) const override;
|
||||
|
||||
void StmtDescribe(ODesc* d) const override;
|
||||
|
||||
// "Topmost" means that this is the main body of a function or event.
|
||||
// void SetTopmost(bool is_topmost) { topmost = is_topmost; }
|
||||
// bool IsTopmost() { return topmost; }
|
||||
|
||||
protected:
|
||||
bool topmost;
|
||||
};
|
||||
|
||||
class InitStmt final : public Stmt {
|
||||
public:
|
||||
explicit InitStmt(std::vector<IDPtr> arg_inits);
|
||||
|
@ -474,7 +457,6 @@ using BreakStmt [[deprecated("Remove in v4.1. Use zeek::detail::BreakStmt instea
|
|||
using FallthroughStmt [[deprecated("Remove in v4.1. Use zeek::detail::FallthroughStmt instead.")]] = zeek::detail::FallthroughStmt;
|
||||
using ReturnStmt [[deprecated("Remove in v4.1. Use zeek::detail::ReturnStmt instead.")]] = zeek::detail::ReturnStmt;
|
||||
using StmtList [[deprecated("Remove in v4.1. Use zeek::detail::StmtList instead.")]] = zeek::detail::StmtList;
|
||||
using EventBodyList [[deprecated("Remove in v4.1. Use zeek::detail::EventBodyList instead.")]] = zeek::detail::EventBodyList;
|
||||
using InitStmt [[deprecated("Remove in v4.1. Use zeek::detail::InitStmt instead.")]] = zeek::detail::InitStmt;
|
||||
using NullStmt [[deprecated("Remove in v4.1. Use zeek::detail::NullStmt instead.")]] = zeek::detail::NullStmt;
|
||||
using WhenStmt [[deprecated("Remove in v4.1. Use zeek::detail::WhenStmt instead.")]] = zeek::detail::WhenStmt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue