mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Assembly: Remove checkLooseFeature(...) from AsmAnalyzer.
This commit is contained in:
parent
3df5dbbca4
commit
6659720776
@ -89,10 +89,7 @@ AsmAnalysisInfo AsmAnalyzer::analyzeStrictAssertCorrect(Dialect const& _dialect,
|
||||
|
||||
bool AsmAnalyzer::operator()(yul::Instruction const& _instruction)
|
||||
{
|
||||
checkLooseFeature(
|
||||
_instruction.location,
|
||||
"The use of non-functional instructions is disallowed. Please use functional notation instead."
|
||||
);
|
||||
solAssert(false, "The use of non-functional instructions is disallowed. Please use functional notation instead.");
|
||||
auto const& info = instructionInfo(_instruction.instruction);
|
||||
m_stackHeight += info.ret - info.args;
|
||||
m_info.stackHeightInfo[&_instruction] = m_stackHeight;
|
||||
@ -730,11 +727,3 @@ void AsmAnalyzer::warnOnInstructions(dev::eth::Instruction _instr, SourceLocatio
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void AsmAnalyzer::checkLooseFeature(SourceLocation const& _location, string const& _description)
|
||||
{
|
||||
if (m_dialect.flavour != AsmFlavour::Loose)
|
||||
solAssert(false, _description);
|
||||
else if (m_errorTypeForLoose)
|
||||
m_errorReporter.error(*m_errorTypeForLoose, _location, _description);
|
||||
}
|
||||
|
@ -110,11 +110,6 @@ private:
|
||||
void expectValidType(std::string const& type, langutil::SourceLocation const& _location);
|
||||
void warnOnInstructions(dev::eth::Instruction _instr, langutil::SourceLocation const& _location);
|
||||
|
||||
/// Depending on @a m_flavour and @a m_errorTypeForLoose, throws an internal compiler
|
||||
/// exception (if the flavour is not Loose), reports an error/warning
|
||||
/// (if m_errorTypeForLoose is set) or does nothing.
|
||||
void checkLooseFeature(langutil::SourceLocation const& _location, std::string const& _description);
|
||||
|
||||
int m_stackHeight = 0;
|
||||
yul::ExternalIdentifierAccess::Resolver m_resolver;
|
||||
Scope* m_currentScope = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user