diff options
author | chriseth <chris@ethereum.org> | 2018-09-04 22:51:22 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-09-10 20:27:57 +0800 |
commit | eb7978d6314b51b3b00dbc6155cedd799a5cd767 (patch) | |
tree | e920c115c5e79d1e4a62978848bafaefdb6a59b6 /libsolidity/codegen/ExpressionCompiler.cpp | |
parent | f190caf538f25baa200195baf6f7444927faf926 (diff) | |
download | dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.tar dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.tar.gz dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.tar.bz2 dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.tar.lz dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.tar.xz dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.tar.zst dexon-solidity-eb7978d6314b51b3b00dbc6155cedd799a5cd767.zip |
Always perform cleanup for EXP.
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 4bcc1fa9..f38c1e67 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -2069,7 +2069,9 @@ bool ExpressionCompiler::cleanupNeededForOp(Type::Category _type, Token::Value _ { if (Token::isCompareOp(_op) || Token::isShiftOp(_op)) return true; - else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod)) + else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod || _op == Token::Exp)) + // We need cleanup for EXP because 0**0 == 1, but 0**0x100 == 0 + // It would suffice to clean the exponent, though. return true; else return false; |