mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
tweaks per reviewing feedback
This commit is contained in:
parent
da72c1ea93
commit
702172079a
5 changed files with 14 additions and 14 deletions
|
@ -1066,8 +1066,8 @@ extern VectorValPtr vector_int_select(VectorTypePtr vt, const VectorVal* v1, con
|
|||
// aggregates, so that if any of them are Modifiable(), the associated
|
||||
// Trigger can register interest in changes to them.
|
||||
//
|
||||
// One Fine Day we should do the equivalent for accessing fields in records,
|
||||
// too.
|
||||
// TODO: One Fine Day we should do the equivalent for accessing fields
|
||||
// in records, too.
|
||||
class IndexExprWhen final : public IndexExpr
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1801,8 +1801,8 @@ TraversalCode NullStmt::Traverse(TraversalCallback* cb) const
|
|||
HANDLE_TC_STMT_POST(tc);
|
||||
}
|
||||
|
||||
WhenInfo::WhenInfo(ExprPtr _cond, FuncType::CaptureList* _cl, bool _is_return)
|
||||
: cond(std::move(_cond)), cl(_cl), is_return(_is_return)
|
||||
WhenInfo::WhenInfo(ExprPtr arg_cond, FuncType::CaptureList* arg_cl, bool arg_is_return)
|
||||
: cond(std::move(arg_cond)), cl(arg_cl), is_return(arg_is_return)
|
||||
{
|
||||
prior_vars = current_scope()->Vars();
|
||||
|
||||
|
@ -1861,7 +1861,7 @@ WhenInfo::WhenInfo(ExprPtr _cond, FuncType::CaptureList* _cl, bool _is_return)
|
|||
arg_id->SetType(count_t);
|
||||
}
|
||||
|
||||
WhenInfo::WhenInfo(bool _is_return) : is_return(_is_return)
|
||||
WhenInfo::WhenInfo(bool arg_is_return) : is_return(arg_is_return)
|
||||
{
|
||||
// This won't be needed once we remove the deprecated semantics.
|
||||
cl = new zeek::FuncType::CaptureList;
|
||||
|
@ -2049,7 +2049,7 @@ void WhenInfo::BuildInvokeElems()
|
|||
invoke_timeout = make_intrusive<ListExpr>(three_const);
|
||||
}
|
||||
|
||||
WhenStmt::WhenStmt(WhenInfo* _wi) : Stmt(STMT_WHEN), wi(_wi)
|
||||
WhenStmt::WhenStmt(WhenInfo* arg_wi) : Stmt(STMT_WHEN), wi(arg_wi)
|
||||
{
|
||||
wi->Build(ThisPtr());
|
||||
|
||||
|
|
12
src/Stmt.h
12
src/Stmt.h
|
@ -546,19 +546,19 @@ class WhenInfo
|
|||
public:
|
||||
// Takes ownership of the CaptureList, which if nil signifies
|
||||
// old-style frame semantics.
|
||||
WhenInfo(ExprPtr _cond, FuncType::CaptureList* _cl, bool _is_return);
|
||||
WhenInfo(ExprPtr cond, FuncType::CaptureList* cl, bool is_return);
|
||||
|
||||
// Constructor used by script optimization to create a stub.
|
||||
WhenInfo(bool _is_return);
|
||||
WhenInfo(bool is_return);
|
||||
|
||||
~WhenInfo() { delete cl; }
|
||||
|
||||
void AddBody(StmtPtr _s) { s = std::move(_s); }
|
||||
void AddBody(StmtPtr arg_s) { s = std::move(arg_s); }
|
||||
|
||||
void AddTimeout(ExprPtr _timeout, StmtPtr _timeout_s)
|
||||
void AddTimeout(ExprPtr arg_timeout, StmtPtr arg_timeout_s)
|
||||
{
|
||||
timeout = std::move(_timeout);
|
||||
timeout_s = std::move(_timeout_s);
|
||||
timeout = std::move(arg_timeout);
|
||||
timeout_s = std::move(arg_timeout_s);
|
||||
}
|
||||
|
||||
// Complete construction of the associated internals, including
|
||||
|
|
|
@ -59,8 +59,6 @@ extern ValPtr when_invoke__CPP(Func* f, std::vector<ValPtr> args, Frame* frame,
|
|||
// Thrown when a call inside a "when" delays.
|
||||
class DelayedCallException : public InterpreterException
|
||||
{
|
||||
public:
|
||||
DelayedCallException() { }
|
||||
};
|
||||
|
||||
// Assigns the given value to the given global. A separate function because
|
||||
|
|
|
@ -7,6 +7,8 @@ If you make changes to the scripts, format them using
|
|||
|
||||
shfmt -w -i 4 -ci *.sh
|
||||
|
||||
(or set up "pre-commit" and use "pre-commit run -a")
|
||||
|
||||
The maintenance workflow:
|
||||
|
||||
1. Update this timestamp, so this file will be changed and you'll remember
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue