Browse Source

Typos and docs.

cl-refactor
chriseth 10 years ago
parent
commit
e73b3068c4
  1. 5
      libevmcore/CommonSubexpressionEliminator.cpp
  2. 4
      libevmcore/ExpressionClasses.h

5
libevmcore/CommonSubexpressionEliminator.cpp

@ -203,8 +203,9 @@ void CommonSubexpressionEliminator::storeInStorage(Id _slot, Id _value)
return;
m_sequenceNumber++;
decltype(m_storageContent) storageContents;
// copy over values at points where we know that they are different from _slot or that we know
// that the value is equal
// Copy over all values (i.e. retain knowledge about them) where we know that this store
// operation will not destroy the knowledge. Specifically, we copy storage locations we know
// are different from _slot or locations where we know that the stored value is equal to _value.
for (auto const& storageItem: m_storageContent)
if (m_expressionClasses.knownToBeDifferent(storageItem.first, _slot) || storageItem.second == _value)
storageContents.insert(storageItem);

4
libevmcore/ExpressionClasses.h

@ -79,10 +79,10 @@ public:
/// Similar to @a knownToBeDifferent but require that abs(_a - b) >= 32.
bool knownToBeDifferentBy32(Id _a, Id _b);
/// @returns true if the value of the given class is known to be zero.
/// @note that this is not the negariot of knownNonZero
/// @note that this is not the negation of knownNonZero
bool knownZero(Id _c);
/// @returns true if the value of the given class is known to be nonzero.
/// @note that this is not the negariot of knownZero
/// @note that this is not the negation of knownZero
bool knownNonZero(Id _c);
/// @returns a pointer to the value if the given class is known to be a constant,
/// and a nullptr otherwise.

Loading…
Cancel
Save