make externally available the expression used for initializating a record field

This commit is contained in:
Vern Paxson 2024-04-08 17:54:58 -04:00 committed by Tim Wojtulewicz
parent 88ef6cb5b6
commit 9fe7d8581f
2 changed files with 10 additions and 1 deletions

View file

@ -36,6 +36,7 @@ class Expr;
class ListExpr;
class ZAMCompiler;
using ExprPtr = IntrusivePtr<Expr>;
using ListExprPtr = IntrusivePtr<ListExpr>;
// The following tracks how to initialize a given record field.
@ -48,6 +49,10 @@ public:
// Can initialization of the field be deferred?
virtual bool IsDeferrable() const { return true; }
// Returns the expression evaluated to initialize the field, if any.
// (Used for script optimization.)
virtual ExprPtr InitExpr() const;
};
} // namespace detail