fix sc when the block after the delay slot is optimized out (#721)

This commit is contained in:
water111
2021-07-25 16:42:37 -04:00
committed by GitHub
parent f6534c2f3a
commit 92a5d84a5b
6 changed files with 127 additions and 17 deletions
@@ -3263,8 +3263,14 @@ void ShortCircuitElement::push_to_stack(const Env& env, FormPool& pool, FormStac
entry.condition->clear();
for (auto e : new_entries) {
if (dynamic_cast<EmptyElement*>(e)) {
continue;
}
entry.condition->push_back(e);
}
if (entry.condition->elts().empty()) {
entry.condition->push_back(pool.alloc_element<EmptyElement>());
}
}
}