mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #3536 from leonardoalt/fix_compilation_3530
Fix compilation problem from issue 3530
This commit is contained in:
commit
3f7e82d00b
@ -41,7 +41,7 @@ SimplificationRule<Pattern> const* SimplificationRules::findFirstMatch(Expressio
|
|||||||
|
|
||||||
static SimplificationRules rules;
|
static SimplificationRules rules;
|
||||||
|
|
||||||
FunctionalInstruction const& instruction = boost::get<FunctionalInstruction const&>(_expr);
|
FunctionalInstruction const& instruction = boost::get<FunctionalInstruction>(_expr);
|
||||||
for (auto const& rule: rules.m_rules[byte(instruction.instruction)])
|
for (auto const& rule: rules.m_rules[byte(instruction.instruction)])
|
||||||
{
|
{
|
||||||
rules.resetMatchGroups();
|
rules.resetMatchGroups();
|
||||||
@ -100,7 +100,7 @@ bool Pattern::matches(Expression const& _expr) const
|
|||||||
{
|
{
|
||||||
if (_expr.type() != typeid(Literal))
|
if (_expr.type() != typeid(Literal))
|
||||||
return false;
|
return false;
|
||||||
Literal const& literal = boost::get<Literal const&>(_expr);
|
Literal const& literal = boost::get<Literal>(_expr);
|
||||||
if (literal.kind != assembly::LiteralKind::Number)
|
if (literal.kind != assembly::LiteralKind::Number)
|
||||||
return false;
|
return false;
|
||||||
if (m_data && *m_data != u256(literal.value))
|
if (m_data && *m_data != u256(literal.value))
|
||||||
@ -111,7 +111,7 @@ bool Pattern::matches(Expression const& _expr) const
|
|||||||
{
|
{
|
||||||
if (_expr.type() != typeid(FunctionalInstruction))
|
if (_expr.type() != typeid(FunctionalInstruction))
|
||||||
return false;
|
return false;
|
||||||
FunctionalInstruction const& instr = boost::get<FunctionalInstruction const&>(_expr);
|
FunctionalInstruction const& instr = boost::get<FunctionalInstruction>(_expr);
|
||||||
if (m_instruction != instr.instruction)
|
if (m_instruction != instr.instruction)
|
||||||
return false;
|
return false;
|
||||||
assertThrow(m_arguments.size() == instr.arguments.size(), OptimizerException, "");
|
assertThrow(m_arguments.size() == instr.arguments.size(), OptimizerException, "");
|
||||||
@ -168,7 +168,7 @@ Expression Pattern::toExpression(SourceLocation const& _location) const
|
|||||||
|
|
||||||
u256 Pattern::d() const
|
u256 Pattern::d() const
|
||||||
{
|
{
|
||||||
Literal const& literal = boost::get<Literal const&>(matchGroupValue());
|
Literal const& literal = boost::get<Literal>(matchGroupValue());
|
||||||
assertThrow(literal.kind == assembly::LiteralKind::Number, OptimizerException, "");
|
assertThrow(literal.kind == assembly::LiteralKind::Number, OptimizerException, "");
|
||||||
return u256(literal.value);
|
return u256(literal.value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user