mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not use Parser::instructions() but depend on the dialect in NameDispenser and VarNameCleaner
This commit is contained in:
parent
cd2ce28317
commit
d41fc31046
@ -22,8 +22,6 @@
|
||||
#include <libyul/AsmData.h>
|
||||
#include <libyul/optimiser/CallGraphGenerator.h>
|
||||
|
||||
#include <libevmasm/Instruction.h>
|
||||
|
||||
#include <stack>
|
||||
|
||||
using namespace std;
|
||||
|
@ -24,10 +24,8 @@
|
||||
#include <libyul/optimiser/NameCollector.h>
|
||||
#include <libyul/AsmData.h>
|
||||
#include <libyul/Dialect.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/AsmParser.h>
|
||||
|
||||
#include <libevmasm/Instruction.h>
|
||||
#include <libsolutil/CommonData.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
@ -61,7 +59,5 @@ bool NameDispenser::illegalName(YulString _name)
|
||||
{
|
||||
if (_name.empty() || m_usedNames.count(_name) || m_dialect.builtin(_name))
|
||||
return true;
|
||||
if (dynamic_cast<EVMDialect const*>(&m_dialect))
|
||||
return Parser::instructions().count(_name.str());
|
||||
return false;
|
||||
}
|
||||
|
@ -19,8 +19,7 @@
|
||||
#include <libyul/optimiser/VarNameCleaner.h>
|
||||
#include <libyul/AsmData.h>
|
||||
#include <libyul/Dialect.h>
|
||||
#include <libyul/AsmParser.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <climits>
|
||||
@ -113,8 +112,6 @@ bool VarNameCleaner::isUsedName(YulString const& _name) const
|
||||
{
|
||||
if (_name.empty() || m_dialect.builtin(_name) || m_usedNames.count(_name))
|
||||
return true;
|
||||
if (dynamic_cast<EVMDialect const*>(&m_dialect))
|
||||
return Parser::instructions().count(_name.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user