mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Control flow analysis for inline assembly.
This commit is contained in:
@@ -155,6 +155,26 @@ bool SemanticInformation::terminatesControlFlow(Instruction _instruction)
|
||||
}
|
||||
}
|
||||
|
||||
bool SemanticInformation::reverts(AssemblyItem const& _item)
|
||||
{
|
||||
if (_item.type() != Operation)
|
||||
return false;
|
||||
else
|
||||
return reverts(_item.instruction());
|
||||
}
|
||||
|
||||
bool SemanticInformation::reverts(Instruction _instruction)
|
||||
{
|
||||
switch (_instruction)
|
||||
{
|
||||
case Instruction::INVALID:
|
||||
case Instruction::REVERT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool SemanticInformation::isDeterministic(AssemblyItem const& _item)
|
||||
{
|
||||
if (_item.type() != Operation)
|
||||
|
||||
Reference in New Issue
Block a user