mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge branch 'fixedConversionRules' into convertMerge
This commit is contained in:
@@ -411,6 +411,7 @@ void CompilerContext::appendInlineAssembly(
|
||||
yul::AbstractAssembly& _assembly
|
||||
)
|
||||
{
|
||||
solAssert(_context == yul::IdentifierContext::RValue || _context == yul::IdentifierContext::LValue, "");
|
||||
auto it = std::find(_localVariables.begin(), _localVariables.end(), _identifier.name.str());
|
||||
solAssert(it != _localVariables.end(), "");
|
||||
auto stackDepth = static_cast<size_t>(distance(it, _localVariables.end()));
|
||||
|
||||
@@ -708,6 +708,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly)
|
||||
yul::AbstractAssembly& _assembly
|
||||
)
|
||||
{
|
||||
solAssert(_context == yul::IdentifierContext::RValue || _context == yul::IdentifierContext::LValue, "");
|
||||
auto ref = _inlineAssembly.annotation().externalReferences.find(&_identifier);
|
||||
solAssert(ref != _inlineAssembly.annotation().externalReferences.end(), "");
|
||||
Declaration const* decl = ref->second.declaration;
|
||||
|
||||
@@ -1731,6 +1731,8 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
|
||||
m_context << Instruction::GASPRICE;
|
||||
else if (member == "chainid")
|
||||
m_context << Instruction::CHAINID;
|
||||
else if (member == "basefee")
|
||||
m_context << Instruction::BASEFEE;
|
||||
else if (member == "data")
|
||||
m_context << u256(0) << Instruction::CALLDATASIZE;
|
||||
else if (member == "sig")
|
||||
|
||||
@@ -1733,6 +1733,8 @@ void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess)
|
||||
define(_memberAccess) << "gasprice()\n";
|
||||
else if (member == "chainid")
|
||||
define(_memberAccess) << "chainid()\n";
|
||||
else if (member == "basefee")
|
||||
define(_memberAccess) << "basefee()\n";
|
||||
else if (member == "data")
|
||||
{
|
||||
IRVariable var(_memberAccess);
|
||||
|
||||
Reference in New Issue
Block a user