Merge pull request #7386 from ethereum/060-strict-inline-assembly

Defaulting to strict inline assembly (instead of loose)
This commit is contained in:
chriseth
2019-10-28 12:48:58 +01:00
committed by GitHub
50 changed files with 97 additions and 520 deletions
+1 -3
View File
@@ -323,12 +323,10 @@ 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::looseAssemblyForEVM(EVMVersion{}),
yul::EVMDialect::strictAssemblyForEVM(EVMVersion{}),
resolver
).analyze(_inlineAssembly.operations());
return false;
-1
View File
@@ -735,7 +735,6 @@ bool TypeChecker::visit(InlineAssembly const& _inlineAssembly)
yul::AsmAnalyzer analyzer(
*_inlineAssembly.annotation().analysisInfo,
m_errorReporter,
Error::Type::SyntaxError,
_inlineAssembly.dialect(),
identifierAccess
);
-2
View File
@@ -41,7 +41,6 @@ public:
m_dialect(_dialect),
m_reportMutability(_reportMutability) {}
void operator()(yul::Label const&) { }
void operator()(yul::Instruction const& _instruction)
{
checkInstruction(_instruction.location, _instruction.instruction);
@@ -58,7 +57,6 @@ public:
{
boost::apply_visitor(*this, _expr.expression);
}
void operator()(yul::StackAssignment const&) {}
void operator()(yul::Assignment const& _assignment)
{
boost::apply_visitor(*this, *_assignment.value);