mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Only provide code generator to CodeTransform.
This commit is contained in:
@@ -520,7 +520,7 @@ void CompilerContext::appendInlineAssembly(
|
||||
analysisInfo,
|
||||
*m_asm,
|
||||
m_evmVersion,
|
||||
identifierAccess,
|
||||
identifierAccess.generateCode,
|
||||
_system,
|
||||
_optimiserSettings.optimizeStackAllocation
|
||||
);
|
||||
|
||||
@@ -702,15 +702,11 @@ bool ContractCompiler::visit(FunctionDefinition const& _function)
|
||||
bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
|
||||
{
|
||||
unsigned startStackHeight = m_context.stackHeight();
|
||||
yul::ExternalIdentifierAccess identifierAccess;
|
||||
identifierAccess.resolve = [&](yul::Identifier const& _identifier, yul::IdentifierContext, bool)
|
||||
{
|
||||
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
||||
if (ref == _inlineAssembly.annotation().externalReferences.end())
|
||||
return numeric_limits<size_t>::max();
|
||||
return ref->second.valueSize;
|
||||
};
|
||||
identifierAccess.generateCode = [&](yul::Identifier const& _identifier, yul::IdentifierContext _context, yul::AbstractAssembly& _assembly)
|
||||
yul::ExternalIdentifierAccess::CodeGenerator identifierAccessCodeGen = [&](
|
||||
yul::Identifier const& _identifier,
|
||||
yul::IdentifierContext _context,
|
||||
yul::AbstractAssembly& _assembly
|
||||
)
|
||||
{
|
||||
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
||||
solAssert(ref != _inlineAssembly.annotation().externalReferences.end(), "");
|
||||
@@ -918,7 +914,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
|
||||
*analysisInfo,
|
||||
*m_context.assemblyPtr(),
|
||||
m_context.evmVersion(),
|
||||
identifierAccess,
|
||||
identifierAccessCodeGen,
|
||||
false,
|
||||
m_optimiserSettings.optimizeStackAllocation
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user