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

Move Memory into MemorySegmentManager #830

Merged
merged 15 commits into from
Feb 14, 2023
Merged

Move Memory into MemorySegmentManager #830

merged 15 commits into from
Feb 14, 2023

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Feb 9, 2023

This PR aims to reduce the complexity of the VM's memory. and also enforce proper usage (as the memory and its segment manager are now a "unified" entity)

  • Remove memory field from VirtualMachine
  • Add memory field to MemorySegmentManager
  • Remove Memory argument from methods where MemorySegmentManager is also an argument
  • Add test macro segments (an extension of the memory macro

@fmoletta fmoletta changed the title Move Memory into MemorySegmentManager Move Memory into MemorySegmentManager Feb 13, 2023
@fmoletta fmoletta marked this pull request as ready for review February 13, 2023 14:48
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #830 (c445a4f) into main (8e6c953) will decrease coverage by 0.02%.
The diff coverage is 99.74%.

@@            Coverage Diff             @@
##             main     #830      +/-   ##
==========================================
- Coverage   97.12%   97.11%   -0.02%     
==========================================
  Files          69       69              
  Lines       28770    28609     -161     
==========================================
- Hits        27944    27783     -161     
  Misses        826      826              
Impacted Files Coverage Δ
src/vm/vm_memory/memory_segments.rs 99.02% <97.56%> (-0.03%) ⬇️
..._processor/builtin_hint_processor/blake2s_utils.rs 99.23% <100.00%> (+<0.01%) ⬆️
...int_processor/builtin_hint_processor_definition.rs 98.67% <100.00%> (-0.04%) ⬇️
...uiltin_hint_processor/cairo_keccak/keccak_hints.rs 93.53% <100.00%> (ø)
...rocessor/builtin_hint_processor/dict_hint_utils.rs 99.07% <100.00%> (-0.03%) ⬇️
...t_processor/builtin_hint_processor/dict_manager.rs 95.72% <100.00%> (ø)
...cessor/builtin_hint_processor/find_element_hint.rs 96.17% <100.00%> (+0.01%) ⬆️
...int_processor/builtin_hint_processor/hint_utils.rs 98.31% <100.00%> (ø)
...int_processor/builtin_hint_processor/math_utils.rs 97.25% <100.00%> (-0.11%) ⬇️
...cessor/builtin_hint_processor/memcpy_hint_utils.rs 100.00% <100.00%> (ø)
... and 53 more

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

src/utils.rs Outdated Show resolved Hide resolved
src/utils.rs Show resolved Hide resolved
src/vm/runners/builtin_runner/keccak.rs Show resolved Hide resolved
src/vm/vm_memory/memory_segments.rs Outdated Show resolved Hide resolved
@Jrigada Jrigada added this pull request to the merge queue Feb 14, 2023
Merged via the queue into main with commit 27eb588 Feb 14, 2023
@Jrigada Jrigada deleted the move-memory branch February 14, 2023 12:53
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