aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityExpressionCompiler.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-23 09:35:27 +0800
committerChristian <c@ethdev.com>2015-01-26 17:23:39 +0800
commit67073948af86ed22c8316aec70b031203b60c7da (patch)
tree1db7d9a34ca263ea6c5ecd29a6462db0613a4181 /SolidityExpressionCompiler.cpp
parentc86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539 (diff)
downloaddexon-solidity-67073948af86ed22c8316aec70b031203b60c7da.tar.gz
dexon-solidity-67073948af86ed22c8316aec70b031203b60c7da.tar.zst
dexon-solidity-67073948af86ed22c8316aec70b031203b60c7da.zip
Compilation of function modifiers.
Diffstat (limited to 'SolidityExpressionCompiler.cpp')
-rw-r--r--SolidityExpressionCompiler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/SolidityExpressionCompiler.cpp b/SolidityExpressionCompiler.cpp
index d50dc253..06c252db 100644
--- a/SolidityExpressionCompiler.cpp
+++ b/SolidityExpressionCompiler.cpp
@@ -118,8 +118,11 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _
CompilerContext context;
for (vector<string> const& function: _functions)
context.addFunction(dynamic_cast<FunctionDefinition const&>(resolveDeclaration(function, resolver)));
+ unsigned parametersSize = _localVariables.size(); // assume they are all one slot on the stack
+ context.adjustStackOffset(parametersSize);
for (vector<string> const& variable: _localVariables)
- context.addVariable(dynamic_cast<VariableDeclaration const&>(resolveDeclaration(variable, resolver)));
+ context.addVariable(dynamic_cast<VariableDeclaration const&>(resolveDeclaration(variable, resolver)),
+ parametersSize--);
ExpressionCompiler::compileExpression(context, *extractor.getExpression());