aboutsummaryrefslogtreecommitdiffstats
path: root/Assembly.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-08-19 01:41:47 +0800
committerchriseth <c@ethdev.com>2015-08-19 03:22:43 +0800
commit34986ee4fcbea4d4f3609d9227864b640f021ffa (patch)
tree282fc2193a37c2269698e2689a5fc92fd90ce3da /Assembly.cpp
parent8fbecb9c27a457f4704f5b354cf780808b8948ab (diff)
downloaddexon-solidity-34986ee4fcbea4d4f3609d9227864b640f021ffa.tar.gz
dexon-solidity-34986ee4fcbea4d4f3609d9227864b640f021ffa.tar.zst
dexon-solidity-34986ee4fcbea4d4f3609d9227864b640f021ffa.zip
Detect unavailable items and do not optimise the chunk in that case.
Diffstat (limited to 'Assembly.cpp')
-rw-r--r--Assembly.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Assembly.cpp b/Assembly.cpp
index c96b6f40..a9b70eb4 100644
--- a/Assembly.cpp
+++ b/Assembly.cpp
@@ -337,6 +337,11 @@ Assembly& Assembly::optimise(bool _enable, bool _isCreation, size_t _runs)
// This might happen if the opcode reconstruction is not as efficient
// as the hand-crafted code.
}
+ catch (ItemNotAvailableException const&)
+ {
+ // This might happen if e.g. associativity and commutativity rules
+ // reorganise the expression tree, but not all leaves are available.
+ }
if (shouldReplace)
{