mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add complex assigns to FunC and fix UB (#574)
* Fixed complex funC setglob cases * Forbid modifying local variables after using them in the same tensor * Fix analyzing "while" in func * Update funC version (#9) * Update stress tester * Fix using variable after move Co-authored-by: krigga <krigga7@gmail.com> Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
7347ec0b3b
commit
a1d8a5e4f3
4 changed files with 83 additions and 19 deletions
|
@ -810,6 +810,7 @@ VarDescrList Op::fwd_analyze(VarDescrList values) {
|
|||
break;
|
||||
}
|
||||
case _While: {
|
||||
auto values0 = values;
|
||||
values = block0->fwd_analyze(values);
|
||||
if (values[left[0]] && values[left[0]]->always_false()) {
|
||||
// block1 never executed
|
||||
|
@ -817,7 +818,7 @@ VarDescrList Op::fwd_analyze(VarDescrList values) {
|
|||
break;
|
||||
}
|
||||
while (true) {
|
||||
VarDescrList next_values = values | block0->fwd_analyze(block1->fwd_analyze(values));
|
||||
VarDescrList next_values = values | block0->fwd_analyze(values0 | block1->fwd_analyze(values));
|
||||
if (same_values(next_values, values)) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue