mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Assembly: Remove errorTypeForLoose property from AsmAnalyzer.
This commit is contained in:
parent
6659720776
commit
3c1d12b16c
@ -323,11 +323,9 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
|
|||||||
// Will be re-generated later with correct information
|
// Will be re-generated later with correct information
|
||||||
// We use the latest EVM version because we will re-run it anyway.
|
// We use the latest EVM version because we will re-run it anyway.
|
||||||
yul::AsmAnalysisInfo analysisInfo;
|
yul::AsmAnalysisInfo analysisInfo;
|
||||||
boost::optional<Error::Type> errorTypeForLoose = Error::Type::SyntaxError;
|
|
||||||
yul::AsmAnalyzer(
|
yul::AsmAnalyzer(
|
||||||
analysisInfo,
|
analysisInfo,
|
||||||
errorsIgnored,
|
errorsIgnored,
|
||||||
errorTypeForLoose,
|
|
||||||
yul::EVMDialect::strictAssemblyForEVM(EVMVersion{}),
|
yul::EVMDialect::strictAssemblyForEVM(EVMVersion{}),
|
||||||
resolver
|
resolver
|
||||||
).analyze(_inlineAssembly.operations());
|
).analyze(_inlineAssembly.operations());
|
||||||
|
@ -725,7 +725,6 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
|
|||||||
yul::AsmAnalyzer analyzer(
|
yul::AsmAnalyzer analyzer(
|
||||||
*_inlineAssembly.annotation().analysisInfo,
|
*_inlineAssembly.annotation().analysisInfo,
|
||||||
m_errorReporter,
|
m_errorReporter,
|
||||||
Error::Type::SyntaxError,
|
|
||||||
_inlineAssembly.dialect(),
|
_inlineAssembly.dialect(),
|
||||||
identifierAccess
|
identifierAccess
|
||||||
);
|
);
|
||||||
|
@ -411,7 +411,6 @@ void CompilerContext::appendInlineAssembly(
|
|||||||
analyzerResult = yul::AsmAnalyzer(
|
analyzerResult = yul::AsmAnalyzer(
|
||||||
analysisInfo,
|
analysisInfo,
|
||||||
errorReporter,
|
errorReporter,
|
||||||
boost::none,
|
|
||||||
dialect,
|
dialect,
|
||||||
identifierAccess.resolve
|
identifierAccess.resolve
|
||||||
).analyze(*parserResult);
|
).analyze(*parserResult);
|
||||||
|
@ -78,7 +78,6 @@ AsmAnalysisInfo AsmAnalyzer::analyzeStrictAssertCorrect(Dialect const& _dialect,
|
|||||||
bool success = yul::AsmAnalyzer(
|
bool success = yul::AsmAnalyzer(
|
||||||
analysisInfo,
|
analysisInfo,
|
||||||
errors,
|
errors,
|
||||||
Error::Type::SyntaxError,
|
|
||||||
_dialect,
|
_dialect,
|
||||||
{},
|
{},
|
||||||
_object.dataNames()
|
_object.dataNames()
|
||||||
|
@ -59,7 +59,6 @@ public:
|
|||||||
explicit AsmAnalyzer(
|
explicit AsmAnalyzer(
|
||||||
AsmAnalysisInfo& _analysisInfo,
|
AsmAnalysisInfo& _analysisInfo,
|
||||||
langutil::ErrorReporter& _errorReporter,
|
langutil::ErrorReporter& _errorReporter,
|
||||||
boost::optional<langutil::Error::Type> _errorTypeForLoose,
|
|
||||||
Dialect const& _dialect,
|
Dialect const& _dialect,
|
||||||
ExternalIdentifierAccess::Resolver const& _resolver = ExternalIdentifierAccess::Resolver(),
|
ExternalIdentifierAccess::Resolver const& _resolver = ExternalIdentifierAccess::Resolver(),
|
||||||
std::set<YulString> const& _dataNames = {}
|
std::set<YulString> const& _dataNames = {}
|
||||||
@ -68,7 +67,6 @@ public:
|
|||||||
m_info(_analysisInfo),
|
m_info(_analysisInfo),
|
||||||
m_errorReporter(_errorReporter),
|
m_errorReporter(_errorReporter),
|
||||||
m_dialect(_dialect),
|
m_dialect(_dialect),
|
||||||
m_errorTypeForLoose(_errorTypeForLoose),
|
|
||||||
m_dataNames(_dataNames)
|
m_dataNames(_dataNames)
|
||||||
{
|
{
|
||||||
if (EVMDialect const* evmDialect = dynamic_cast<EVMDialect const*>(&m_dialect))
|
if (EVMDialect const* evmDialect = dynamic_cast<EVMDialect const*>(&m_dialect))
|
||||||
@ -120,7 +118,6 @@ private:
|
|||||||
langutil::ErrorReporter& m_errorReporter;
|
langutil::ErrorReporter& m_errorReporter;
|
||||||
langutil::EVMVersion m_evmVersion;
|
langutil::EVMVersion m_evmVersion;
|
||||||
Dialect const& m_dialect;
|
Dialect const& m_dialect;
|
||||||
boost::optional<langutil::Error::Type> m_errorTypeForLoose;
|
|
||||||
/// Names of data objects to be referenced by builtin functions with literal arguments.
|
/// Names of data objects to be referenced by builtin functions with literal arguments.
|
||||||
std::set<YulString> m_dataNames;
|
std::set<YulString> m_dataNames;
|
||||||
ForLoop const* m_currentForLoop = nullptr;
|
ForLoop const* m_currentForLoop = nullptr;
|
||||||
|
@ -117,7 +117,6 @@ bool AssemblyStack::analyzeParsed(Object& _object)
|
|||||||
AsmAnalyzer analyzer(
|
AsmAnalyzer analyzer(
|
||||||
*_object.analysisInfo,
|
*_object.analysisInfo,
|
||||||
m_errorReporter,
|
m_errorReporter,
|
||||||
boost::none,
|
|
||||||
languageToDialect(m_language, m_evmVersion),
|
languageToDialect(m_language, m_evmVersion),
|
||||||
{},
|
{},
|
||||||
_object.dataNames()
|
_object.dataNames()
|
||||||
|
@ -658,7 +658,7 @@ Object EVMToEWasmTranslator::run(Object const& _object)
|
|||||||
|
|
||||||
ErrorList errors;
|
ErrorList errors;
|
||||||
ErrorReporter errorReporter(errors);
|
ErrorReporter errorReporter(errors);
|
||||||
AsmAnalyzer analyzer(*ret.analysisInfo, errorReporter, boost::none, WasmDialect::instance(), {}, _object.dataNames());
|
AsmAnalyzer analyzer(*ret.analysisInfo, errorReporter, WasmDialect::instance(), {}, _object.dataNames());
|
||||||
if (!analyzer.analyze(*ret.code))
|
if (!analyzer.analyze(*ret.code))
|
||||||
{
|
{
|
||||||
// TODO the errors here are "wrong" because they have invalid source references!
|
// TODO the errors here are "wrong" because they have invalid source references!
|
||||||
|
@ -61,7 +61,6 @@ bool parse(string const& _source, Dialect const& _dialect, ErrorReporter& errorR
|
|||||||
return (yul::AsmAnalyzer(
|
return (yul::AsmAnalyzer(
|
||||||
analysisInfo,
|
analysisInfo,
|
||||||
errorReporter,
|
errorReporter,
|
||||||
boost::none,
|
|
||||||
_dialect
|
_dialect
|
||||||
)).analyze(*parserResult);
|
)).analyze(*parserResult);
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,6 @@ public:
|
|||||||
AsmAnalyzer analyzer(
|
AsmAnalyzer analyzer(
|
||||||
*m_analysisInfo,
|
*m_analysisInfo,
|
||||||
errorReporter,
|
errorReporter,
|
||||||
langutil::Error::Type::SyntaxError,
|
|
||||||
m_dialect
|
m_dialect
|
||||||
);
|
);
|
||||||
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
|
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user