diff --git a/src/Stmt.cc b/src/Stmt.cc index 6211ff507d..58c1d712f8 100644 --- a/src/Stmt.cc +++ b/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 arg_inits) : Stmt(STMT_INIT) { inits = std::move(arg_inits); diff --git a/src/Stmt.h b/src/Stmt.h index 7bb9edecf2..c72dcad196 100644 --- a/src/Stmt.h +++ b/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 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;