diff options
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/CommonSubexpressionEliminator.cpp | 1 | ||||
-rw-r--r-- | libevmasm/CommonSubexpressionEliminator.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libevmasm/CommonSubexpressionEliminator.cpp b/libevmasm/CommonSubexpressionEliminator.cpp index 70324e7f..293cb02c 100644 --- a/libevmasm/CommonSubexpressionEliminator.cpp +++ b/libevmasm/CommonSubexpressionEliminator.cpp @@ -220,6 +220,7 @@ void CSECodeGenerator::addDependencies(Id _c) if (m_neededBy.count(_c)) return; // we already computed the dependencies for _c ExpressionClasses::Expression expr = m_expressionClasses.representative(_c); + assertThrow(expr.item, OptimizerException, ""); if (expr.item->type() == UndefinedItem) BOOST_THROW_EXCEPTION( // If this exception happens, we need to find a different way to generate the diff --git a/libevmasm/CommonSubexpressionEliminator.h b/libevmasm/CommonSubexpressionEliminator.h index f2473200..0b957a0e 100644 --- a/libevmasm/CommonSubexpressionEliminator.h +++ b/libevmasm/CommonSubexpressionEliminator.h @@ -147,7 +147,7 @@ private: AssemblyItems m_generatedItems; /// Current height of the stack relative to the start. - int m_stackHeight; + int m_stackHeight = 0; /// If (b, a) is in m_requests then b is needed to compute a. std::multimap<Id, Id> m_neededBy; /// Current content of the stack. |