yulopti: Fix conflict between 'l' in yulopti and OptimiserSuite and make future conflicts less likely

- OptimizerSuite uses letters so switching to punctuation marks in yulopti should help.
This commit is contained in:
Kamil Śliwak 2020-05-07 17:27:24 +02:00
parent d3d1520870
commit 156bfadad3

View File

@ -154,9 +154,9 @@ public:
}
map<char, string> const& abbreviationMap = OptimiserSuite::stepAbbreviationToNameMap();
map<char, string> const& extraOptions = {
{'q', "quit"},
{'l', "VarNameCleaner"},
{'p', "StackCompressor"},
{'#', "quit"},
{',', "VarNameCleaner"},
{';', "StackCompressor"},
};
printUsageBanner(abbreviationMap, extraOptions, 4);
@ -175,14 +175,14 @@ public:
}
else switch (option)
{
case 'q':
case '#':
return;
case 'l':
case ',':
VarNameCleaner::run(context, *m_ast);
// VarNameCleaner destroys the unique names guarantee of the disambiguator.
disambiguated = false;
break;
case 'p':
case ';':
{
Object obj;
obj.code = m_ast;