-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[Codegen] Do not perform cleanup on unsigned integers when loading from calldata. #5368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was an error during the CI process:
Please check that your changes are working as intended. |
f46f171
to
a44243c
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5368 +/- ##
===========================================
- Coverage 29.05% 27.94% -1.11%
===========================================
Files 308 323 +15
Lines 31012 32357 +1345
Branches 3744 3872 +128
===========================================
+ Hits 9009 9041 +32
- Misses 21321 22627 +1306
- Partials 682 689 +7
|
a44243c
to
3920b70
Compare
} | ||
else if (IntegerType const* intType = dynamic_cast<IntegerType const*>(&_type)) | ||
if (!intType->isSigned()) | ||
cleanupNeeded = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this only be a special case for uint256?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because we shift right by the appropriate amount. The use-case in mind actually uses uint32 (the 4 byte function selector).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, this is in the non-32byte branch.
Ah, forgot it is BE and not LE. The code looks good.
3920b70
to
727e3f2
Compare
The docs and archlinux failure is unrelated. |
Thank you, looks great! |
Fixes #5319