Refactor termination detection.

This commit is contained in:
chriseth
2019-05-13 18:58:36 +02:00
parent 1d75770700
commit 99e96c2d66
6 changed files with 89 additions and 54 deletions
+7 -1
View File
@@ -136,7 +136,13 @@ bool SemanticInformation::terminatesControlFlow(AssemblyItem const& _item)
{
if (_item.type() != Operation)
return false;
switch (_item.instruction())
else
return terminatesControlFlow(_item.instruction());
}
bool SemanticInformation::terminatesControlFlow(Instruction _instruction)
{
switch (_instruction)
{
case Instruction::RETURN:
case Instruction::SELFDESTRUCT: