mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
[FunC] Refactor allow-post-modification, stop producing disabled Op::_Let
Before, #pragma allow-post-modification produced Op::_Let for every tensor entity (which became non-disabled if modification really happened). Although they are stripped off by the compiler and don't affect fif output, they pollute intermediate "AST" representation (ops). Now, Op::_Let is added only if var modification actually happens (which is very uncommon for real-wise code)
This commit is contained in:
parent
1e4b20a061
commit
aee51731ce
2 changed files with 24 additions and 22 deletions
|
@ -1431,10 +1431,7 @@ void detect_if_function_just_wraps_another(SymValCodeFunc* v_current, const td::
|
|||
func_assert(op_import && op_import->cl == Op::_Import);
|
||||
|
||||
// then Op::_Call (anotherF)
|
||||
// when pragma allow-post-modification, it might be prepended with empty Op::_Let todo I don't like this
|
||||
const Op* op_call = op_import->next.get();
|
||||
while (op_call && op_call->cl == Op::_Let && op_call->disabled())
|
||||
op_call = op_call->next.get();
|
||||
if (!op_call || op_call->cl != Op::_Call)
|
||||
return;
|
||||
func_assert(op_call->left.size() == 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue