Report all stack errors in the EVM code transform.

This commit is contained in:
Daniel Kirchner
2020-07-16 17:38:04 +02:00
committed by chriseth
parent f9753a5101
commit 579e4b5a69
5 changed files with 27 additions and 48 deletions
+2 -1
View File
@@ -59,5 +59,6 @@ void EVMObjectCompiler::run(Object& _object, bool _optimize)
// which should be native to this part of the code.
CodeTransform transform{m_assembly, *_object.analysisInfo, *_object.code, m_dialect, context, _optimize, m_evm15};
transform(*_object.code);
yulAssert(transform.stackErrors().empty(), "Stack errors present but not thrown.");
if (!transform.stackErrors().empty())
BOOST_THROW_EXCEPTION(transform.stackErrors().front());
}