mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Assembly: Removing EVMDialect::looseAssemblyForEVM().
This commit is contained in:
parent
fdbbf75e78
commit
dc2adb3d9d
@ -328,7 +328,7 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
|
||||
analysisInfo,
|
||||
errorsIgnored,
|
||||
errorTypeForLoose,
|
||||
yul::EVMDialect::looseAssemblyForEVM(EVMVersion{}),
|
||||
yul::EVMDialect::strictAssemblyForEVM(EVMVersion{}),
|
||||
resolver
|
||||
).analyze(_inlineAssembly.operations());
|
||||
return false;
|
||||
|
@ -54,7 +54,7 @@ Dialect const& languageToDialect(AssemblyStack::Language _language, EVMVersion _
|
||||
switch (_language)
|
||||
{
|
||||
case AssemblyStack::Language::Assembly:
|
||||
return EVMDialect::looseAssemblyForEVM(_version);
|
||||
return EVMDialect::strictAssemblyForEVM(_version);
|
||||
case AssemblyStack::Language::StrictAssembly:
|
||||
return EVMDialect::strictAssemblyForEVMObjects(_version);
|
||||
case AssemblyStack::Language::Yul:
|
||||
@ -135,7 +135,7 @@ void AssemblyStack::compileEVM(AbstractAssembly& _assembly, bool _evm15, bool _o
|
||||
EVMDialect const* dialect = nullptr;
|
||||
|
||||
if (m_language == Language::Assembly)
|
||||
dialect = &EVMDialect::looseAssemblyForEVM(m_evmVersion);
|
||||
dialect = &EVMDialect::strictAssemblyForEVM(m_evmVersion);
|
||||
else if (m_language == AssemblyStack::Language::StrictAssembly)
|
||||
dialect = &EVMDialect::strictAssemblyForEVMObjects(m_evmVersion);
|
||||
else if (m_language == AssemblyStack::Language::Yul)
|
||||
|
@ -185,15 +185,6 @@ BuiltinFunctionForEVM const* EVMDialect::builtin(YulString _name) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EVMDialect const& EVMDialect::looseAssemblyForEVM(langutil::EVMVersion _version)
|
||||
{
|
||||
static map<langutil::EVMVersion, unique_ptr<EVMDialect const>> dialects;
|
||||
static YulStringRepository::ResetCallback callback{[&] { dialects.clear(); }};
|
||||
if (!dialects[_version])
|
||||
dialects[_version] = make_unique<EVMDialect>(AsmFlavour::Loose, false, _version);
|
||||
return *dialects[_version];
|
||||
}
|
||||
|
||||
EVMDialect const& EVMDialect::strictAssemblyForEVM(langutil::EVMVersion _version)
|
||||
{
|
||||
static map<langutil::EVMVersion, unique_ptr<EVMDialect const>> dialects;
|
||||
|
@ -72,7 +72,6 @@ struct EVMDialect: public Dialect
|
||||
BuiltinFunctionForEVM const* equalityFunction() const override { return builtin("eq"_yulstring); }
|
||||
BuiltinFunctionForEVM const* booleanNegationFunction() const override { return builtin("iszero"_yulstring); }
|
||||
|
||||
static EVMDialect const& looseAssemblyForEVM(langutil::EVMVersion _version);
|
||||
static EVMDialect const& strictAssemblyForEVM(langutil::EVMVersion _version);
|
||||
static EVMDialect const& strictAssemblyForEVMObjects(langutil::EVMVersion _version);
|
||||
static EVMDialect const& yulForEVM(langutil::EVMVersion _version);
|
||||
|
Loading…
Reference in New Issue
Block a user