aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-10 02:22:24 +0800
committerLiana Husikyan <liana@ethdev.com>2015-03-10 19:02:48 +0800
commit74a01826ee9587ef9413e2ec808fcd53564f0b9d (patch)
treead0d4cb8d7996b0906d1d3230ab19f697a46ddaa /ExpressionCompiler.cpp
parent9c82cbeddf1b03cc99660a867de8720d1d174b9c (diff)
downloaddexon-solidity-74a01826ee9587ef9413e2ec808fcd53564f0b9d.tar.gz
dexon-solidity-74a01826ee9587ef9413e2ec808fcd53564f0b9d.tar.zst
dexon-solidity-74a01826ee9587ef9413e2ec808fcd53564f0b9d.zip
added information about jump type for jump instructions
Conflicts: libevmcore/Assembly.cpp libsolidity/Compiler.cpp
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index d2457e67..12926112 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -108,7 +108,8 @@ void ExpressionCompiler::appendStateVariableAccessor(VariableDeclaration const&
retSizeOnStack = returnType->getSizeOnStack();
}
solAssert(retSizeOnStack <= 15, "Stack too deep.");
- m_context << eth::dupInstruction(retSizeOnStack + 1) << eth::Instruction::JUMP;
+ m_context << eth::dupInstruction(retSizeOnStack + 1);
+ m_context.appendJump(eth::AssemblyItem::JumpType::OutOfFunction);
}
void ExpressionCompiler::appendTypeConversion(Type const& _typeOnStack, Type const& _targetType, bool _cleanupNeeded)
@@ -405,7 +406,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
}
_functionCall.getExpression().accept(*this);
- m_context.appendJump();
+ m_context.appendJump(eth::AssemblyItem::JumpType::IntoFunction);
m_context << returnLabel;
unsigned returnParametersSize = CompilerUtils::getSizeOnStack(function.getReturnParameterTypes());