aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-08 17:52:01 +0800
committerchriseth <c@ethdev.com>2015-06-08 17:52:01 +0800
commit27ac4d6d6facefcd5a8bf4156f920afaeacbeeef (patch)
tree5288ed4ed1e668880af0ac2ad6ff7392a172c45e
parentdc462dcb6e41da200557434a33461705d039bdc8 (diff)
parent13a20d837219588c9459d35d3f8ae714afc7668b (diff)
downloaddexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.tar
dexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.tar.gz
dexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.tar.bz2
dexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.tar.lz
dexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.tar.xz
dexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.tar.zst
dexon-solidity-27ac4d6d6facefcd5a8bf4156f920afaeacbeeef.zip
Merge pull request #2100 from chriseth/sol_stackTooDeep
Improved "Stack too deep" error message.
-rw-r--r--CommonSubexpressionEliminator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CommonSubexpressionEliminator.cpp b/CommonSubexpressionEliminator.cpp
index fe86908f..fadf2776 100644
--- a/CommonSubexpressionEliminator.cpp
+++ b/CommonSubexpressionEliminator.cpp
@@ -437,7 +437,7 @@ void CSECodeGenerator::appendDup(int _fromPosition, SourceLocation const& _locat
{
assertThrow(_fromPosition != c_invalidPosition, OptimizerException, "");
int instructionNum = 1 + m_stackHeight - _fromPosition;
- assertThrow(instructionNum <= 16, StackTooDeepException, "Stack too deep.");
+ assertThrow(instructionNum <= 16, StackTooDeepException, "Stack too deep, try removing local variables.");
assertThrow(1 <= instructionNum, OptimizerException, "Invalid stack access.");
appendItem(AssemblyItem(dupInstruction(instructionNum), _location));
m_stack[m_stackHeight] = m_stack[_fromPosition];
@@ -450,7 +450,7 @@ void CSECodeGenerator::appendOrRemoveSwap(int _fromPosition, SourceLocation cons
if (_fromPosition == m_stackHeight)
return;
int instructionNum = m_stackHeight - _fromPosition;
- assertThrow(instructionNum <= 16, StackTooDeepException, "Stack too deep.");
+ assertThrow(instructionNum <= 16, StackTooDeepException, "Stack too deep, try removing local variables.");
assertThrow(1 <= instructionNum, OptimizerException, "Invalid stack access.");
appendItem(AssemblyItem(swapInstruction(instructionNum), _location));