diff --git a/Compiler.cpp b/Compiler.cpp index 571a62d72..93cb172d8 100644 --- a/Compiler.cpp +++ b/Compiler.cpp @@ -89,10 +89,11 @@ void Compiler::appendFunctionSelector(vector> con eth::AssemblyItem jumpTableStart = m_context.pushNewTag(); m_context << eth::Instruction::ADD << eth::Instruction::JUMP; - // jump table @todo it could be that the optimizer destroys this - m_context << jumpTableStart; + // jump table, tell the optimizer not to remove the JUMPDESTs + m_context << eth::AssemblyItem(eth::NoOptimizeBegin) << jumpTableStart; for (pair> const& f: publicFunctions) m_context.appendJumpTo(f.second.second) << eth::Instruction::JUMPDEST; + m_context << eth::AssemblyItem(eth::NoOptimizeEnd); m_context << returnTag << eth::Instruction::STOP;