File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use crate::snippet_bencher::write_benchmarks;
11
11
use crate :: snippet_bencher:: BenchmarkCase ;
12
12
use crate :: snippet_bencher:: NamedBenchmarkResult ;
13
13
use crate :: test_helpers:: test_rust_equivalence_given_complete_state;
14
+ use crate :: InitVmState ;
14
15
use crate :: VmHasher ;
15
16
16
17
use super :: basic_snippet:: BasicSnippet ;
@@ -55,6 +56,17 @@ pub struct FunctionInitialState {
55
56
pub memory : HashMap < BFieldElement , BFieldElement > ,
56
57
}
57
58
59
+ impl From < FunctionInitialState > for InitVmState {
60
+ fn from ( value : FunctionInitialState ) -> Self {
61
+ let nd = NonDeterminism :: default ( ) . with_ram ( value. memory ) ;
62
+ Self {
63
+ stack : value. stack ,
64
+ nondeterminism : nd,
65
+ ..Default :: default ( )
66
+ }
67
+ }
68
+ }
69
+
58
70
pub struct ShadowedFunction < F : Function + ' static > {
59
71
pub function : Rc < RefCell < F > > ,
60
72
}
You can’t perform that action at this time.
0 commit comments