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
commit 4c85cb880e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;