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:
@@ -93,9 +93,13 @@ KnownState::StoreOperation KnownState::feedItem(AssemblyItem const& _item, bool
|
||||
// can be ignored
|
||||
}
|
||||
else if (_item.type() == AssignImmutable)
|
||||
{
|
||||
// Since AssignImmutable breaks blocks, it should be fine to only consider its changes to the stack, which
|
||||
// is the same as POP.
|
||||
// is the same as two POPs.
|
||||
// Note that the StoreOperation for POP is generic and _copyItem is ignored.
|
||||
feedItem(AssemblyItem(Instruction::POP), _copyItem);
|
||||
return feedItem(AssemblyItem(Instruction::POP), _copyItem);
|
||||
}
|
||||
else if (_item.type() != Operation)
|
||||
{
|
||||
assertThrow(_item.deposit() == 1, InvalidDeposit, "");
|
||||
|
||||
Reference in New Issue
Block a user