mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
Eliminate the "Clean up the block stack" logic in eval_block_node
The block stack is now sound, and no longer needs this ancient cleanup logic, which tried to account for cases where blocks were pushed but never popped.
This commit is contained in:
parent
0991e398bb
commit
3272505891
1 changed files with 0 additions and 12 deletions
|
@ -653,21 +653,9 @@ int parser_t::eval_block_node(node_offset_t node_idx, const io_chain_t &io,
|
||||||
job_reap(0); // not sure why we reap jobs here
|
job_reap(0); // not sure why we reap jobs here
|
||||||
|
|
||||||
// Start it up
|
// Start it up
|
||||||
const block_t *const start_current_block = current_block();
|
|
||||||
scope_block_t *scope_block = this->push_block<scope_block_t>(block_type);
|
scope_block_t *scope_block = this->push_block<scope_block_t>(block_type);
|
||||||
int result = ctx->eval_node_at_offset(node_idx, scope_block, io);
|
int result = ctx->eval_node_at_offset(node_idx, scope_block, io);
|
||||||
|
|
||||||
// Clean up the block stack.
|
|
||||||
this->pop_block(scope_block);
|
this->pop_block(scope_block);
|
||||||
while (start_current_block != current_block()) {
|
|
||||||
if (current_block() == NULL) {
|
|
||||||
debug(0, _(L"End of block mismatch. Program terminating."));
|
|
||||||
bugreport();
|
|
||||||
FATAL_EXIT();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this->pop_block(current_block());
|
|
||||||
}
|
|
||||||
|
|
||||||
job_reap(0); // reap again
|
job_reap(0); // reap again
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue