diff options
-rw-r--r-- | KnownState.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/KnownState.cpp b/KnownState.cpp index 39cce3e8..dd269ff4 100644 --- a/KnownState.cpp +++ b/KnownState.cpp @@ -143,10 +143,16 @@ KnownState::StoreOperation KnownState::feedItem(AssemblyItem const& _item, bool ); else { - if (SemanticInformation::invalidatesMemory(_item.instruction())) + bool invMem = SemanticInformation::invalidatesMemory(_item.instruction()); + bool invStor = SemanticInformation::invalidatesStorage(_item.instruction()); + // We could be a bit more fine-grained here (CALL only invalidates part of + // memory, etc), but we do not for now. + if (invMem) resetMemory(); - if (SemanticInformation::invalidatesStorage(_item.instruction())) + if (invStor) resetStorage(); + if (invMem || invStor) + m_sequenceNumber += 2; // Increment by two because it can read and write assertThrow(info.ret <= 1, InvalidDeposit, ""); if (info.ret == 1) setStackElement( |