diff options
author | chriseth <chris@ethereum.org> | 2018-09-10 22:33:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 22:33:47 +0800 |
commit | 6402b8382661ae738faa07c9dbd9af6358e61f6c (patch) | |
tree | 77a6636ab3583bbd240e1203ab8fd6b6d7819cc2 /libsolidity/codegen/ExpressionCompiler.cpp | |
parent | b9164eaba2a192428a27bac045c529c438599af7 (diff) | |
parent | 3b7be594cf046cc34864cefbd3cf0f5159770163 (diff) | |
download | dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.tar dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.tar.gz dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.tar.bz2 dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.tar.lz dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.tar.xz dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.tar.zst dexon-solidity-6402b8382661ae738faa07c9dbd9af6358e61f6c.zip |
Merge pull request #4938 from ethereum/expCleanup0425
[backport] Exp cleanup
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; |