cairo-vm icon indicating copy to clipboard operation
cairo-vm copied to clipboard

Refactor Memory methods to handle Temporary segment cases

Open pefontana opened this issue 3 years ago • 1 comments

Merge after #471

Refactor Memory methods to handle Temporary segment cases

  • Refactor Memory.get method to get values from Temporary Segments
  • Refactor Memory.insert method to insert values in Temporary Segments
  • Refactor fn from_relocatable_to_indexes
  • Add Memory.relocation_rules field

Checklist

  • [ ] Linked to Github Issue
  • [x] Unit tests added
  • [ ] Integration tests added.
  • [ ] This change requires new documentation.
    • [ ] Documentation has been added/updated.

pefontana avatar Oct 14 '22 20:10 pefontana

Codecov Report

Merging #482 (2a6d408) into main (c74b6e0) will increase coverage by 0.08%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
+ Coverage   91.33%   91.42%   +0.08%     
==========================================
  Files          47       47              
  Lines        2955     2961       +6     
==========================================
+ Hits         2699     2707       +8     
+ Misses        256      254       -2     
Impacted Files Coverage Δ
src/types/relocatable.rs 91.89% <100.00%> (+0.61%) :arrow_up:
src/utils.rs 100.00% <100.00%> (ø)
src/vm/vm_memory/memory.rs 95.12% <100.00%> (+1.70%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Oct 14 '22 20:10 codecov-commenter