diff options
Diffstat (limited to 'libjulia')
-rw-r--r-- | libjulia/backends/evm/EVMCodeTransform.cpp | 9 | ||||
-rw-r--r-- | libjulia/optimiser/ASTCopier.cpp | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/libjulia/backends/evm/EVMCodeTransform.cpp b/libjulia/backends/evm/EVMCodeTransform.cpp index 733e39e9..f92939be 100644 --- a/libjulia/backends/evm/EVMCodeTransform.cpp +++ b/libjulia/backends/evm/EVMCodeTransform.cpp @@ -125,11 +125,11 @@ void CodeTransform::operator()(FunctionCall const& _call) void CodeTransform::operator()(FunctionalInstruction const& _instruction) { if (m_evm15 && ( - _instruction.instruction.instruction == solidity::Instruction::JUMP || - _instruction.instruction.instruction == solidity::Instruction::JUMPI + _instruction.instruction == solidity::Instruction::JUMP || + _instruction.instruction == solidity::Instruction::JUMPI )) { - bool const isJumpI = _instruction.instruction.instruction == solidity::Instruction::JUMPI; + bool const isJumpI = _instruction.instruction == solidity::Instruction::JUMPI; if (isJumpI) { solAssert(_instruction.arguments.size() == 2, ""); @@ -150,7 +150,8 @@ void CodeTransform::operator()(FunctionalInstruction const& _instruction) { for (auto const& arg: _instruction.arguments | boost::adaptors::reversed) visitExpression(arg); - (*this)(_instruction.instruction); + m_assembly.setSourceLocation(_instruction.location); + m_assembly.appendInstruction(_instruction.instruction); } checkStackHeight(&_instruction); } diff --git a/libjulia/optimiser/ASTCopier.cpp b/libjulia/optimiser/ASTCopier.cpp index d777d731..a461f434 100644 --- a/libjulia/optimiser/ASTCopier.cpp +++ b/libjulia/optimiser/ASTCopier.cpp @@ -31,9 +31,10 @@ using namespace dev; using namespace dev::julia; -Statement ASTCopier::operator()(Instruction const& _instruction) +Statement ASTCopier::operator()(Instruction const&) { - return _instruction; + solAssert(false, "Invalid operation."); + return {}; } Statement ASTCopier::operator()(VariableDeclaration const& _varDecl) |