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

Separate VM from Hint Execution: Phase 2(ExecScopesProxy)

Open fmoletta opened this issue 3 years ago • 1 comments

  • [x] Remove exec scopes from VM: Moved to CairoRunner
  • [x] Create ExecScopesProxy: Only allows adding and removing scopes + modifying actual scope
  • [x] Replace ExecScopes with ExecScopesProxy in execute_hints
  • [x] Move helpers to ExecScopeProxy

Next steps (Not included in this phase):

  • Refactor ExecutionScopes to hold Any: Replaces PyValueType Enum with Any
  • Move DictManager to the scope (Instead of creating one when the VM is created)

This PR depends on #337

fmoletta avatar Aug 09 '22 21:08 fmoletta

Codecov Report

Merging #359 (d4b492c) into main (a3dcfba) will decrease coverage by 0.03%. The diff coverage is 98.13%.

@@            Coverage Diff             @@
##             main     #359      +/-   ##
==========================================
- Coverage   97.88%   97.85%   -0.04%     
==========================================
  Files          44       44              
  Lines       11605    12140     +535     
==========================================
+ Hits        11359    11879     +520     
- Misses        246      261      +15     
Impacted Files Coverage Δ
src/utils.rs 98.75% <ø> (ø)
src/types/exec_scope.rs 85.34% <74.50%> (-12.42%) :arrow_down:
src/vm/hints/blake2s_utils.rs 99.72% <100.00%> (+0.01%) :arrow_up:
src/vm/hints/cairo_keccak/keccak_hints.rs 98.51% <100.00%> (+0.11%) :arrow_up:
src/vm/hints/dict_hint_utils.rs 100.00% <100.00%> (ø)
src/vm/hints/execute_hint.rs 100.00% <100.00%> (ø)
src/vm/hints/find_element_hint.rs 98.67% <100.00%> (+0.16%) :arrow_up:
src/vm/hints/hint_utils.rs 90.78% <100.00%> (+2.25%) :arrow_up:
src/vm/hints/keccak_utils.rs 96.38% <100.00%> (ø)
src/vm/hints/math_utils.rs 99.57% <100.00%> (+0.07%) :arrow_up:
... and 12 more

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

codecov-commenter avatar Aug 10 '22 15:08 codecov-commenter