mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
tracking of optimization information associated with statements
This commit is contained in:
parent
ed3c87d253
commit
3ac725f44b
3 changed files with 39 additions and 0 deletions
|
@ -48,6 +48,8 @@ class Reducer;
|
|||
class Stmt;
|
||||
using StmtPtr = IntrusivePtr<Stmt>;
|
||||
|
||||
class StmtOptInfo;
|
||||
|
||||
class Stmt : public Obj {
|
||||
public:
|
||||
StmtTag Tag() const { return tag; }
|
||||
|
@ -160,6 +162,10 @@ public:
|
|||
return Obj::GetLocationInfo();
|
||||
}
|
||||
|
||||
// Access script optimization information associated with
|
||||
// this statement.
|
||||
StmtOptInfo* GetOptInfo() const { return opt_info; }
|
||||
|
||||
protected:
|
||||
explicit Stmt(StmtTag arg_tag);
|
||||
|
||||
|
@ -182,6 +188,10 @@ protected:
|
|||
// derived, if any. Used as an aid for generating meaningful
|
||||
// and correctly-localized error messages.
|
||||
StmtPtr original = nullptr;
|
||||
|
||||
// Information associated with the Stmt for purposes of
|
||||
// script optimization.
|
||||
StmtOptInfo* opt_info;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue