aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-11 18:41:50 +0800
committerchriseth <c@ethdev.com>2016-11-16 21:37:18 +0800
commite51f852504556f952ae1350c070409e3c4981cc0 (patch)
tree245a5605753ceca004513945a88f33fbc8fed81b /libsolidity/codegen/ExpressionCompiler.cpp
parente543bd34c0b4884b5a27555f698f50af6a1c0b81 (diff)
downloaddexon-solidity-e51f852504556f952ae1350c070409e3c4981cc0.tar.gz
dexon-solidity-e51f852504556f952ae1350c070409e3c4981cc0.tar.zst
dexon-solidity-e51f852504556f952ae1350c070409e3c4981cc0.zip
Converted sub assembly to smart pointer.
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 83c3a2c4..7a328528 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -528,8 +528,11 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
// copy the contract's code into memory
eth::Assembly const& assembly = m_context.compiledContract(contract);
utils().fetchFreeMemoryPointer();
+ // TODO we create a copy here, which is actually what we want.
+ // This should be revisited at the point where we fix
+ // https://github.com/ethereum/solidity/issues/1092
// pushes size
- eth::AssemblyItem subroutine = m_context.addSubroutine(assembly);
+ auto subroutine = m_context.addSubroutine(make_shared<eth::Assembly>(assembly));
m_context << Instruction::DUP1 << subroutine;
m_context << Instruction::DUP4 << Instruction::CODECOPY;