This commit is contained in:
Alex Beregszaszi 2021-09-13 23:13:49 +01:00
parent 4d4dfbc456
commit 26f5db3b84
3 changed files with 10 additions and 8 deletions

View File

@ -212,7 +212,7 @@ public:
CompilerContext& appendJumpTo(
evmasm::AssemblyItem const& _tag,
evmasm::AssemblyItem::JumpType _jumpType = evmasm::AssemblyItem::JumpType::Ordinary
) { *m_asm << _tag.pushTag(); return appendJump(_jumpType); }
) { evmasm::AssemblyItem item = m_asm->appendStaticJump(_tag); item.setJumpType(_jumpType); return *this << item; }
/// Appends pushing of a new tag and @returns the new tag.
evmasm::AssemblyItem pushNewTag() { return m_asm->append(m_asm->newPushTag()).tag(); }
/// @returns a new tag without pushing any opcodes or data

View File

@ -1269,15 +1269,15 @@ void CompilerStack::assemble(
compiledContract.evmAssembly = _assembly;
solAssert(compiledContract.evmAssembly, "");
try
{
// try
// {
// Assemble deployment (incl. runtime) object.
compiledContract.object = compiledContract.evmAssembly->assemble();
}
catch (evmasm::AssemblyException const&)
{
solAssert(false, "Assembly exception for bytecode");
}
// }
// catch (evmasm::AssemblyException const&)
// {
// solAssert(false, "Assembly exception for bytecode");
// }
solAssert(compiledContract.object.immutableReferences.empty(), "Leftover immutables.");
compiledContract.evmRuntimeAssembly = _runtimeAssembly;

View File

@ -377,6 +377,8 @@ u256 EVMInstructionInterpreter::eval(
case Instruction::JUMP:
case Instruction::JUMPI:
case Instruction::JUMPDEST:
case Instruction::RJUMP:
case Instruction::RJUMPI:
case Instruction::PUSH1:
case Instruction::PUSH2:
case Instruction::PUSH3: