Merge pull request #13238 from ethereum/improve-stack-too-deep-message

Improved stack too deep message when compiled without --optimize
This commit is contained in:
Kamil Śliwak
2022-07-06 12:43:36 +02:00
committed by GitHub
+3 -1
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;