fix[codegen]: fix gas usage of iterators#4485
fix[codegen]: fix gas usage of iterators#4485charles-cooper merged 2 commits intovyperlang:masterfrom
Conversation
cd31867 introduces a gas regression, which is that `IRnode.is_literal` evaluates to true even for pointers (which are not source-level literals). this commit changes the condition to be `not .is_pointer`, which should be the correct condition for needing to strictify into memory.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4485 +/- ##
=======================================
Coverage 92.06% 92.06%
=======================================
Files 120 120
Lines 17329 17329
Branches 2932 2932
=======================================
Hits 15954 15954
Misses 957 957
Partials 418 418 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Thx for fixing the regression - I would like to highlight one interesting observation. The gas regression was not visible in the venom pipeline; i.e.
You can see this also here: pcaversaccio/snekmate@f8b5003#diff-833bb263ee4e534b467920b3b014bd0f7f03fc3be1274491a6366991b3a25b99
thanks -- this is because |



cd31867 (#4462) introduces a gas regression, which is that
IRnode.is_literalevaluates to true even for pointers (which are not source-level literals). this commit changes the condition to benot .is_pointer, which should be the correct condition for needing to strictify into memory.thanks to @pcaversaccio for spotting!
What I did
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture