Skip to content

Ensure sequential memory for internal variables#2196

Merged
fubuloubu merged 4 commits into
vyperlang:masterfrom
iamdefinitelyahuman:fix-sequential-memory
Oct 13, 2020
Merged

Ensure sequential memory for internal variables#2196
fubuloubu merged 4 commits into
vyperlang:masterfrom
iamdefinitelyahuman:fix-sequential-memory

Conversation

@iamdefinitelyahuman

Copy link
Copy Markdown
Contributor

What I did

Ensure that multiple internal variable placeholders are ordered sequentially. This fixes an error in events and revert strings that was introduced by #2188

How I did it

  • Add Context.new_sequential_vars, which generates multiple sequential memory offsets.
  • Use the new method in parser/stmt where sequential memory offsets are required (events, revert reasons, returning bytes arrays).

How to verify it

Run tests.

Cute Animal Picture

image

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #2196 into master will decrease coverage by 1.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2196      +/-   ##
==========================================
- Coverage   85.46%   84.37%   -1.09%     
==========================================
  Files          83       83              
  Lines        8498     8437      -61     
  Branches     2052     2052              
==========================================
- Hits         7263     7119     -144     
- Misses        733      817      +84     
+ Partials      502      501       -1     
Impacted Files Coverage Δ
vyper/parser/context.py 95.78% <100.00%> (+0.33%) ⬆️
vyper/parser/events.py 93.47% <100.00%> (-0.19%) ⬇️
vyper/parser/stmt.py 80.49% <100.00%> (-0.14%) ⬇️
vyper/ast/annotation.py 87.09% <0.00%> (-7.26%) ⬇️
vyper/context/types/value/numeric.py 77.50% <0.00%> (-6.65%) ⬇️
vyper/functions/functions.py 83.86% <0.00%> (-5.48%) ⬇️
vyper/parser/expr.py 72.52% <0.00%> (-5.03%) ⬇️
vyper/ast/nodes.py 91.86% <0.00%> (-1.61%) ⬇️
vyper/functions/convert.py 73.64% <0.00%> (-1.36%) ⬇️
vyper/context/types/indexable/sequence.py 82.14% <0.00%> (-0.62%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80ac1ee...3de46d1. Read the comment docs.

@fubuloubu fubuloubu merged commit 192d991 into vyperlang:master Oct 13, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the fix-sequential-memory branch December 4, 2020 10:33
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