-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
feat: implement append and pop for dynarray #2615
feat: implement append and pop for dynarray #2615
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2615 +/- ##
==========================================
+ Coverage 86.25% 86.27% +0.02%
==========================================
Files 91 91
Lines 9579 9657 +78
Branches 2423 2439 +16
==========================================
+ Hits 8262 8332 +70
- Misses 823 828 +5
- Partials 494 497 +3
Continue to review full report at Codecov.
|
WIP: frontend for dynamic array functions
we can run into issues if loop variables get repeated in the same scope, for safety just don't allow it.
clarify some code by moving some optimizations down into optimizer also, block expressions like `empty(uint256[3])[ix]`
for maintainability - so it's easier to track where `empty` literals get handled.
this is important because it is used in array bounds checks
This reverts commit 9f6c3a7.
in some tests when optimizations are off, apparently the gas usage can increase base fee past 0
This pull request introduces 3 alerts when merging fcfd1ea into 5efb11a - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging fb6a127 into 1368adb - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging e08f0d3 into 1368adb - view on LGTM.com new alerts:
|
e08f0d3
to
f1378c6
Compare
This pull request introduces 3 alerts when merging f1378c6 into 548d35d - view on LGTM.com new alerts:
|
so `for x in [..]` gets the right type assigned.
This pull request introduces 2 alerts when merging ca3af6e into 548d35d - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging e5f13b9 into 43f491f - view on LGTM.com new alerts:
|
self.my_array.append(x) # fail | ||
return self.my_array | ||
""", | ||
lambda x: None, |
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.
This raises right?
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.
yeah - return of the sentinel None
maps to assert_tx_failed
in the test
What I did
implement #2611
How I did it
add "append" and "pop" to typechecker, thread through codegen
make some minor changes to variables in LLL to prevent name shadowing
How to verify it
see tests
Description for the changelog
Cute Animal Picture