Improved stack too deep message when compiled without --optimize

This commit is contained in:
hrkrshnn 2022-07-03 14:03:00 +02:00
parent 48669b4bec
commit 0b2a670a94

View File

@ -26,6 +26,7 @@
#include <libyul/Utilities.h>
#include <libsolutil/Visitor.h>
#include <libsolutil/StackTooDeepString.h>
#include <liblangutil/Exceptions.h>
@ -785,7 +786,8 @@ size_t CodeTransform::variableHeightDiff(Scope::Variable const& _var, YulString
_varName.str() +
" is " +
to_string(heightDiff - limit) +
" slot(s) too deep inside the stack."
" slot(s) too deep inside the stack. " +
stackTooDeepString
);
m_assembly.markAsInvalid();
return _forSwap ? 2 : 1;