Skip to content

Commit 27822db

Browse files
committed
Remove entry in IR breaking changes.
1 parent 187f0f0 commit 27822db

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

docs/ir-breaking-changes.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -154,37 +154,6 @@ hiding new and different behavior in existing code.
154154
- New code generator: ``0`` as all parameters, including return parameters, will be re-initialized before
155155
each ``_;`` evaluation.
156156

157-
- Copying ``bytes`` arrays from memory to storage is implemented in a different way.
158-
The old code generator always copies full words, while the new one cuts the byte
159-
array after its end. The old behaviour can lead to dirty data being copied after
160-
the end of the array (but still in the same storage slot).
161-
This causes differences in some contracts, for example:
162-
163-
.. code-block:: solidity
164-
165-
// SPDX-License-Identifier: GPL-3.0
166-
pragma solidity >=0.8.1;
167-
168-
contract C {
169-
bytes x;
170-
function f() public returns (uint r) {
171-
bytes memory m = "tmp";
172-
assembly {
173-
mstore(m, 8)
174-
mstore(add(m, 32), "deadbeef15dead")
175-
}
176-
x = m;
177-
assembly {
178-
r := sload(x.slot)
179-
}
180-
}
181-
}
182-
183-
Previously ``f()`` would return ``0x6465616462656566313564656164000000000000000000000000000000000010``
184-
(it has correct length, and correct first 8 elements, but then it contains dirty data which was set via assembly).
185-
Now it is returning ``0x6465616462656566000000000000000000000000000000000000000000000010`` (it has
186-
correct length, and correct elements, but does not contain superfluous data).
187-
188157
.. index:: ! evaluation order; expression
189158

190159
- For the old code generator, the evaluation order of expressions is unspecified.

0 commit comments

Comments
 (0)