mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adapt EVM codegen to new namespace.
This commit is contained in:
1 parent
71b923cc36
commit
261731f7ee
17 files changed
+364
-293
No files matched your search
@@ -522,21 +522,21 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
|
||||
ErrorList errors;
|
||||
assembly::CodeGenerator codeGen(errors);
|
||||
unsigned startStackHeight = m_context.stackHeight();
|
||||
assembly::ExternalIdentifierAccess identifierAccess;
|
||||
identifierAccess.resolve = [&](assembly::Identifier const& _identifier, assembly::IdentifierContext)
|
||||
julia::ExternalIdentifierAccess identifierAccess;
|
||||
identifierAccess.resolve = [&](assembly::Identifier const& _identifier, julia::IdentifierContext)
|
||||
{
|
||||
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
||||
if (ref == _inlineAssembly.annotation().externalReferences.end())
|
||||
return size_t(-1);
|
||||
return ref->second.valueSize;
|
||||
};
|
||||
identifierAccess.generateCode = [&](assembly::Identifier const& _identifier, assembly::IdentifierContext _context, julia::AbstractAssembly& _assembly)
|
||||
identifierAccess.generateCode = [&](assembly::Identifier const& _identifier, julia::IdentifierContext _context, julia::AbstractAssembly& _assembly)
|
||||
{
|
||||
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
||||
solAssert(ref != _inlineAssembly.annotation().externalReferences.end(), "");
|
||||
Declaration const* decl = ref->second.declaration;
|
||||
solAssert(!!decl, "");
|
||||
if (_context == assembly::IdentifierContext::RValue)
|
||||
if (_context == julia::IdentifierContext::RValue)
|
||||
{
|
||||
int const depositBefore = _assembly.stackHeight();
|
||||
solAssert(!!decl->type(), "Type of declaration required but not yet determined.");
|
||||
|
||||
Reference in new issue
Block a user