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

@ -380,7 +380,10 @@ std::vector<var_idx_t> Expr::pre_compile(CodeBlob& code, std::vector<std::pair<S
}
res.push_back(tfunc[0]);
auto rvect = new_tmp_vect(code);
code.emplace_back(here, Op::_CallInd, rvect, std::move(res));
auto& op = code.emplace_back(here, Op::_CallInd, rvect, std::move(res));
if (flags & _IsImpure) {
op.flags |= Op::_Impure;
}
return rvect;
}
case _Const: {