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
+3 -9
View File
@@ -231,18 +231,12 @@ void CodeGenerator::assemble(
_identifierAccess,
_useNamedLabelsForFunctions
);
try
{
transform(_parsedData);
}
catch (StackTooDeepError const& _e)
{
transform(_parsedData);
if (!transform.stackErrors().empty())
assertThrow(
false,
langutil::StackTooDeepError,
"Stack too deep when compiling inline assembly" +
(_e.comment() ? ": " + *_e.comment() : ".")
(transform.stackErrors().front().comment() ? ": " + *transform.stackErrors().front().comment() : ".")
);
}
yulAssert(transform.stackErrors().empty(), "Stack errors present but not thrown.");
}