1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

[FunC] Make Expr::VarApply always impure (#1381)

Expr::_VarApply is now always impure. It means, that
for `some_var()`, don't make any considerations about runtime value,
it's always called.
This commit is contained in:
tolk-vm 2024-11-14 18:32:04 +03:00 committed by GitHub
parent 89f136e670
commit f00ff75548
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 137 additions and 2 deletions

View file

@ -427,7 +427,7 @@ Expr* make_func_apply(Expr* fun, Expr* x) {
res->flags = Expr::_IsRvalue | (fun->flags & Expr::_IsImpure);
} else {
res = new Expr{Expr::_VarApply, {fun, x}};
res->flags = Expr::_IsRvalue;
res->flags = Expr::_IsRvalue | Expr::_IsImpure; // for `some_var()`, don't make any considerations about runtime value, it's impure
}
return res;
}