From 327250589194186113647c36d67b0956bec5f3ca Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 21 Jan 2017 15:41:07 -0800 Subject: [PATCH] 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. --- src/parser.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index 7d9901cdc..3e36aa872 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -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 // Start it up - const block_t *const start_current_block = current_block(); scope_block_t *scope_block = this->push_block(block_type); int result = ctx->eval_node_at_offset(node_idx, scope_block, io); - - // Clean up the block stack. 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