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 non-memory reason strings #3877

Merged
merged 8 commits into from
Mar 24, 2024

Conversation

tserg
Copy link
Collaborator

@tserg tserg commented Mar 21, 2024

What I did

Fix #3787, fix #3251

How I did it

Made recommended fix.

How to verify it

See tests

Commit message

fix code generation for non-memory reason strings. previously, the byte
array copier would fail trying to produce code for the buf, which was an
int rather than an IRnode. this commit cleans up the revert generation
code, allocates a fresh buffer to avoid memory cleanliness issues, and
refactors the code to use abi_encoder code instead of handrolling the
ABI encoding routine.

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 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.27%. Comparing base (e48ff32) to head (6a42e50).

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3877      +/-   ##
==========================================
- Coverage   86.36%   86.27%   -0.09%     
==========================================
  Files          92       92              
  Lines       14024    14022       -2     
  Branches     3081     3080       -1     
==========================================
- Hits        12112    12098      -14     
- Misses       1484     1494      +10     
- Partials      428      430       +2     

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

@@ -1,28 +1,23 @@
import vyper.codegen.events as events
import vyper.utils as util
from vyper import ast as vy_ast
from vyper.codegen.abi_encoder import abi_encode

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
vyper.codegen.abi_encoder
begins an import cycle.
@charles-cooper charles-cooper changed the title fix: non-memory reason string fix[codegen]: non-memory reason string Mar 24, 2024
@charles-cooper charles-cooper changed the title fix[codegen]: non-memory reason string fix[codegen]: fix codegen for non-memory reason strings Mar 24, 2024
@charles-cooper charles-cooper enabled auto-merge (squash) March 24, 2024 01:17
@charles-cooper charles-cooper changed the title fix[codegen]: fix codegen for non-memory reason strings fix[codegen]: fix non-memory reason strings Mar 24, 2024
@charles-cooper charles-cooper enabled auto-merge (squash) March 24, 2024 01:18
@charles-cooper charles-cooper merged commit cedf708 into vyperlang:master Mar 24, 2024
151 checks passed
@tserg tserg deleted the fix/non_memory_msg branch March 24, 2024 02:15
electriclilies pushed a commit to electriclilies/vyper that referenced this pull request Apr 27, 2024
fix code generation for non-memory reason strings. previously, the byte
array copier would fail trying to produce code for the buf, which was an
int rather than an IRnode. this commit cleans up the revert generation
code, allocates a fresh buffer to avoid memory cleanliness issues, and
refactors the code to use abi_encoder code instead of handrolling the
ABI encoding routine.

---------

Co-authored-by: Charles Cooper <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants