mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
tracking of optimization information associated with expressions
This commit is contained in:
parent
3ac725f44b
commit
074b18f3e8
3 changed files with 36 additions and 0 deletions
12
src/Expr.h
12
src/Expr.h
|
@ -117,6 +117,8 @@ using RefExprPtr = IntrusivePtr<RefExpr>;
|
|||
class Stmt;
|
||||
using StmtPtr = IntrusivePtr<Stmt>;
|
||||
|
||||
class ExprOptInfo;
|
||||
|
||||
class Expr : public Obj {
|
||||
public:
|
||||
const TypePtr& GetType() const
|
||||
|
@ -389,6 +391,12 @@ public:
|
|||
return Obj::GetLocationInfo();
|
||||
}
|
||||
|
||||
// Access script optimization information associated with
|
||||
// this statement.
|
||||
ExprOptInfo* GetOptInfo() const { return opt_info; }
|
||||
|
||||
~Expr() override;
|
||||
|
||||
protected:
|
||||
Expr() = default;
|
||||
explicit Expr(BroExprTag arg_tag);
|
||||
|
@ -418,6 +426,10 @@ protected:
|
|||
// derived, if any. Used as an aid for generating meaningful
|
||||
// and correctly-localized error messages.
|
||||
ExprPtr original = nullptr;
|
||||
|
||||
// Information associated with the Expr for purposes of
|
||||
// script optimization.
|
||||
ExprOptInfo* opt_info;
|
||||
};
|
||||
|
||||
class NameExpr final : public Expr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue