mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
SolidityExecutionFramework: Remove dead code for handling errors from parsing and analysis
- This code can never be reached because CompilerStack.compile() called above does the same analysis and fails if it's not successful.
This commit is contained in:
parent
311f025eb5
commit
df7b82bf31
@ -72,14 +72,9 @@ bytes SolidityExecutionFramework::compileContract(
|
||||
// get code that does not exhaust the stack.
|
||||
OptimiserSettings::full()
|
||||
);
|
||||
if (!asmStack.parseAndAnalyze("", m_compiler.yulIROptimized(contractName)))
|
||||
{
|
||||
langutil::SourceReferenceFormatter formatter(std::cerr);
|
||||
bool analysisSuccessful = asmStack.parseAndAnalyze("", m_compiler.yulIROptimized(contractName));
|
||||
solAssert(analysisSuccessful, "Code that passed analysis in CompilerStack can't have errors");
|
||||
|
||||
for (auto const& error: asmStack.errors())
|
||||
formatter.printErrorInformation(*error);
|
||||
BOOST_ERROR("Assembly contract failed. IR: " + m_compiler.yulIROptimized({}));
|
||||
}
|
||||
asmStack.optimize();
|
||||
obj = std::move(*asmStack.assemble(yul::AssemblyStack::Machine::EVM).bytecode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user