mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Reasoning based optimizer.
This commit is contained in:
@@ -33,6 +33,15 @@ Literal Dialect::zeroLiteralForType(solidity::yul::YulString _type) const
|
||||
return {SourceLocation{}, LiteralKind::Number, "0"_yulstring, _type};
|
||||
}
|
||||
|
||||
|
||||
Literal Dialect::trueLiteral() const
|
||||
{
|
||||
if (boolType != defaultType)
|
||||
return {SourceLocation{}, LiteralKind::Boolean, "true"_yulstring, boolType};
|
||||
else
|
||||
return {SourceLocation{}, LiteralKind::Number, "1"_yulstring, defaultType};
|
||||
}
|
||||
|
||||
bool Dialect::validTypeForLiteral(LiteralKind _kind, YulString, YulString _type) const
|
||||
{
|
||||
if (_kind == LiteralKind::Boolean)
|
||||
|
||||
Reference in New Issue
Block a user