From 26f5db3b846d59df463189f4c76c00d0f85453b3 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 13 Sep 2021 23:13:49 +0100 Subject: [PATCH] f --- libsolidity/codegen/CompilerContext.h | 2 +- libsolidity/interface/CompilerStack.cpp | 14 +++++++------- .../yulInterpreter/EVMInstructionInterpreter.cpp | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 4f7fd3abd..7fe1c0f37 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -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 diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 14fa3c528..092c65afd 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -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; diff --git a/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp b/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp index f0691a836..918a38f8f 100644 --- a/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp +++ b/test/tools/yulInterpreter/EVMInstructionInterpreter.cpp @@ -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: