From 65c50b14c80ef934c0ba4b0e6358938aae8800d0 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 3 Jul 2020 16:49:49 +0100 Subject: [PATCH] Remove unused instructionNames() function in AsmParser --- libyul/AsmParser.cpp | 14 -------------- libyul/AsmParser.h | 1 - 2 files changed, 15 deletions(-) diff --git a/libyul/AsmParser.cpp b/libyul/AsmParser.cpp index d3d74ac35..8dcb9a832 100644 --- a/libyul/AsmParser.cpp +++ b/libyul/AsmParser.cpp @@ -297,20 +297,6 @@ Expression Parser::parseExpression() } } -std::map const& Parser::instructionNames() -{ - static map s_instructionNames; - if (s_instructionNames.empty()) - { - for (auto const& instr: instructions()) - s_instructionNames[instr.second] = instr.first; - // set the ambiguous instructions to a clear default - s_instructionNames[evmasm::Instruction::SELFDESTRUCT] = "selfdestruct"; - s_instructionNames[evmasm::Instruction::KECCAK256] = "keccak256"; - } - return s_instructionNames; -} - Parser::ElementaryOperation Parser::parseElementaryOperation() { RecursionGuard recursionGuard(*this); diff --git a/libyul/AsmParser.h b/libyul/AsmParser.h index 3c70abd7e..4c1d6980f 100644 --- a/libyul/AsmParser.h +++ b/libyul/AsmParser.h @@ -86,7 +86,6 @@ protected: ForLoop parseForLoop(); /// Parses a functional expression that has to push exactly one stack element Expression parseExpression(); - static std::map const& instructionNames(); /// Parses an elementary operation, i.e. a literal, identifier, instruction or /// builtin functian call (only the name). ElementaryOperation parseElementaryOperation();