mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add another argument to setimmutable and the AssignImmutable opcode, allowing to modify code at any memory offset.
This commit is contained in:
@@ -203,7 +203,10 @@ size_t ContractCompiler::packIntoContractCreator(ContractDefinition const& _cont
|
||||
{
|
||||
auto slotNames = m_context.immutableVariableSlotNames(*immutable);
|
||||
for (auto&& slotName: slotNames | boost::adaptors::reversed)
|
||||
{
|
||||
m_context << u256(0);
|
||||
m_context.appendImmutableAssignment(slotName);
|
||||
}
|
||||
}
|
||||
if (!immutables.empty())
|
||||
m_context.pushSubroutineSize(m_context.runtimeSub());
|
||||
|
||||
Reference in New Issue
Block a user