Assembly: Remove errorTypeForLoose property from AsmAnalyzer.

This commit is contained in:
Christian Parpart 2019-09-10 12:11:04 +02:00
parent 6659720776
commit 3c1d12b16c
9 changed files with 1 additions and 12 deletions

View File

@ -323,11 +323,9 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
// Will be re-generated later with correct information
// We use the latest EVM version because we will re-run it anyway.
yul::AsmAnalysisInfo analysisInfo;
boost::optional<Error::Type> errorTypeForLoose = Error::Type::SyntaxError;
yul::AsmAnalyzer(
analysisInfo,
errorsIgnored,
errorTypeForLoose,
yul::EVMDialect::strictAssemblyForEVM(EVMVersion{}),
resolver
).analyze(_inlineAssembly.operations());

View File

@ -725,7 +725,6 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
yul::AsmAnalyzer analyzer(
*_inlineAssembly.annotation().analysisInfo,
m_errorReporter,
Error::Type::SyntaxError,
_inlineAssembly.dialect(),
identifierAccess
);

View File

@ -411,7 +411,6 @@ void CompilerContext::appendInlineAssembly(
analyzerResult = yul::AsmAnalyzer(
analysisInfo,
errorReporter,
boost::none,
dialect,
identifierAccess.resolve
).analyze(*parserResult);

View File

@ -78,7 +78,6 @@ AsmAnalysisInfo AsmAnalyzer::analyzeStrictAssertCorrect(Dialect const& _dialect,
bool success = yul::AsmAnalyzer(
analysisInfo,
errors,
Error::Type::SyntaxError,
_dialect,
{},
_object.dataNames()

View File

@ -59,7 +59,6 @@ public:
explicit AsmAnalyzer(
AsmAnalysisInfo& _analysisInfo,
langutil::ErrorReporter& _errorReporter,
boost::optional<langutil::Error::Type> _errorTypeForLoose,
Dialect const& _dialect,
ExternalIdentifierAccess::Resolver const& _resolver = ExternalIdentifierAccess::Resolver(),
std::set<YulString> const& _dataNames = {}
@ -68,7 +67,6 @@ public:
m_info(_analysisInfo),
m_errorReporter(_errorReporter),
m_dialect(_dialect),
m_errorTypeForLoose(_errorTypeForLoose),
m_dataNames(_dataNames)
{
if (EVMDialect const* evmDialect = dynamic_cast<EVMDialect const*>(&m_dialect))
@ -120,7 +118,6 @@ private:
langutil::ErrorReporter& m_errorReporter;
langutil::EVMVersion m_evmVersion;
Dialect const& m_dialect;
boost::optional<langutil::Error::Type> m_errorTypeForLoose;
/// Names of data objects to be referenced by builtin functions with literal arguments.
std::set<YulString> m_dataNames;
ForLoop const* m_currentForLoop = nullptr;

View File

@ -117,7 +117,6 @@ bool AssemblyStack::analyzeParsed(Object& _object)
AsmAnalyzer analyzer(
*_object.analysisInfo,
m_errorReporter,
boost::none,
languageToDialect(m_language, m_evmVersion),
{},
_object.dataNames()

View File

@ -658,7 +658,7 @@ Object EVMToEWasmTranslator::run(Object const& _object)
ErrorList 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))
{
// TODO the errors here are "wrong" because they have invalid source references!

View File

@ -61,7 +61,6 @@ bool parse(string const& _source, Dialect const& _dialect, ErrorReporter& errorR
return (yul::AsmAnalyzer(
analysisInfo,
errorReporter,
boost::none,
_dialect
)).analyze(*parserResult);
}

View File

@ -106,7 +106,6 @@ public:
AsmAnalyzer analyzer(
*m_analysisInfo,
errorReporter,
langutil::Error::Type::SyntaxError,
m_dialect
);
if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty())