mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Split structural simplifier.
This commit is contained in:
@@ -25,14 +25,8 @@ namespace yul
|
||||
|
||||
/**
|
||||
* Structural simplifier. Performs the following simplification steps:
|
||||
* - replace if with empty body with pop(condition)
|
||||
* - replace if with true condition with its body
|
||||
* - remove if with false condition
|
||||
* - remove empty default switch case
|
||||
* - remove empty switch case if no default case exists
|
||||
* - replace switch with no cases with pop(expression)
|
||||
* - turn switch with single case into if
|
||||
* - replace switch with only default case with pop(expression) and body
|
||||
* - replace switch with const expr with matching case body
|
||||
* - replace for with false condition by its initialization part
|
||||
*
|
||||
@@ -52,7 +46,6 @@ private:
|
||||
bool expressionAlwaysTrue(Expression const& _expression);
|
||||
bool expressionAlwaysFalse(Expression const& _expression);
|
||||
boost::optional<dev::u256> hasLiteralValue(Expression const& _expression) const;
|
||||
boost::optional<std::vector<Statement>> reduceNoCaseSwitch(Switch& _switchStmt) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user