From 8e711a8b9908ba71770869155e38f596c2f247ab Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 6 Jul 2020 18:14:51 +0200 Subject: [PATCH] Remove duplicate creation of internal routine. --- libsolidity/codegen/ArrayUtils.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libsolidity/codegen/ArrayUtils.cpp b/libsolidity/codegen/ArrayUtils.cpp index eebe03e53..409c16cd7 100644 --- a/libsolidity/codegen/ArrayUtils.cpp +++ b/libsolidity/codegen/ArrayUtils.cpp @@ -935,11 +935,6 @@ void ArrayUtils::clearStorageLoop(TypePointer _type) const } // stack: end_pos pos - // jump to and return from the loop to allow for duplicate code removal - evmasm::AssemblyItem returnTag = _context.pushNewTag(); - _context << Instruction::SWAP2 << Instruction::SWAP1; - - // stack: end_pos pos evmasm::AssemblyItem loopStart = _context.appendJumpToNew(); _context << loopStart; // check for loop condition @@ -959,11 +954,8 @@ void ArrayUtils::clearStorageLoop(TypePointer _type) const _context.appendJumpTo(loopStart); // cleanup _context << zeroLoopEnd; - _context << Instruction::POP << Instruction::SWAP1; - // "return" - _context << Instruction::JUMP; + _context << Instruction::POP; - _context << returnTag; solAssert(_context.stackHeight() == stackHeightStart - 1, ""); } );