-
-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix[codegen]: fix overcopying of bytes in make_setter
in `_complex_make_setter`, when a dynamic type (e.g. Bytes or DynArray) is contained within a tuple, the current code generation copies the entire buffer without checking how large it is. (note this represents a gas issue since more bytes might be copied than is necessary, but not a correctness issue). in comparison, Bytes and DynArray make_setters limit the copy length to the runtime sizes of the Bytes/DynArray. this commit disables the full buffer copy and adds a heuristic to the make_setter implementations for DynArray and Bytes so that in certain cases, they copy the full buffer instead of checking the length.
- Loading branch information
1 parent
9c98b3e
commit 336bc0a
Showing
1 changed file
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters