Recommend via-ir whenever a stack too deep error is encountered.

This commit is contained in:
hrkrshnn
2022-05-05 19:22:03 +02:00
parent 1dba6aafe4
commit 5ae17c8e65
11 changed files with 59 additions and 20 deletions
+2 -1
View File
@@ -31,6 +31,7 @@
#include <libsolutil/FunctionSelector.h>
#include <libsolutil/Whiskers.h>
#include <libsolutil/StackTooDeepString.h>
#include <libevmasm/Instruction.h>
#include <liblangutil/Exceptions.h>
@@ -242,7 +243,7 @@ void ArrayUtils::copyArrayToStorage(ArrayType const& _targetType, ArrayType cons
assertThrow(
2 + byteOffsetSize + sourceBaseType->sizeOnStack() <= 16,
StackTooDeepError,
"Stack too deep, try removing local variables."
util::stackTooDeepString
);
// fetch target storage reference
_context << dupInstruction(2 + byteOffsetSize + sourceBaseType->sizeOnStack());