mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
A series of FunC improvements (#378)
* Don't use IFJMP/IFNOTJMP in inline functions * Fix incorrect ifelse branch code generation https://github.com/ton-blockchain/ton/issues/374 * Make generate_code_all clearer * Don't replace IFJMP with IF in inner blocks in inline functions * Allow unbalance if/else by using RETALT * Fix wrong PUSHCONT * Bugfix in IF code generation for inline functions * Fix unbalanced if/else * Bugfix and improvements in code generation * Fix analyzing while(0) in func https://github.com/ton-blockchain/ton/issues/377 * FunC and Asm.fif: Fix inlining large functions https://github.com/ton-blockchain/ton/issues/375 Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
fecf760aae
commit
40cec56e28
5 changed files with 144 additions and 81 deletions
|
@ -586,7 +586,7 @@ bool prune_unreachable(std::unique_ptr<Op>& ops) {
|
|||
// block1 never executed
|
||||
op.block0->last().next = std::move(op.next);
|
||||
ops = std::move(op.block0);
|
||||
return false;
|
||||
return prune_unreachable(ops);
|
||||
} else if (c_var && c_var->always_true()) {
|
||||
if (!prune_unreachable(op.block1)) {
|
||||
// block1 never returns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue