mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
switch cached Trigger values to be opaque-and-generic, rather than assuming CallExpr's
This commit is contained in:
parent
9ada7ac4e7
commit
5eb37e4c78
9 changed files with 50 additions and 40 deletions
11
src/Frame.h
11
src/Frame.h
|
@ -258,10 +258,16 @@ public:
|
|||
void ClearTrigger();
|
||||
trigger::Trigger* GetTrigger() const { return trigger.get(); }
|
||||
|
||||
void SetCall(const CallExpr* arg_call) { call = arg_call; }
|
||||
void ClearCall() { call = nullptr; }
|
||||
void SetCall(const CallExpr* arg_call)
|
||||
{
|
||||
call = arg_call;
|
||||
SetTriggerAssoc((void*)call);
|
||||
}
|
||||
const CallExpr* GetCall() const { return call; }
|
||||
|
||||
void SetTriggerAssoc(const void* arg_assoc) { assoc = arg_assoc; }
|
||||
const void* GetTriggerAssoc() const { return assoc; }
|
||||
|
||||
void SetCallLoc(const Location* loc) { call_loc = loc; }
|
||||
const detail::Location* GetCallLocation() const;
|
||||
|
||||
|
@ -388,6 +394,7 @@ private:
|
|||
|
||||
trigger::TriggerPtr trigger;
|
||||
const CallExpr* call = nullptr;
|
||||
const void* assoc = nullptr;
|
||||
const Location* call_loc = nullptr; // only needed if call is nil
|
||||
|
||||
std::unique_ptr<std::vector<ScriptFunc*>> functions_with_closure_frame_reference;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue