diff options
author | chriseth <chris@ethereum.org> | 2018-02-06 19:20:00 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-02-07 05:51:30 +0800 |
commit | c961a3079dda8735363872cdb84c489d61846003 (patch) | |
tree | 8048fd3fbdd4f14031255344bfa1375a18d83e0f /libjulia/optimiser/ExpressionSimplifier.cpp | |
parent | 5523296eaa68a591a331d9b75dc19cf11d1c538e (diff) | |
download | dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.tar dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.tar.gz dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.tar.bz2 dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.tar.lz dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.tar.xz dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.tar.zst dexon-solidity-c961a3079dda8735363872cdb84c489d61846003.zip |
Turn simplification rule tuple into struct.
Diffstat (limited to 'libjulia/optimiser/ExpressionSimplifier.cpp')
-rw-r--r-- | libjulia/optimiser/ExpressionSimplifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libjulia/optimiser/ExpressionSimplifier.cpp b/libjulia/optimiser/ExpressionSimplifier.cpp index bdcf3168..3d471cb3 100644 --- a/libjulia/optimiser/ExpressionSimplifier.cpp +++ b/libjulia/optimiser/ExpressionSimplifier.cpp @@ -43,8 +43,8 @@ void ExpressionSimplifier::visit(Expression& _expression) // Do not apply the rule if it removes non-constant parts of the expression. // TODO: The check could actually be less strict than "movable". // We only require "Does not cause side-effects". - if (std::get<2>(*match) && !MovableChecker(_expression).movable()) + if (match->removesNonConstants && !MovableChecker(_expression).movable()) return; - _expression = std::get<1>(*match)().toExpression(locationOf(_expression)); + _expression = match->action().toExpression(locationOf(_expression)); } } |