aboutsummaryrefslogtreecommitdiffstats
path: root/Compiler.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-07 09:13:31 +0800
committerChristian <c@ethdev.com>2014-11-07 09:13:31 +0800
commitdc8fb45e1f1d098442458f14d80c343e4a445619 (patch)
treece2bbcf7ce70813ce6f891e1df5408428cecdd77 /Compiler.cpp
parentb66e58d6c9cb1684bac548406f6a950bf0eb65e3 (diff)
parentafa4e9f5754eff97904a3332ca23f0913d736688 (diff)
downloaddexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.tar
dexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.tar.gz
dexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.tar.bz2
dexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.tar.lz
dexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.tar.xz
dexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.tar.zst
dexon-solidity-dc8fb45e1f1d098442458f14d80c343e4a445619.zip
Merge remote-tracking branch 'ethereum/develop' into sol_optimizer
Diffstat (limited to 'Compiler.cpp')
-rw-r--r--Compiler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Compiler.cpp b/Compiler.cpp
index 93cb172d..9ae8d7c6 100644
--- a/Compiler.cpp
+++ b/Compiler.cpp
@@ -272,7 +272,7 @@ bool Compiler::visit(Return& _return)
{
ExpressionCompiler::compileExpression(m_context, *expression);
VariableDeclaration const& firstVariable = *_return.getFunctionReturnParameters().getParameters().front();
- ExpressionCompiler::cleanHigherOrderBitsIfNeeded(*expression->getType(), *firstVariable.getType());
+ ExpressionCompiler::appendTypeConversion(m_context, *expression->getType(), *firstVariable.getType());
int stackPosition = m_context.getStackPositionOfVariable(firstVariable);
m_context << eth::swapInstruction(stackPosition) << eth::Instruction::POP;
}
@@ -285,8 +285,9 @@ bool Compiler::visit(VariableDefinition& _variableDefinition)
if (Expression* expression = _variableDefinition.getExpression())
{
ExpressionCompiler::compileExpression(m_context, *expression);
- ExpressionCompiler::cleanHigherOrderBitsIfNeeded(*expression->getType(),
- *_variableDefinition.getDeclaration().getType());
+ ExpressionCompiler::appendTypeConversion(m_context,
+ *expression->getType(),
+ *_variableDefinition.getDeclaration().getType());
int stackPosition = m_context.getStackPositionOfVariable(_variableDefinition.getDeclaration());
m_context << eth::swapInstruction(stackPosition) << eth::Instruction::POP;
}