mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Get rid of recursion in tvm continuations
This commit is contained in:
parent
eea95aeebb
commit
b5734d2e30
3 changed files with 72 additions and 66 deletions
|
@ -370,7 +370,11 @@ class VmState final : public VmStateInterface {
|
|||
throw VmFatal{};
|
||||
}
|
||||
int jump_to(Ref<Continuation> cont) {
|
||||
return cont->is_unique() ? cont.unique_write().jump_w(this) : cont->jump(this);
|
||||
int res = 0;
|
||||
while (cont.not_null()) {
|
||||
cont = cont->is_unique() ? cont.unique_write().jump_w(this, res) : cont->jump(this, res);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
static Ref<CellSlice> convert_code_cell(Ref<Cell> code_cell);
|
||||
bool try_commit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue