Skip to content
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

fix[codegen]: fix transient codegen for slice and extract32 #3874

Merged

Conversation

cyberthirst
Copy link
Collaborator

@cyberthirst cyberthirst commented Mar 19, 2024

What I did

How I did it

  • check location for word_addressable and the usage of generic load ops

How to verify it

Commit message

this commit fixes transient storage codegen for `slice()` and
`extract32()` builtins. previously, some codegen routines were hardcoded
to check for storage; this commit changes them to check if they are
`word_addressable` instead. this commit also refactors the `extract32()`
code generation logic to be simpler and use more recent APIs. the new
implementation relies on the optimizer to do some optimizations which in
this routine were previously hand-rolled.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.79%. Comparing base (ee11e3d) to head (af0e811).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3874      +/-   ##
==========================================
- Coverage   90.91%   90.79%   -0.12%     
==========================================
  Files          95       95              
  Lines       14401    14411      +10     
  Branches     3186     3189       +3     
==========================================
- Hits        13093    13085       -8     
- Misses        908      924      +16     
- Partials      400      402       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@charles-cooper charles-cooper changed the title Fix/builtins tstorage codegen fix[codegen]: fix extract32 and slice transient storage codegen Mar 27, 2024
@charles-cooper charles-cooper changed the title fix[codegen]: fix extract32 and slice transient storage codegen fix[codegen]: fix transient storage codegen for slice and extract32 Mar 27, 2024
@charles-cooper charles-cooper marked this pull request as ready for review April 4, 2024 13:12
@charles-cooper charles-cooper changed the title fix[codegen]: fix transient storage codegen for slice and extract32 fix[codegen]: fix transient codegen for slice and extract32 Apr 4, 2024
@charles-cooper charles-cooper changed the title fix[codegen]: fix transient codegen for slice and extract32 fix[codegen]: fix transient codegen for slice and extract32 Apr 4, 2024
@charles-cooper charles-cooper enabled auto-merge (squash) April 4, 2024 21:28
@charles-cooper charles-cooper merged commit 63b8d1d into vyperlang:master Apr 4, 2024
152 checks passed
electriclilies pushed a commit to electriclilies/vyper that referenced this pull request Apr 27, 2024
…rlang#3874)

this commit fixes transient storage codegen for `slice()` and
`extract32()` builtins. previously, some codegen routines were hardcoded
to check for storage; this commit changes them to check if they are
`word_addressable` instead. this commit also refactors the `extract32()`
code generation logic to be simpler and use more recent APIs. the new
implementation relies on the optimizer to do some optimizations which in
this routine were previously hand-rolled.

---------

Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
@mozz30-tech mozz30-tech mentioned this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants