diff options
author | chriseth <c@ethdev.com> | 2017-01-26 22:59:29 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-26 23:39:07 +0800 |
commit | ae2b59d18a181bfbcb563b91866611d2e5e55b41 (patch) | |
tree | 48179bcc76c053f5bb2ef397db86ac8f8667088e /libevmasm | |
parent | c2b3d8bcd28a3047a832cf813df14a97a5b01daa (diff) | |
download | dexon-solidity-ae2b59d18a181bfbcb563b91866611d2e5e55b41.tar.gz dexon-solidity-ae2b59d18a181bfbcb563b91866611d2e5e55b41.tar.zst dexon-solidity-ae2b59d18a181bfbcb563b91866611d2e5e55b41.zip |
Fix optimizer with regards to INVALID instruction.
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/PeepholeOptimiser.cpp | 1 | ||||
-rw-r--r-- | libevmasm/SemanticInformation.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libevmasm/PeepholeOptimiser.cpp b/libevmasm/PeepholeOptimiser.cpp index 923ffa67..528ce1c4 100644 --- a/libevmasm/PeepholeOptimiser.cpp +++ b/libevmasm/PeepholeOptimiser.cpp @@ -199,6 +199,7 @@ struct UnreachableCode it[0] != Instruction::JUMP && it[0] != Instruction::RETURN && it[0] != Instruction::STOP && + it[0] != Instruction::INVALID && it[0] != Instruction::SUICIDE ) return false; diff --git a/libevmasm/SemanticInformation.cpp b/libevmasm/SemanticInformation.cpp index 23a00d95..d3ce4735 100644 --- a/libevmasm/SemanticInformation.cpp +++ b/libevmasm/SemanticInformation.cpp @@ -118,6 +118,7 @@ bool SemanticInformation::altersControlFlow(AssemblyItem const& _item) case Instruction::RETURN: case Instruction::SUICIDE: case Instruction::STOP: + case Instruction::INVALID: return true; default: return false; |