{
NodeId id;
std::unique_ptr<Expr> expr;
+ AnonConst (NodeId id, std::unique_ptr<Expr> expr)
+ : id (id), expr (std::move (expr))
+ {
+ rust_assert (this->expr != nullptr);
+ }
AnonConst (const AnonConst &other)
{
id = other.id;
- if (other.expr)
- expr = other.expr->clone_expr ();
+ expr = other.expr->clone_expr ();
}
AnonConst operator= (const AnonConst &other)
{
id = other.id;
- if (other.expr)
- expr = other.expr->clone_expr ();
+ expr = other.expr->clone_expr ();
return *this;
}
};
std::unique_ptr<Expr> expr)
: reg (reg), expr (std::move (expr))
{
- rust_assert (expr != nullptr);
+ rust_assert (this->expr != nullptr);
}
In (const struct In &other)
std::unique_ptr<Expr> expr)
: reg (reg), late (late), expr (std::move (expr))
{
- rust_assert (expr != nullptr);
+ rust_assert (this->expr != nullptr);
}
Out (const struct Out &other)
std::unique_ptr<Expr> expr)
: reg (reg), late (late), expr (std::move (expr))
{
- rust_assert (expr != nullptr);
+ rust_assert (this->expr != nullptr);
}
InOut (const struct InOut &other)
: reg (reg), late (late), in_expr (std::move (in_expr)),
out_expr (std::move (out_expr))
{
- rust_assert (in_expr != nullptr);
- rust_assert (out_expr != nullptr);
+ rust_assert (this->in_expr != nullptr);
+ rust_assert (this->out_expr != nullptr);
}
SplitInOut (const struct SplitInOut &other)
Sym (std::unique_ptr<Expr> expr) : expr (std::move (expr))
{
- rust_assert (expr != nullptr);
+ rust_assert (this->expr != nullptr);
}
Sym (const struct Sym &other)
{
Label (tl::optional<std::string> label_name, std::unique_ptr<Expr> expr)
: expr (std::move (expr))
{
- rust_assert (expr != nullptr);
+ rust_assert (this->expr != nullptr);
if (label_name.has_value ())
this->label_name = label_name.value ();
}