mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Address PR review feedback on zam-feature-complete
* insert_or_assign usage * master -> primary * FunctionIngredientsPtr * FuncType::Capture deprecations * no new ScriptFunc constructor
This commit is contained in:
parent
46d3526b40
commit
cb15e0d4f1
11 changed files with 71 additions and 53 deletions
13
src/Expr.h
13
src/Expr.h
|
@ -32,6 +32,7 @@ class WhenInfo;
|
|||
using IDPtr = IntrusivePtr<ID>;
|
||||
using ScopePtr = IntrusivePtr<Scope>;
|
||||
using ScriptFuncPtr = IntrusivePtr<ScriptFunc>;
|
||||
using FunctionIngredientsPtr = std::shared_ptr<FunctionIngredients>;
|
||||
|
||||
enum ExprTag : int
|
||||
{
|
||||
|
@ -1454,8 +1455,8 @@ protected:
|
|||
class LambdaExpr final : public Expr
|
||||
{
|
||||
public:
|
||||
LambdaExpr(std::shared_ptr<FunctionIngredients> ingredients, IDPList outer_ids,
|
||||
std::string name = "", StmtPtr when_parent = nullptr);
|
||||
LambdaExpr(FunctionIngredientsPtr ingredients, IDPList outer_ids, std::string name = "",
|
||||
StmtPtr when_parent = nullptr);
|
||||
|
||||
const std::string& Name() const { return my_name; }
|
||||
|
||||
|
@ -1474,9 +1475,9 @@ public:
|
|||
// Optimization-related:
|
||||
ExprPtr Duplicate() override;
|
||||
|
||||
const ScriptFuncPtr& MasterFunc() const { return master_func; }
|
||||
const ScriptFuncPtr& PrimaryFunc() const { return primary_func; }
|
||||
|
||||
const std::shared_ptr<FunctionIngredients>& Ingredients() const { return ingredients; }
|
||||
const FunctionIngredientsPtr& Ingredients() const { return ingredients; }
|
||||
|
||||
bool IsReduced(Reducer* c) const override;
|
||||
bool HasReducedOps(Reducer* c) const override;
|
||||
|
@ -1504,8 +1505,8 @@ private:
|
|||
|
||||
void UpdateCaptures(Reducer* c);
|
||||
|
||||
std::shared_ptr<FunctionIngredients> ingredients;
|
||||
ScriptFuncPtr master_func;
|
||||
FunctionIngredientsPtr ingredients;
|
||||
ScriptFuncPtr primary_func;
|
||||
IDPtr lambda_id;
|
||||
IDPList outer_ids;
|
||||
std::optional<CaptureList> captures;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue